-
Notifications
You must be signed in to change notification settings - Fork 38
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
Failed to read Firebase options from the app's resources #761
Comments
I believe it is related to this: Sometimes it works and loads properly (which will allow the required google-esrvices.xml files to be generated).
|
Seems that installing iOS build support to my 2022.3 install allowed me to build and confirm that analytics/crashlytics worked. In 2021.3 I was able to get those generated and copied it to my 2022.3 project so it worked as a "fix". |
Hi @xjjon Odd that it is still failing to generate the xml file. I assume there are no errors or anything useful in the logs? The script/executable that should do that is in Assets/Firebase/Editor, generate_xml_from_google_services_json.exe (or .py). If you try running that directly, does that give any helpful info? |
hi @a-maurice I tried to run the .exe (didn't seem to do anything) Tried to run the python script next. Initially it gave errors:
Wasn't sure the arguments to run it with so i just moved my google-services.json to the default Ran it again from root /Asset/ folder and it produced the and The values generated by the -- Another issue I noticed is the |
Alright, that seems to indicate that the problem is on the dll side, and not on the generating the xml from the json at least. Another thing to try would be on the two Editor dlls (located in Assets/Firebase/Editor), in the Inspector pane turning off "Validate References". Installing the iOS build support should've also resolved that, but maybe something else is going wrong, and that can help? |
I tried that first (before installing iOS build support module) and disabling validation removed the errors in the editor. But it would cause compile errors when building an There's a similar comment here on this thread: googlesamples/unity-jar-resolver#412 (comment) |
@xjjon, Let me know if the following an accurate summary.
A few questions
|
Hi, I have the same problem |
Yes that is correct. Copying the google-services.xml and file structure from an older project (i.e. 2021, 2020, etc) worked as long as Validate References was disabled. Validate references fixed the in-editor errors but would cause compilation errors at build time. After installing iOS build support it worked as expected. I see
So to summarize, installing iOS build support seems to resolve the issue. In previous installs of Unity I only keep Android build support installed on windows environment though. We use a different environment (mac) to build iOS and that one only has iOS build support installed. The workaround we have now is installing both android and iOS on all our environments. |
Didn't mean to close the issue. Re-opening |
Hello, I have the same problem, and not fixed. |
I have the same problem, after adding ios build support , the firebase script seems to able to generate FirebaseApp.androidlib folder and the xml file inside, and the problem resolved. |
I have the same problem, and I agree that is related to this:
but after geting this tip, I went on the Firebase.Editor and disabled the validation for this file, if you click on it, there is a checkbox "Validate References" that I've unchecked. After applying the menu "Window>Firebase" started to show ( wasn't showing previously ) and the folder /Assets/Plugins/Android/FirebaseApp.androidlib was created automaticaly with all the resources inside, including the google-services.xml BTW, I'm using: |
I have same issue and this work with me |
[READ] For Firebase Unity SDK issues, please report to Firebase Unity open-source
Once you've read this section and determined that your issue is appropriate for this repository, please delete this section.
[REQUIRED] Please fill in the following fields:
[REQUIRED] Please describe the issue here:
(Please list the full steps to reproduce the issue. Include device logs, Unity logs, and stack traces if available.)
Error firebase Failed to read Firebase options from the app's resources. Either make sure google-services.json is included in your build or specify options explicitly.
Firebase does not generate the Plugins/Android/FirebaseApp.androidlib & FirebaseCrashlytics.androidlib folders so there is no values/google-services.xml file.
I copied these files from an older install of firebase (2020) and it worked.
Steps to reproduce:
Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)?
What's the issue repro rate? (eg 100%, 1/5 etc)
100% repo rate.
Fresh 2021 and 2022 LTS projects.
Add
google-services.json
andGoogleService-Info.plist
to root /Assets/ folderImport Analytics and Crashlytics unitypackage (downloaded latest from firebase site)
Resolve dependencies in dependency resolver.
Add the sample init code and crashlytics test code (from docs)
Build .apk
Check Logcat
What happened? How can we make the problem occur?
This could be a description, log/console output, etc.
If you have a downloadable sample project that reproduces the bug you're reporting, you will
likely receive a faster response on your issue.
The text was updated successfully, but these errors were encountered: