Firebase app creation failed on Standalone Windows Build when project contains special charactors
Please fill in the following fields:
Unity editor version: 2019.3.13 and 2019.3.14 Firebase Unity SDK version: 6.13 and also 6.14 Source you installed the SDK (.unitypackage or Unity Package Manager): Both Firebase plugins in use (Auth, Database, etc.): Auth, Database, Storage Additional SDKs you are using (Facebook, AdMob, etc.): None Platform you are using the Unity editor on (Mac, Windows, or Linux): Mac Platform you are targeting (iOS, Android, and/or desktop): Desktop/Standalone Windows build throw this error but Standalone Mac build works fine. Scripting Runtime (Mono, and/or IL2CPP): Mono
Please describe the issue here:
(Please list the full steps to reproduce the issue. Include device logs, Unity logs, and stack traces if available.
Give a project name with special characters like ç,ü,ö,ı,ğ then
- Import EDM4U Package from Firebase.com
- Import Firebase packages with package manager. Start with FirebaseAppCore Package and then Auth, Realtime, Storage
- Try play mode on editor and works fine.
- Build for Windows x86_64
- Start the exe file
What I tried
- Import EDM4U from firebase/quickstart-unity#641 issue but it does not help.
- Update Unity version 2019.3.13 to 2019.3.14
- Create new project then import projects assets and then import firebase packages
- Search for other related issues
Nothing helps!. Any ideas ?
Here is the Player log file
Mono path[0] = 'C:/Users/User/Desktop/Bildirec/Bildirec V 2.3/bw v2.3/Bildireç_Data/Managed'
Mono config path = 'C:/Users/User/Desktop/Bildirec/Bildirec V 2.3/bw v2.3/MonoBleedingEdge/etc'
Loading player data from C:/Users/User/Desktop/Bildirec/Bildirec V 2.3/bw v2.3/Bildireç_Data/data.unity3d
Initialize engine version: 2019.3.13f1 (d4ddf0d95db9)
[Subsystems] Discovering subsystems at path C:/Users/User/Desktop/Bildirec/Bildirec V 2.3/bw v2.3/Bildireç_Data/UnitySubsystems
GfxDevice: creating device client; threaded=1
Direct3D:
Version: Direct3D 11.0 [level 11.0]
Renderer: AMD Radeon HD 7510 (ID=0x675f)
Vendor:
VRAM: 1010 MB
Driver: 15.201.1151.1008
Begin MonoManager ReloadAssembly
- Completed reload, in 3.058 seconds D3D11 device created for Microsoft Media Foundation video decoding. <RI> Initializing input.
XInput1_3.dll not found. Trying XInput9_1_0.dll instead... <RI> Input initialized.
<RI> Initialized touch support.
UnloadTime: 0.991300 ms
InitializationException: Firebase app creation failed.
at Firebase.FirebaseApp.CreateAndTrack (Firebase.FirebaseApp+CreateDelegate createDelegate, Firebase.FirebaseApp existingProxy) [0x000e3] in <255216fc307d4a59a4e7a32dc7c6a1b3>:0
at Firebase.FirebaseApp.Create () [0x00027] in <255216fc307d4a59a4e7a32dc7c6a1b3>:0
at Firebase.FirebaseApp.get_DefaultInstance () [0x00017] in <255216fc307d4a59a4e7a32dc7c6a1b3>:0
at Firebase.Auth.FirebaseAuth.get_DefaultInstance () [0x00000] in
(Filename: <255216fc307d4a59a4e7a32dc7c6a1b3> Line: 0)
Unable to load Firebase app options ([C:/Users/User/Desktop/Bildirec/Bildirec V 2.3/bw v2.3/Bildireç_Data/StreamingAssets\google-services-desktop.json, C:/Users/User/Desktop/Bildirec/Bildirec V 2.3/bw v2.3/Bildireç_Data/StreamingAssets\google-services.json] are missing or malformed) (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)
Setting up 2 worker threads for Enlighten.
Thread -> id: 1b88 -> priority: 1
Thread -> id: 2cc8 -> priority: 1
NullReferenceException: Object reference not set to an instance of an object
at LoginLogic.OnDestroy () [0x00000] in
(Filename:
I was implementing Firebase like this.
private IEnumerator CheckAndFixDepencies()
{
var dependenciesTask = FirebaseApp.CheckAndFixDependenciesAsync();
while (dependenciesTask.IsCompleted == false)
{
yield return null;
}
if (dependenciesTask.IsCanceled || dependenciesTask.IsFaulted)
{
PopUp.ShowPopUp(dependenciesTask.Exception.GetBaseException().Message);
yield break;
}
InitializeFirebase();
}
Change to it like this
FirebaseApp.CheckAndFixDependenciesAsync().ContinueWithOnMainThread(task =>
{
dependencyStatus = task.Result;
if (dependencyStatus == DependencyStatus.Available)
{
Debug.Log($"Dependency Status: {dependencyStatus}");
InitializeFirebase();
}
else
{
Debug.LogError(
"Could not resolve all Firebase dependencies: " + dependencyStatus);
}
});
After this change InitializationException has gone but the problem still remains. What is preventing google-services-desktop.json file to load when the app starts? I deleted and reimport the google-services.json file and also info.plist file. My second question is could anyone tell the differences between these implementations. Why the first one throws an initialization exception and the second one does not?
Here is the log
Dependency Status: Available (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)
Unable to load Firebase app options ([C:/Users/User/Desktop/Bildirec/Bildirec V 2.3/bw v2.3/Bildireç_Data/StreamingAssets\google-services-desktop.json, C:/Users/User/Desktop/Bildirec/Bildirec V 2.3/bw v2.3/Bildireç_Data/StreamingAssets\google-services.json] are missing or malformed) (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)
Setting up 2 worker threads for Enlighten.
Thread -> id: 3174 -> priority: 1
Thread -> id: 2e8c -> priority: 1
NullReferenceException: Object reference not set to an instance of an object
at LoginLogic.OnDestroy () [0x00000] in
(Filename:
I figure it out. If the project name has a special character such as ç.ğ.ü.ö.ı. Firebase cannot load google-services-desktop.json file When I change the project name with english characters everything works great. I think it should be some kind of bug.
Please answer the following, if applicable:
Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)? I cannot reproduce this issue on quickstarts project
What's the issue repro rate? (eg 100%, 1/5 etc) 100%
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
@ctykaya
This does looks like a bug. Thank you for providing details and I'll report back to the team about this issue.
@chkuang-g thank you. Is there any progress about this issue? Could i track this issue on this topic. How to get informed?
@ctykaya
Yes, you can track this topic for any update. Unfortunately the team has not looked into this yet. Is it ok if you change the project name for now?
The same thing happens when building with android in unity 2020.1.0f1.
dotnet4.x IL2CPP
Yep not working in Unity 2020.1.0f1
@cloudeven
Your issue may be related to this https://firebase.google.com/docs/unity/setup#missing_firebase_android_config_file_in_unity_2020
As there was no problem in unity 2019.4.4, I roll back to that version and use it.
"Parse/Plugins/Unity.Compat.dll", "Parse/Plugins/Unity.Tasks.dll" If it means, it has already been deleted.
In summary: 2020 editor: ok android: fail 2019 editor: ok android ok
Same problem here, had 2019, everything was fine, then with 2020 it does work on the editor but not on android. I tried the workaround in the previous link (chkuang-g) but it does not work for me. Anybody has a different workaround or i have to downgrade?
Same issue for me as well. In 2019 it worked but in 2020 it works in the editor but not on android. Tried this https://firebase.google.com/docs/unity/setup#missing_firebase_android_config_file_in_unity_2020 but gradle build fails.
@ctykaya I'm modifying your title to make it clear.
@Edward205 @gabrielesimula I think your issue is with Android build. On top of the google-services.json issue (the fix will be released soon), there is another issue with Jetifier. You can find the workaround here (https://github.com/googlesamples/unity-jar-resolver/issues/360). We are also working on some fixes to alleviate this Unity change.
@ctykaya I'm modifying your title to make it clear.
@Edward205 @gabrielesimula I think your issue is with Android build. On top of the google-services.json issue (the fix will be released soon), there is another issue with Jetifier. You can find the workaround here (googlesamples/unity-jar-resolver#360). We are also working on some fixes to alleviate this Unity change.
I hope that this is not an issue with my project, but enabling Custom Main Gradle Template and compiling returns many errors which I don't understand. Looking forward to another fix.
I can't comprehend how this issue has still not been resolved since 2020. So, for three years, none of the nations that use a different alphabet can use Firebase? I am experiencing the same problem, and many of my Windows users cannot connect to my game due to this issue. @paulinon
This has been fixed in the Firebase C++ SDK, and the fix will be included in the next release (11.3.0) of the Firebase Unity SDK. Closing this bug, but feel free to reopen if it recurs in the future.