Error After Adding Firebase for iOS on Flutter App - ios

I added the Firebase files to my app but it crashes right after it opens because in the first screen I call FirebaseAuth.getCurrentUser().
I tried this solution and added the file through Xcode but the app still crashing.
Solution: flutter ios app crashes after firebase setup
This is, how my ìnfo.plist`looks like.
This is my plist file provided by Google;
The error I'm getting;
Error in text:
Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Running Xcode build...
Xcode build done. 20.1s
path: satisfied (Path is satisfied), interface: en1
Configuring the default Firebase app...
*** First throw call stack:
(
0 CoreFoundation 0x00007fff23c7127e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff513fbb20 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23c710bc +[NSException raise:format:] + 188
3 Runner 0x0000000102ea421a +[FIRApp configure] + 138
4 Runner 0x000000010349aa96 -[FLTCloudFirestorePlugin init] + 214
5 Runner 0x000000010349a894 +[FLTCloudFirestorePlugin registerWithRegistrar:] + 292
6 Runner 0x0000000102e4ada0 +[GeneratedPluginRegistrant registerWithRegistry:] + 112
7 Runner <…>

Related

Flutter on ios simulator crash with error after `Configuring the default Firebase app`

I use codemagic to test my app on a simulator.
the app takes more than half an hour to build and when I try to do flutter run I get
Configuring the default Firebase app...
*** First throw call stack:
(
0 CoreFoundation 0x000000010b9adcce __exceptionPreprocess + 350
1 libobjc.A.dylib 0x000000010b8199b2 objc_exception_throw + 48
2 CoreFoundation 0x000000010b9adb0c +[NSException raise:format:] + 188
3 Runner 0x0000000101dac652 +[FIRApp configure] + 130
4 Runner 0x00000001023c64b9 -[FLTCloudFirestorePlugin init] + 217
5 Runner 0x00000001023c62c6 +[FLTCloudFirestorePlugin registerWithRegistrar:] + 262
6 Runner 0x0000000101d477ff +[GeneratedPluginRegistrant registerWithRegistry:] + 207
7 Runner <…>
NOTE: I was following this tutorial https://blog.codemagic.io/remote-access-to-virtual-mac-build-machine/

What is wrong with creating a React Native app this way?

I'm trying to create a basic React Native app. While I can create the project, it will not run inside the simulator.
After the app loads, it immediately quits. If I remove node_modules and do npm install to download all the modules fresh, I will see the app reload the Javascript. Then when it hits 100%, it immediately quits again.
The steps I used to create the app are as follows:
$ react-native init demo1
$ cd demo1
$ react-native run-ios
That's literally it. I'm using the following versions of tools:
$ node --version
v6.11.2
$ npm --version
3.10.10
$ react-native --version
react-native-cli: 2.0.1
react-native: 0.48.0
The full log is here. What am I doing wrong?
Investigating this more, it turns out the Xcode project fails with a stack trace:
2017-09-02 13:03:00.775 [info][tid:main][RCTCxxBridge.mm:188] Initializing <RCTCxxBridge: 0x6080001a2ae0> (parent: <RCTBridge: 0x6000000a1f80>, executor: (null))
2017-09-02 13:03:00.804 [warn][tid:main][RCTBridge.m:114] Class RCTCxxModule was not exported. Did you forget to use RCT_EXPORT_MODULE()?
2017-09-02 13:03:00.825 [info][tid:main][RCTRootView.m:301] Running application r1 ({
initialProps = {
};
rootTag = 1;
})
2017-09-02 13:03:00.960 r1[47802:5600672] -[NSTaggedPointerString unsignedIntValue]: unrecognized selector sent to instance 0xa313434323930327
2017-09-02 13:03:00.977 r1[47802:5600672] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSTaggedPointerString unsignedIntValue]: unrecognized selector sent to instance 0xa313434323930327'
*** First throw call stack:
(
0 CoreFoundation 0x000000010e094b0b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010cf4a141 objc_exception_throw + 48
2 CoreFoundation 0x000000010e104134 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x000000010e01b840 ___forwarding___ + 1024
4 CoreFoundation 0x000000010e01b3b8 _CF_forwarding_prep_0 + 120
5 r1 0x000000010c301394 -[RCTMultipartStreamReader emitProgress:contentLength:final:callback:] + 244
6 r1 0x000000010c301b8a -[RCTMultipartStreamReader readAllPartsWithCompletionCallback:progressCallback:] + 1610
7 r1 0x000000010c3514bc -[RCTMultipartDataTask URLSession:streamTask:didBecomeInputStream:outputStream:] + 444
8 CFNetwork 0x000000010daf4c51 __88-[NSURLSession delegate_streamTask:didBecomeInputStream:outputStream:completionHandler:]_block_invoke + 51
9 Foundation 0x000000010ca543b7 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 7
10 Foundation 0x000000010ca540bb -[NSBlockOperation main] + 101
11 Foundation 0x000000010ca52877 -[__NSOperationInternal _start:] + 627
12 Foundation 0x000000010ca4e5fc __NSOQSchedule_f + 198
13 libdispatch.dylib 0x0000000111d7605c _dispatch_client_callout + 8
14 libdispatch.dylib 0x0000000111d5494f _dispatch_queue_serial_drain + 221
15 libdispatch.dylib 0x0000000111d55669 _dispatch_queue_invoke + 1084
16 libdispatch.dylib 0x0000000111d57ec4 _dispatch_root_queue_drain + 634
17 libdispatch.dylib 0x0000000111d57bef _dispatch_worker_thread3 + 123
18 libsystem_pthread.dylib 0x000000011210d5a2 _pthread_wqthread + 1299
19 libsystem_pthread.dylib 0x000000011210d07d start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Is this some sort of bug or is this something I did?
This seems to be a 0.48 issue. Try using 0.47.1 and you should be fine.
react-native init demo1 --version react-native#0.47.1
This issue has been fixed in RN 0.48.1. If you create a new project (as of September 4, 2017) you shouldn't run into this issue.

(Simulator iPhone 4s is not available.) during validation

I try to update my pod to Xcode 8 and Swift 3 syntax, I did run the following command of my project:
pod spec lint BSTableViewReorder.podspec
and it produces an error:
-> BSTableViewReorder (1.3)
- ERROR | [iOS] unknown: Encountered an unknown error (/Applications/Xcode.app/Contents/Developer/usr/bin/xcrun simctl list devices
2016-08-25 11:58:10.561 simctl[34169:531955] CoreSimulator is attempting to unload a stale CoreSimulatorService job. Detected Xcode.app relocation or CoreSimulatorService version change. Framework path (/Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework) and version (209.19) does not match existing job path (/Users/kuna/Downloads/Xcode-beta.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework/Versions/A/XPCServices/com.apple.CoreSimulator.CoreSimulatorService.xpc/Contents/MacOS/com.apple.CoreSimulator.CoreSimulatorService) and version (303.7).
2016-08-25 11:58:10.819 simctl[34169:531955] Failed to locate a valid instance of CoreSimulatorService in the bootstrap. Adding it now.
2016-08-25 11:58:10.839 simctl[34169:531955] *** Assertion failure in -[SimServiceContext reloadServiceIfMovedOrAbortIfWeAreInvalid], /BuildRoot/Library/Caches/com.apple.xbs/Sources/CoreSimulator/CoreSimulator-209.19/CoreSimulator/SimServiceContext.m:536
2016-08-25 11:58:10.857 simctl[34169:531955] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'The loaded com.apple.CoreSimulator.CoreSimulatorService job does not match our expectations: pathOfLoadedJob: /Users/kuna/Downloads/Xcode-beta.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework/Versions/A/XPCServices/com.apple.CoreSimulator.CoreSimulatorService.xpc/Contents/MacOS/com.apple.CoreSimulator.CoreSimulatorService, our frameworkPath: /Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff87a934f2 __exceptionPreprocess + 178
1 libobjc.A.dylib 0x00007fff93c8973c objc_exception_throw + 48
2 CoreFoundation 0x00007fff87a981ca +[NSException raise:format:arguments:] + 106
3 Foundation 0x00007fff8aaa8856 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 198
4 CoreSimulator 0x00000001099953e9 -[SimServiceContext reloadServiceIfMovedOrAbortIfWeAreInvalid] + 1313
5 CoreSimulator 0x0000000109995d01 -[SimServiceContext connect] + 41
6 CoreSimulator 0x00000001099947a6 -[SimServiceContext initWithDeveloperDir:connectionType:] + 1108
7 CoreSimulator 0x0000000109994071 __63+[SimServiceContext sharedServiceContextForDeveloperDir:error:]_block_invoke_2 + 127
8 libdispatch.dylib 0x00007fff923fb40b _dispatch_client_callout + 8
9 libdispatch.dylib 0x00007fff923fc9f2 _dispatch_barrier_sync_f_invoke + 74
10 CoreSimulator 0x0000000109993ea6 +[SimServiceContext sharedServiceContextForDeveloperDir:error:] + 226
11 CoreSimulator 0x00000001099941ee +[SimServiceContext sharedServiceContext] + 51
12 simctl 0x0000000109982a71 simctl + 31345
13 libdyld.dylib 0x00007fff95ba65ad start + 1
14 ??? 0x0000000000000003 0x0 + 3
)
libc++abi.dylib: terminating with uncaught exception of type NSException
) during validation.
UPDATE:
After I chnaged the name of my Xcode from Xcode beta to Xcode, the following error arise:
Encountered an unknown error (Simulator iPhone 4s is not available.) during validation.
How to fix this?
Simply install iOS 9.3 Simulator:
update cocoapods to 1.1.0.beata.2 can fix it.
sudo gem install cocoapods --pre
hope can help you

iOS Cordova app crashes on startup with NSInvalidArgumentException

We are keeping getting a strange error on when starting a cordova app
Apache Cordova native platform version 4.1.1 is starting.
[__NSDictionaryM cordovaSettingForKey:]: unrecognized selector sent to instance 0x7fef81d10e00
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSDictionaryM cordovaSettingForKey:]: unrecognized selector sent to instance 0x7fef81d10e00'
*** First throw call stack:
(
0 CoreFoundation 0x0000000105fdcd85 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000105a50deb objc_exception_throw + 48
2 CoreFoundation 0x0000000105fe5d3d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x0000000105f2bcfa ___forwarding___ + 970
4 CoreFoundation 0x0000000105f2b8a8 _CF_forwarding_prep_0 + 120
5 שוליק.נט 0x0000000105527ab3 -[CDVViewController viewDidLoad] + 195
6 שוליק.נט 0x0000000105525a06 -[MainViewController viewDidLoad] + 54
7 UIKit 0x0000000106bf5984 -[UIViewController loadViewIfRequired] + 1198
8 UIKit 0x0000000106bf5cd3 -[UIViewController view] + 27
9 UIKit 0x0000000106acbfb4 -[UIWindow addRootViewControllerViewIfPossible] + 61
10 UIKit 0x0000000106acc69d -[UIWindow _setHidden:forced:] + 282
11 UIKit 0x0000000106ade180 -[UIWindow makeKeyAndVisible] + 42
12 שוליק.נט 0x000000010552b188 -[CDVAppDelegate application:didFinishLaunchingWithOptions:] + 776
Recently I had the same problem with a Visual Studio TACO project. In particular this appeared when updated the Cordova CLI platform version from 5.1.1 to 6.1.1. This resulted in the modification of the native version of iOS Cordova from the 3.8.2 to 4.1.1 which produced the problem commented.
After many tests I found the solution. The problem was caused by file 'build.xconfig' located in '[project_folder]/res/native/ios/cordova'. After delete this file and recompile the project the problem was solved.

Unable to Symbolicate iOS App Crash Report

My app is occasionally crashing for some users and I have been unable to replicate the problem.
I have managed to get a few crash reports from one of the users which I have imported to Xcode, but I am unable to symbolicate the reports fully with some of the myApp lines not showing the actual class/code being called. Two sample stack traces extracts:
Last Exception Backtrace:
0 CoreFoundation 0x39e5c3e2 __exceptionPreprocess + 158
1 libobjc.A.dylib 0x38eb595e objc_exception_throw + 26
2 CoreFoundation 0x39da66d0 -[__NSPlaceholderArray initWithObjects:count:] + 160
3 CoreFoundation 0x39da6e04 +[NSArray arrayWithObject:] + 40
4 myApp 0x0012117c 0x63000 + 778620
5 myApp 0x0012c700 0x63000 + 825088
6 myApp 0x00148784 0x63000 + 939908
7 myApp 0x0013caf0 0x63000 + 891632
8 myApp 0x0013b9da 0x63000 + 887258
9 myApp 0x0006bda2 -[myAppAppDelegate init] (myAppAppDelegate.m:45)
10 UIKit 0x3380d8aa -[UIClassSwapper initWithCoder:] + 186
Last Exception Backtrace:
0 CoreFoundation 0x39e5c3e2 __exceptionPreprocess + 158
1 libobjc.A.dylib 0x38eb595e objc_exception_throw + 26
2 CoreFoundation 0x39da66d0 -[__NSPlaceholderArray initWithObjects:count:] + 160
3 CoreFoundation 0x39da6e04 +[NSArray arrayWithObject:] + 40
4 myApp 0x000c217c 0x4000 + 778620
5 myApp 0x000cd700 0x4000 + 825088
6 myApp 0x000e9784 0x4000 + 939908
7 myApp 0x000ddaf0 0x4000 + 891632
8 myApp 0x000dc9da 0x4000 + 887258
9 myApp 0x0000cda2 -[myAppAppDelegate init] (myAppAppDelegate.m:45)
10 UIKit 0x3380d8aa -[UIClassSwapper initWithCoder:] + 186
This is an app submitted to the store from an archived build which still exists in Xcode. I have also tried the atos command, and running several of the symbolicate scripts available with no success. (I am 100% sure I have the correct .app and .dSYM files).
Anyone have any idea how I may be able to find out more info about these stack traces and determine where this crash is happening?
(Note: I am aware that line 9 references the app delegate's init command, which is very useful. My question is specifically regarding the subsequent calls that are not symbolicated)
Thanks!

Resources