CHECKLIST
[x] I confirm this is a suspected bug or issue that will affect other users
[ ] I have reproduced the issue using the example project or provided the necessary information to reproduce the issue.
[x] I have read the documentation thoroughly and it does not help solve my issue.
[x] I have checked that no similar issues (open or closed) already exist.
Current behavior:
When we build our app for iOS it doesn't fail but it has this in the build log, and we are curious about what is causing it but can't really figure out what is happening.
I cannot reproduce it in the test repo, but I am out of ideas for what is causing it in my repo.
Expected behavior:
Build passes without errors / warnings
Environment information
10.0.0ios 6.1.1cordova-plugin-appavailability 0.4.2 "AppAvailability"
cordova-plugin-camera 4.1.0 "Camera"
cordova-plugin-device 2.0.3 "Device"
cordova-plugin-file 6.0.2 "File"
cordova-plugin-firebasex 11.0.0-cli "Google Firebase Plugin"
cordova-plugin-inappbrowser 4.0.0 "InAppBrowser"
cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 5.0.0 "cordova-plugin-ionic-webview"
cordova-plugin-network-information 2.0.2 "Network Information"
cordova-plugin-safariviewcontroller 1.6.0 "SafariViewController"
cordova-plugin-splashscreen 6.0.0 "Splashscreen"
cordova-plugin-statusbar 2.4.3 "StatusBar"
cordova-plugin-whitelist 1.3.4 "Whitelist"
cordova-plugin-x-socialsharing 6.0.2 "SocialSharing"
cordova-sqlite-storage 5.0.1 "Cordova sqlite storage plugin - cordova-sqlite-storage plugin version"
cordova.plugins.diagnostic 6.0.2 "Diagnostic"
es6-promise-plugin 4.2.2 "Promise"
ionic-plugin-deeplinks 1.0.20 "Ionic Deeplink Plugin"
10.15.6_iOS build issue:_
v10.16.311.7Console output
...Loads of other plugin inits
2020-09-16 16:40:06.834627+0200 AppName[381:26110] Starting Firebase plugin
2020-09-16 16:40:06.841424+0200 AppName[381:26110] FirebasePlugin[native] ERROR: EXCEPTION: data parameter is nil
2020-09-16 16:40:06.841929+0200 AppName[381:26110] [CDVTimer][firebaseplugin] 7.614017ms
2020-09-16 16:40:06.842095+0200 AppName[381:26110] [CDVTimer][TotalPluginStartup] 46.452999ms
2020-09-16 16:40:06.892437+0200 AppName[381:26110] FirebasePlugin[native] LOG: GoogleService-Info.plist found, setup: [FIRApp configureWithOptions]
2020-09-16 16:40:07.170306+0200 AppName[381:26110] [Firebase/Crashlytics] Version 4.6.0
...continued Firebase init
I found a similar issue that got the same error, however that user was using Capacitor, so that issue was closed without much more.
Hope to hear from you, and if there is any more info I can add, please let me know.
If you're unable to reproduce the error in the example project app it could be caused by conflict with another plugin in your project. I suggest adding each plugin you are using in your own project one-at-a-time to the example project and building/running each time to see if the error occurs; in this way you should be able to identify if there is a plugin conflict and which plugin is conflicting with this one.
Tried you recommendation and removed all plugins, and it's unfortunately still happening.
cordova plugin ls
cordova-plugin-firebasex 11.0.1-cli "Google Firebase Plugin"
Tried you recommendation and removed all plugins
My suggestion is to add the plugins one-at-a-time to the example project not remove them from your own project:
I suggest adding each plugin you are using in your own project one-at-a-time to the example project and building/running each time to see if the error occurs; in this way you should be able to identify if there is a plugin conflict and which plugin is conflicting with this one.
Sorry I missed the bit with the example project. I thought you meant to add them one-by-one to my project.
Will try this approach as well.
Again thanks for your response
So I tried what you mentioned above with installing all plugins one-by-one into the test project, after each plugin I rebuild through xcode. Still not getting the error.
Then I thought what else could be causing issues, so I tried to make an ionic project from scratch, and then add the firebasex plugin - THIS causes the error. So I guess it might be somewhat related to Ionic.
What I did -
ionic cordova platform add iosionic cordova plugin add cordova-plugin-firebasex@latest-cliionic cordova build iosCan the log line be ignored perhaps?
Anything else I can do to help solve this issue? If yes, then let me know, would love to help as much as I can to make it easier to solve.
Anything else I can do to help solve this issue? If yes, then let me know, would love to help as much as I can to make it easier to solve.
It seems the issue is specific to an Ionic-based Cordova project.
To diagnose the error, you'll need to debug the project in Xcode at run-time to find where the exception is arising and what the cause is.
If you're unable to do this, I will investigate as and when I have time.
I appreciate your fast response, I will try to debug it, will return with more if I find anything.
I understand this is a spare time project so I don't wish to rush you, but any help when you have time is very appreciated.
I've had a chance to look at this and it looks like a genuine plugin bug - not specific to Ionic - that was introduced by PR #482:
in the additional code added by that PR, it reads the pn-actions.json file (which defines notification actions) without first checking if that file exists - therefore if it doesn't, an exception is raised here because the value of the data variable is nil.
I'll commit a fix for this.
@dpa99c When can we expect release of this fix?
Same problem. Thanks for your work
Most helpful comment
I've had a chance to look at this and it looks like a genuine plugin bug - not specific to Ionic - that was introduced by PR #482:
in the additional code added by that PR, it reads the
pn-actions.jsonfile (which defines notification actions) without first checking if that file exists - therefore if it doesn't, an exception is raised here because the value of thedatavariable isnil.I'll commit a fix for this.