FirebaseApp.configure() crashing on second time launch after clean installation - ios

I am using Firebase inside my app and calling FirebaseApp.configure() inside didFinishLaunchingWithOptions . Now my app works fine when I do a clean installation (delete the app and install again) and run it for the first time. But when I re-run the app the second time, it crashes on FirebaseApp.configure() with
2019-11-11 12:02:43.166729+0530 MyAppName[885:135491] 6.11.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled
2019-11-11 12:02:43.176694+0530 MyAppName[885:135418] -[FIRInstanceIDTokenInfo isFresh]: unrecognized selector sent to instance 0x281bc8a80
2019-11-11 12:02:43.179909+0530 MyAppName[885:135418] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[FIRInstanceIDTokenInfo isFresh]: unrecognized selector sent to instance 0x281bc8a80'
*** First throw call stack:
(0x1a267180c 0x1a2399fa4 0x1a257536c 0x1a2675c88 0x1a2677a6c 0x102e632fc 0x102e48844 0x102e48714 0x102e48530 0x102986b70 0x102986e0c 0x1029869e4 0x1029811dc 0x102980c18 0x102980b64 0x10264ea14 0x10264e7d4 0x10264eb7c 0x1a66d0ef4 0x1a66d2d20 0x1a66d8554 0x1a5ea6cdc 0x1a633bfc4 0x1a5ea77c4 0x1a5ea721c 0x1a5ea75f0 0x1a5ea6eac 0x1a5eab3c8 0x1a626e6a4 0x1a63555b0 0x1a5eab100 0x1a63554ac 0x1a5eaaf6c 0x1a5d1cba4 0x1a5d1b70c 0x1a5d1c8dc 0x1a66d68d4 0x1a628f09c 0x1a7776850 0x1a779b8e8 0x1a7780fb4 0x1a779b5a4 0x107b1abd8 0x107b1dffc 0x1a77c04c8 0x1a77c0194 0x1a77c06bc 0x1a25ef7c4 0x1a25ef71c 0x1a25eeeb4 0x1a25ea000 0x1a25e98a0 0x1ac541328 0x1a66da768 0x102654b44 0x1a2474360)
libc++abi.dylib: terminating with uncaught exception of type NSException
To setup firebase I am using the following
private func setupFirebase() {
FirebaseApp.configure()
Messaging.messaging().delegate = self
}
I am using Cocoapods for installation and Firebase version that I'm using is 6.11.0

Please pod update to Firebase 6.12.0.
We suspect that this is related to https://github.com/firebase/firebase-ios-sdk/issues/4167 that was fixed in 6.12.0.

Related

Terminating app due to uncaught exception 'NSGenericException', reason: 'This coder requires that replaced objects be returned from initWithCoder:'

My iOS application is working fine in iOS 10 and newer version. But when I was trying to run my app on iPad mini with iOS version 9.3.2 then Application is crashing.
I am trying to push a view controller and I am using storyboard for all view controllers.
This is my code for push view controller:
self.performSegue(withIdentifier: "PaymentViewcontrolller", sender: self)
I am getting this is error in console and application is crashing:
2018-10-26 16:21:17.223 Food[592:68727] *** Terminating app due to uncaught exception 'NSGenericException', reason: 'This coder requires that replaced objects be returned from initWithCoder:'
*** First throw call stack:
(0x2447391b 0x23c0ee17 0x24473861 0x28fbb15f 0x28fbadf5 0x28ea3477 0x28ea3b01 0x28fbb10f 0x28fbb0a1 0x28fbadf5 0x28ea2a0b 0x28d55aa3 0x28b28ffb 0x289eea1f 0x28a06e71 0x28b9d1e5 0x28aab4a7 0x28aab1b5 0x28aab12b 0x289eaa73 0x26a82bcd 0x26a7e375 0x26a7e209 0x26a7d6d1 0x26a7d3a5 0x26a76b2b 0x244356c9 0x244339cd 0x24433dff 0x24383229 0x24383015 0x25973ac9 0x28a57189 0x3d8008 0x2402b873)
libc++abi.dylib: terminating with uncaught exception of type NSException
My Xcode version is 9.4.1 and deployment target is iOS 9.2.
I am not able to figure out what is the issue. Already spent whole day for this.

Crash firebase Swift

I'm making an app with Swift and Firestore and since yesterday evening, my app crash when it start on when executing :
FirebaseApp.configure()
Here is the error message :
2018-05-23 10:27:08.562176+0200 protoMeteoApp[51741:3501027] 4.9.0 - [Firebase/Analytics][I-ACS023007] Firebase Analytics v.40009000 started
2018-05-23 10:27:08.578312+0200 protoMeteoApp[51741:3501027] 4.9.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see https://help.apple.com/xcode/mac/8.0/#/dev3ec8a1cb4)
2018-05-23 10:27:08.592866+0200 protoMeteoApp[51741:3500914] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[3]'
First throw call stack:
(
0 CoreFoundation 0x000000010925f1e6
__exceptionPreprocess + 294
......
)
libc++abi.dylib: terminating with uncaught exception of type NSException
I tried to fix it creating a new project, downloading again "GoogleService-Info.plist" but it still crash.
Any idea ?
Can add following two keys into your Info.plist file:
Set FirebaseAppDelegateProxyEnabled to YES
Set FirebaseScreenReportingEnabled to NO
Also configure your Firebase app into AppDelegate.swift file inside didFinishLaunchingWithOptions method before use of Firebase as:
FirebaseApp.configure()

Ionic, phonegap nfc Exception in iOS

I am developing an Ionic app which reads nfc tags. But when I am running it in iOS I am getting the result from the nfc tag, but after that I am getting NSExcetion.
Here is the part of the code where I am trying to read NFC Tag:
if(this.platform.is("ios")) {
this.nfc.beginSession().subscribe(() => {
this.nfc.addNdefListener((data) => {
console.log("IOS: ",data) // You will not see this, at this point the app will crash
})
});
}
I never get the console.log !!!!!
These are the errors that I am getting in Xcode (version 9.2):
2018-02-01 09:06:57.987510-0500 androidSDK[1819:852595] readerSessionDidBecomeActive
2018-02-01 09:07:03.035369-0500 androidSDK[1819:852705] NFCNDEFReaderSession didDetectNDEFs
2018-02-01 09:07:03.035641-0500 androidSDK[1819:852705] {"ndefMessage":[{"tnf":1,"id":[],"payload":[2,101,110,72,101,108,108,111,46,33],"type":[84]},{"tnf":1,"id":[],"payload":[2,101,110,72,101,108,108,111,32,119,111,114,108,100,33,32],"type":[84]}]}
2018-02-01 09:07:03.035975-0500 androidSDK[1819:852430] -[WKWebView stringByEvaluatingJavaScriptFromString:]: unrecognized selector sent to instance 0x15e046200
2018-02-01 09:07:03.036619-0500 androidSDK[1819:852430] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[WKWebView stringByEvaluatingJavaScriptFromString:]: unrecognized selector sent to instance 0x15e046200'
*** First throw call stack:
(0x18121b164 0x180464528 0x181228628 0x18ab933c8 0x181220b10 0x181105ccc 0x104b74880 0x105cfd2cc 0x105cfd28c 0x105d01ea0 0x1811c3344 0x1811c0f20 0x1810e0c58 0x182f8af84 0x18a836804 0x104b2b1cc 0x180c0056c)
libc++abi.dylib: terminating with uncaught exception of type NSException
2018-02-01 09:07:03.036798-0500 androidSDK[1819:852705] didInvalidateWithError Single tag read (null)
Ionic version: 3.19.1
iOS platform version: 4.5.4
Cordova version: 8.0.0
Phonegap-nfc plugin: phonegap-nfc 0.7.1 "NFC"
The problem is the plugin, it just works with UIWebView, but you are using WKWebView, so this line fails
[(UIWebView*)[self webView] stringByEvaluatingJavaScriptFromString: function];
There is a pull request available to fix this problem, so click on the thumbs up button so maybe it's taken into account and merged, or use the fork instead.

[__NSConcreteURLComponents queryItems]: unrecognized selector

I'm getting this error trying to run a bare project from the react-native init command, on an iOS 7.1 device.
This works on the iOS simulator, so I wonder if its an iOS compatibility issue?
The Movies example app works ok on this device.
```
2016-01-08 16:34:33.224 CouchTest[1210:60b] -[__NSConcreteURLComponents queryItems]: unrecognized selector sent to instance 0x14dacc10
2016-01-08 16:34:33.226 CouchTest[1210:60b] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSConcreteURLComponents queryItems]: unrecognized selector sent to instance 0x14dacc10'
* First throw call stack:
(0x2edb0f83 0x39561ccf 0x2edb4917 0x2edb3203 0x2ed02768 0x10abaf 0xb47a1 0xb1735 0xb0c8b 0x39a49833 0x39a4981f 0x39a49777 0x2ed7b8a1 0x2ed7a175 0x2ece4ebf 0x2ece4ca3 0x33bea663 0x3163114d 0x9780d 0x39a6eab7)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
```
NSURLComponents queryItems is only available on iOS8+
That's why you are seeing the crash.
See the docs here for more info: https://developer.apple.com/library/ios/documentation/Foundation/Reference/NSURLComponents_class/index.html#//apple_ref/occ/instp/NSURLComponents/queryItems
Setting an exception breakpoint will show you which class/method is making that call. Otherwise, it sounds like react-native is calling queryItems when it shouldn't.

PhoneGap 2.1.0 - window.RequestFileSystem

I have updated to iOS6, and due to this have been trying to update to PhoneGap version 2.1.0. (As the camera etc. does not seem to work in versions previous to this - I have now got this part working) However when I try to access the filesystem by running the following line of code:
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, success, fail);
The app just crashes out, with no error etc. If I put this line on the main page and start from within the simulator then I receive the following error:
2012-09-25 11:26:38.741 MobileManager[4866:15b03] Multi-tasking -> Device: YES, App: YES
2012-09-25 11:26:59.756 MobileManager[4866:17f03] void SendDelegateMessage(NSInvocation *): delegate (webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:) failed to return after waiting 10 seconds. main run loop mode: kCFRunLoopDefaultMode
2012-09-25 11:26:59.766 MobileManager[4866:15b03] -[NSNull intValue]: unrecognized selector sent to instance 0x275678
2012-09-25 11:26:59.767 MobileManager[4866:15b03] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull intValue]: unrecognized selector sent to instance 0x275678'
*** First throw call stack:
(0x144012 0x257de7e 0x1cf4bd 0x133bbc 0x13394e 0xd953 0x60812 0x5ff9e 0x60379 0x25916b0 0x1119035 0xc7f3f 0xc796f 0xea734 0xe9f44 0xe9e1b 0x33ae7e3 0x33ae668 0x37f65c 0x22b6 0x21e5)
libc++abi.dylib: terminate called throwing an exception
What does this error mean, and how can I resolve it?
Thanks in advance.
I had accidentally set the LocalFileSystem variable to something else (LocalFileSystem.PERSISTENT was undefined.

Resources