dpa99c / cordova-plugin-firebasex

Cordova plugin for Google Firebase
MIT License
570 stars 457 forks source link

Update iOS Firebase SDK component version to v10.23.0, fixes crash on startup #880

Closed ben-kn-app closed 3 weeks ago

ben-kn-app commented 1 month ago

Bug report

Current behavior:

There is a known ios-sdk-firebase bug see Github Issue Build with Xcode 15.3, run on iOS 17.4, 100% crash on launch: pb_enc_bool EXC_BAD_ACCESS (KERN_INVALID_ADDRESS) which is solved by the official firebase ios sdk in version 10.23.0

Could this plugin be updated to use this new firebase ios sdk component?

Expected behavior:

crash on launch: pb_enc_bool

Steps to reproduce:

Follow the steps in the above github issue

ben-kn-app commented 1 month ago

This would most probably also fix issue https://github.com/dpa99c/cordova-plugin-firebasex/issues/860

ben-kn-app commented 1 month ago

There is already an open PR that bumps the ios firebase sdk to 10.22.0, which already addresses FirebaseSessions crash on startup https://github.com/dpa99c/cordova-plugin-firebasex/pull/878

haziqali-2019 commented 1 month ago

any idea why setting "IOS_FIREBASE_SDK_VERSION": "10.23.0" in package.json gives an error in build? According to documentation, this should update firebase sdk. Manually updating plugin.xml seems to work.

pinguluk commented 1 month ago

any idea why setting "IOS_FIREBASE_SDK_VERSION": "10.23.0" in package.json gives an error in build? According to documentation, this should update firebase sdk. Manually updating plugin.xml seems to work.

The following Cordova plugin variables are supported by the plugin. Note that these must be set at plugin installation time. If you wish to change plugin variables, you'll need to uninstall the plugin and reinstall it with the new variable values.

Basically the one in package.json just represents the version that is installed and if you try to change it manually afterwards, it won't do anything.

You have to either specify the version beforehand, or you can use my fork, which has the plugin.xml updated to the latest version (at least for iOS)

roundlakedan commented 4 weeks ago

Just wanted to echo that I was able to fix this by going into ~/plugins/cordova-plugin-firebasex/plugins.xml and manually incrementing the version to the latest for the Firebase-related plugins. Testing seems to indicate this works fine - no more crashing on startup and push notifications seem to send without any other amendments necessary.

Screenshot 2024-04-16 at 5 53 54 AM
dpa99c commented 3 weeks ago

Resolved by release of cordova-plugin-firebasex@16.5.0

dFelinger commented 3 weeks ago

For those who still has problem with 16.5.0 and adhoc release build, just add empty .swift file in the root of your project.

Solution found here: https://github.com/nanopb/nanopb/issues/949#issuecomment-2018207748