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

iOS : invalid GOOGLE_APP_ID in GoogleService-Info.plist or set in the customized options #308

Closed
JCornat opened this Issue May 17, 2017 · 26 comments

Comments

Projects
None yet
@JCornat

JCornat commented May 17, 2017

Hello,

I have a Firebase project where I have downloaded the iOS and Android configuration files.
It works on Android, but on iOS launch, the app just crashes and here is the log.

I have checked the GoogleService-Info.plist, re-downloaded, but everytime, I got this error.

2017-05-17 12:06:45.541 BioContact[4304] <Debug> [Firebase/Core][I-COR000001] Configuring the default app.
2017-05-17 12:06:45.542 BioContact[4304] <Error> [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.
2017-05-17 12:06:45.547 BioContact[4304:6763094] *** 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:
(
	0   CoreFoundation                      0x000000010705db0b __exceptionPreprocess + 171
	1   libobjc.A.dylib                     0x0000000106a99141 objc_exception_throw + 48
	2   CoreFoundation                      0x00000001070c6625 +[NSException raise:format:] + 197
	3   BioContact                          0x0000000105f0598d +[FIRApp addAppToAppDictionary:] + 371
	4   BioContact                          0x0000000105f04f38 +[FIRApp configureDefaultAppWithOptions:sendingNotifications:] + 285
	5   BioContact                          0x0000000105f04c6c +[FIRApp configure] + 302
	6   BioContact                          0x0000000105ea49ff -[AppDelegate(MCPlugin) application:customDidFinishLaunchingWithOptions:] + 767
	7   UIKit                               0x0000000107e36957 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 299
	8   UIKit                               0x0000000107e3823c -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4119
	9   UIKit                               0x0000000107e3e584 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1709
	10  UIKit                               0x0000000107e3b793 -[UIApplication workspaceDidEndTransaction:] + 182
	11  FrontBoardServices                  0x000000010c7b45f6 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
	12  FrontBoardServices                  0x000000010c7b446d -[FBSSerialQueue _performNext] + 186
	13  FrontBoardServices                  0x000000010c7b47f6 -[FBSSerialQueue _performNextFromRunLoopSource] + 45
	14  CoreFoundation                      0x0000000107003c01 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
	15  CoreFoundation                      0x0000000106fe90cf __CFRunLoopDoSources0 + 527
	16  CoreFoundation                      0x0000000106fe85ff __CFRunLoopRun + 911
	17  CoreFoundation                      0x0000000106fe8016 CFRunLoopRunSpecific + 406
	18  UIKit                               0x0000000107e3a02f -[UIApplication _run] + 468
	19  UIKit                               0x0000000107e400d4 UIApplicationMain + 159
	20  BioContact                          0x0000000105dc40a1 main + 65
	21  libdyld.dylib                       0x000000010986c65d start + 1
	22  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 

Can you help me understand why Firebase crashes on iOS ?

Thank you !

@larssn

This comment has been minimized.

larssn commented May 17, 2017

GoogleService-Info.plist usually becomes corrupted for whatever reason.

Check platforms/ios/<Your Project>/Resources/ and platforms/ios/<Your Project>/Resources/Resources

There should be a GoogleService-Info.plist in both locations. One of these should be corrupt. Usually its the one furthest in.

Replace that one, and it should work.

@JCornat

This comment has been minimized.

JCornat commented May 17, 2017

I have replaced the file in both folders and it works, thank you !

@JCornat JCornat closed this May 17, 2017

@codinronan

This comment has been minimized.

codinronan commented Jun 11, 2017

Wow this is obscure and even more amazing that someone knew the solution. You just saved me... countless hours, @larssn .

@nitin7dc

This comment has been minimized.

nitin7dc commented Jul 6, 2017

@larssn super thanks !

@rolinger

This comment has been minimized.

rolinger commented Aug 6, 2017

holy sweet jesus batman!!!!!!!!! Like @codinronan said, this completely obscure solution fixed my issue. and I am not even using the FCM plugin, I am using the Firebase plugin. Rebuilt my app project from scratch and the problem still persisted...until I found this solution!!!!

thank you....Thank You....THANK YOU!!!!

@shanmicheal25

This comment has been minimized.

shanmicheal25 commented Sep 6, 2017

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:
(0x184096fe0 0x182af8538 0x184096f28 0x100145600 0x100144ba8 0x1001448d0 0x1000c16c0 0x18a239e48 0x18a44637c 0x18a44be24 0x18a4608b0 0x18a4490b8 0x185c40884 0x185c406f0 0x185c40aa0 0x18404542c 0x184044d9c 0x1840429a8 0x183f72da4 0x18a232fc8 0x18a22dc9c 0x1000bee34 0x182f8159c)
libc++abi.dylib: terminating with uncaught exception of type NSException

I tried the solution, I copied GoogleService-Info.plist file into project resources folder, but still i'm facing same problem. Any one have solution

@vanschroeder

This comment has been minimized.

vanschroeder commented Sep 7, 2017

@shanmicheal25 be sure to overwrite the .plist file under platforms/ios/< Your Project >/Resources/Resources with the .plist file from your root

At least that made all the difference to me

@Junior-iOS

This comment has been minimized.

Junior-iOS commented Sep 28, 2017

Sorry, guys.
Where do I find the path platforms/ios?

@satryacode

This comment has been minimized.

satryacode commented Oct 4, 2017

@Junior-iOS it's in Cordova Project root folder
the folder created after you add platform in it
by running this command in your console cordova platform add ios

@PredragJ

This comment has been minimized.

PredragJ commented Oct 11, 2017

@for Xcode 9, solution is to check box at Target Membership Tab on GoogleService-Infp.plist

@Geeksquid04

This comment has been minimized.

Geeksquid04 commented Oct 15, 2017

where do you find the platforms folder?

@sKuD51

This comment has been minimized.

sKuD51 commented Oct 18, 2017

Same problem, I dont know why, but I replace my olds GoogleService-Info.plist in :

  • root folder
  • /platforms/ios/yourAppNameFolder/Resources
  • /platforms/ios/yourAppNameFolder/Resources/Resources

It works fine.

@Jhonsensf

This comment has been minimized.

Jhonsensf commented Oct 22, 2017

Same problem here. I replaced the files and it is working fine.

Thank you!

@TheNaderio

This comment has been minimized.

TheNaderio commented Nov 10, 2017

In this File was no Informations:
/platforms/ios/yourAppNameFolder/Resources/Resource/GoogleService-Info.plist

So i copyed
this -> /platforms/ios/yourAppNameFolder/Resources/GoogleService-Info.plist
to here -> /platforms/ios/yourAppNameFolder/Resources/Resource/GoogleService-Info.plist

@Xam-Devender

This comment has been minimized.

Xam-Devender commented Jan 3, 2018

Thanks !!!!!!!!! Re-Downloaded -> Build and that's all it worked ... :)

@roshandhabekar

This comment has been minimized.

roshandhabekar commented Mar 9, 2018

hello @larssn ,
I am building ionic ios,
i got the file at ,
/platforms/ios/yourAppNameFolder/Resources/GoogleService-Info.plist

but I don't have resources folder inside resources,
/platforms/ios/yourAppNameFolder/Resources/Resource/GoogleService-Info.plist
Can you please suggest me, which one should I replace.

Thanks!

@vanschroeder

This comment has been minimized.

vanschroeder commented Mar 9, 2018

@roshandhabekar per the other comments above, just create the missing Resources folder and copy the GoogleService-info.plist file into place. If that doesn't work I would suggest ionic cordova platform rm ios and ionic cordova platform add ios which is typically an expedient way to correct platform specific issues

@jonathan-chin

This comment has been minimized.

jonathan-chin commented Mar 14, 2018

Thanks @larssn ! indeed, the deeper plist file was empty.

Any idea why this happens?

@larssn

This comment has been minimized.

larssn commented Mar 14, 2018

@jonathan-chin I haven't digged into the code; I assume there's a bug in there somewhere.

@edugolive

This comment has been minimized.

edugolive commented Apr 12, 2018

I found the problem.
These plugins, as well as the cordova-plugin-firebase, have the after-ready script, in this case scripts/fcm_config_files_process.js, which at line 20 tries to get the name of the project in this way (var name = getValue (config, 'name');).
And in the "getValue" method it tries to read the tag of the config.xml file.
That way (var value = config.match (new RegExp ('<' + name + '> (. *?) </' + Name + '>', 'i'));).
So if your config.xml file is described this way MyAppName</ name>, this will work.
Now if so, MyAppName</ name> will return as null.
That way when the rest of the script tries to do this (IOS_DIR + '/' + name + '/Resources/GoogleService-Info.plist'), this will result in "ios/null/Resources/GoogleService-Info.plist" that does not exist, and will not save the file.

Then leave the tag of config.xml in this way MyAppName and it will work.
Hug.

@coolvasanth

This comment has been minimized.

coolvasanth commented May 24, 2018

I just removed the GoogleService-info.plist file from my project root folder and re added it, everything works fine now.

@robertohuertasm

This comment has been minimized.

robertohuertasm commented Jun 12, 2018

Why is this thread closed? It seems that the issue is still going on...

@mohitcis

This comment has been minimized.

mohitcis commented Jun 19, 2018

@larssn thanks, It worked for me :)

@madhurakhal

This comment has been minimized.

madhurakhal commented Nov 2, 2018

I am having same problem. adding Resource with GoogleService-info.plist does not solve the problem. I am using XCode 10.1

@sibabratswain11

This comment has been minimized.

sibabratswain11 commented Nov 13, 2018

@madhurakhal did you find any solution ?

@edugolive

This comment has been minimized.

edugolive commented Nov 13, 2018

My tip is you start from scratch.
Delete all your android sdk files. open the android studio and download again the versions of sdk you need.
Delete your files from the node_modules folder and download it again.
Remove your plugins used in the project and download it again.
Build project again.
It worked for me.

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