-
Notifications
You must be signed in to change notification settings - Fork 448
Running in debug works, running in release on iOS causes crash #178
Comments
I had this same issue and disabling the Firebase/Crash pod did the trick. |
That's not good :( Can you guys tell me the quickest way to run the app in release mode? |
@austinlarue - could you explain what steps you took to disable the pod? I believe I did so correctly in my podfile (see below), just not having any luck with that as a solution. Maybe I am missing something. ` pod 'Firebase', '~> 3.7.0'
End Podfile ` |
@mschahczinski That looks about right, perhaps you'll need to re-add the iOS platform (and the lib/ios folder) as well to get rid of lingering bits. |
@EddyVerbruggen - Tried that as well, but when you re-add the platform, the pod file is recreated. When building it adds the 'Firebase/Crash' dependency back to the pod file. Commenting it out again and rebuilding works, but still getting the crash on startup. Here is a snippet of the crash log from the firebase console (prior to removing the crash pod): |
Thanks. Does it crash for debug and prod or only prod? |
It works fine running in debug, it crashes in prod. Note: I am exporting and signing the package with an enterprise distribution profile. |
Good to know. I'll disable the crash pod in the next release as I don't think we can do much about this Firebase issue. |
@EddyVerbruggen - were you able to verify the above solution provided by @austinlarue? I see there was a commit, but disabling 'Firebase/Crash' still causes a crash on my end. |
@mschahczinski I'm not sure what you mean as @austinlarue says disabling the Pod fixes it, so that's what will be the case in the next release. |
@EddyVerbruggen - The solution that @austinlarue proposed was applied in my project but did not fix the issue. I took the steps below to follow the solution provided.
Following all of the above steps, application still crashes. If I follow the same steps above with the firebase plugin removed, the app launches and runs correctly. When I run with the plugin, I get the same errors in the crash log that I referenced earlier. Please advise if I am doing a step improperly, or if I am missing something along the way. |
@mschahczinski @EddyVerbruggen I was wrong. It looks like it's the Firebase/Messaging pod that is causing the crash for me. Back when I thought it was the Crash pod, I didn't realize I had also removed the Messaging pod at the same time. I just tried to re-publish my app yesterday after adding push notifications using this plugin and the app started crashing again while using TestFlight. I'm also receiving the same |
@austinlarue - Thanks for the feedback, glad it's not just me. @EddyVerbruggen - I am not sure this will help at all, but I was sifting through the physical device logs while trying to run the app and this is what's showing right before the application is terminating. Unfortunately I am not finding any more details here, just the same crash log error that @austinlarue is seeing as well. Possible to re-open this issue? |
I can verify that disabling 'Firebase/Messaging' works. I can publish and run with no issues with the pod disabled, but messaging is needed in my app. |
Oh bummer! Do you guys build for release by using the archiving feature of Xcode? |
@EddyVerbruggen That's how I'm building it right now to try and track down the cause of this issue. This also happens when using |
@EddyVerbruggen - Same thing here as @austinlarue ... I have tried it both ways. |
@EddyVerbruggen @austinlarue - I created a basic project, installed the plugin, ran in debug and somehow received the below error when it would normally crash in a production version. This was on a physical device- It happened twice, but haven't had any luck replicating it since. Hoping this will help- maybe collectively we can figure this out.
Installed Nativescript version: Package.json: "nativescript": { |
Thanks for chipping in, @mschahczinski! The issue you've logged here was fixed in this version: https://github.com/EddyVerbruggen/nativescript-plugin-firebase/releases/tag/3.6.3, so that must have been an old file lingering around in your project. |
@EddyVerbruggen - Well that would explain why I haven't been able to replicate the error... Thanks for the info. |
@EddyVerbruggen I've narrowed it down to this line in firebase.ios.js in the function
Removing that line (and the subsequent code that relies on it) prevents the app from crashing but I won't receive the FCM token. |
@austinlarue Strange.. that code is similar to this official sample. Do you know what the error is? |
@EddyVerbruggen @austinlarue - Have either of you seen this one? Looks to me like it's the reason we are getting the app crash on launch and definitely seems to be the culprit of @austinlarue's line of code.
|
@mschahczinski that one looks a LOT like this one. That constant may have been stripped for release build so it needs to be replaced by its actual value. So can you try replacing |
@EddyVerbruggen - Following your instructions worked like a charm! What will need to be changed to fix the plugin long-term as hard-coding is not a great solution? For anyone having this issue ( @austinlarue ), you need to change the line of code in for reference, this line was #170 in my firebase.ios.js file. It might not be exact in yours but should be very close. |
@EddyVerbruggen @mschahczinski I just tried this out and can confirm that it does fix the crashing issue. |
I think it's also good to note for anyone that should stumble upon this issue... If the plugin is ever removed & re-added/updated for any reason, the change referenced above will need to be applied- at least until the npm package is updated with a long-term solution. UPDATE - This only applies to plugin versions <3.7.2 as it now contains the temporary fix. |
Thanks guys for confirming. Will update npm very soon! Update: done (3.7.2) |
@EddyVerbruggen - I am also running in the same issue, app crashed if build in release mode with distribution profile ios, I m using 5.3.1 version of firebase plugin. Any pointers what could have wrong and a way to fix this. |
@VimalKumarS I have no idea - you're not giving me much to work with. And please don't post on closed issues. |
Plugin works flawlessly on Android but on iOS causes crash. I am running iOS runtime 2.3.0, with device iOS versions ranging from 8-10. If I run a "hello-world" type, basic application and initialize the plugin, the app crashes prior to the splashscreen disappearing. When building for development the app runs and receives notifications with no issue, but only happens when I publish and sign the app. Not sure what i'm missing if it's something configuration related, but all plist files are in place.
Side note: If I run the app without the plugin being initialized, I have zero issues.
Nativescript version: 2.3.0
The text was updated successfully, but these errors were encountered: