Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid GOOGLE_APP_ID #897

Closed
michaelkempf-ks opened this issue Oct 4, 2018 · 3 comments · Fixed by #905
Closed

Invalid GOOGLE_APP_ID #897

michaelkempf-ks opened this issue Oct 4, 2018 · 3 comments · Fixed by #905

Comments

@michaelkempf-ks
Copy link

michaelkempf-ks commented Oct 4, 2018

IOs Apps crashing instant because of an invalid GOOGLE_APP_ID.

Michaels-Mini:XYZ kempfsolutions$ cordova plugin list
cordova-android-firebase-gradle-release 1.0.2 "cordova-android-firebase-gradle-release"
cordova-android-play-services-gradle-release 1.4.3 "cordova-android-play-services-gradle-release"
cordova-plugin-enable-multidex 0.1.3 "Enable Multidex"
cordova-plugin-firebase 2.0.3 "Google Firebase Plugin"
cordova-plugin-statusbar 1.0.1 "StatusBar"
cordova-plugin-whitelist 1.2.2 "Whitelist"

Log of iPhone
Oct 4 18:37:11 Michaels-iPhone-2 XYZ[670] : GoogleService-Info.plist found, setup: [FIRApp configureWithOptions]
Oct 4 18:37:11 Michaels-iPhone-2 XYZ[670] : 5.7.0 - [Firebase/Core][I-COR000009] The GOOGLE_APP_ID either in the plist file 'GoogleService-Info.plist' or the one set in the customized options is invalid. If you are using the plist file, use the iOS version of bundle identifier to download the file, and do not manually edit the GOOGLE_APP_ID. You may change your app's bundle identifier to '(null)'. Or you can download a new configuration file that matches your bundle identifier from https://console.firebase.google.com/ and replace the current one.
Oct 4 18:37:11 Michaels-iPhone-2 XYZ(CoreFoundation)[670] : *** Terminating app due to uncaught exception 'com.firebase.core', reason: 'Configuration fails. It may be caused by an invalid GOOGLE_APP_ID in GoogleService-Info.plist or set in the customized options.'*** First throw call stack:

@briantq
Copy link
Contributor

briantq commented Oct 7, 2018

I encountered the same thing. It looks like the 2.0.3 release has a regression. I added logging to confirm the after_prepare script is NOT called in the 2.0.3 after it was refactored. As such the GoogleService-Info.plist is not copied over and instead an empty one is from the src directory (not sure why this happens).

@soumak77 it looks like the install/uninstall scripts get run correctly but the after_prepare does not and we will need to revisit that refactoring to make it platform specific. I did confirm if I move the script line outside of the platform tag, the script is indeed run.

@soumak77
Copy link
Contributor

soumak77 commented Oct 7, 2018

Any specific reason we don't try to copy the files during install as well?

I agree it sounds like we'll need to undo the changes to the after prepare hook.

@briantq
Copy link
Contributor

briantq commented Oct 7, 2018

@soumak77 I don't know for certain. I'm going to answer with "that's the way it was before", but I do have a rationale.

For me, files from the plugin itself should be during the installation phase. While files from the project should be copied during the prepare phase. Files in the plugin will never change while files from the project might. If a build script does any sort of project modifications (copies a production .plist over a dev .plist) that change won't take affect after the plugin is installed.

I'm not sure if it's a good practice but I will definitely make changes (html, js, app in config.xml) to a project and then run cordova prepare to get those changes into the native project.

Again, could be a rationale more so than a reason as I've only used Cordova for a couple months.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants