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

Firebase app creation failed on Standalone Windows Build when project contains special charactors #427

Closed
ctykaya opened this issue May 26, 2020 · 14 comments

Comments

@ctykaya
Copy link

ctykaya commented May 26, 2020

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

  1. Import EDM4U Package from Firebase.com
  2. Import Firebase packages with package manager. Start with FirebaseAppCore Package and then Auth, Realtime, Storage
  3. Try play mode on editor and works fine.
  4. Build for Windows x86_64
  5. Start the exe file

What I tried

  1. Import EDM4U from Firebase not working after unity build in mobile quickstart-unity#641 issue but it does not help.
  2. Update Unity version 2019.3.13 to 2019.3.14
  3. Create new project then import projects assets and then import firebase packages
  4. 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.
    Initializing input.

XInput1_3.dll not found. Trying XInput9_1_0.dll instead...
Input initialized.

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 :0
at LoginLogic.InitializeFirebase () [0x00000] in :0
at LoginLogic+d__15.MoveNext () [0x00085] in :0
at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00026] in <251be4efae014ce8ac9c16c930d6c8b5>:0

(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 :0

(Filename: Line: 0)

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 :0

(Filename: Line: 0)

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%

@ctykaya ctykaya added the new New issue. label May 26, 2020
@chkuang-g
Copy link
Contributor

@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 chkuang-g added type: bug and removed new New issue. labels May 30, 2020
@ctykaya
Copy link
Author

ctykaya commented Jun 12, 2020

@chkuang-g thank you. Is there any progress about this issue? Could i track this issue on this topic. How to get informed?

@chkuang-g
Copy link
Contributor

@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?

@cloudeven
Copy link

The same thing happens when building with android in unity 2020.1.0f1.

dotnet4.x
IL2CPP

@NilokiloxD
Copy link

Yep not working in Unity 2020.1.0f1

@chkuang-g
Copy link
Contributor

@cloudeven
Copy link

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

@NeosZone
Copy link

NeosZone commented Jul 25, 2020

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?

@Edward205
Copy link

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.

@chkuang-g chkuang-g changed the title InitializationException: Firebase app creation failed. Firebase.FirebaseApp.CreateAndTrack on Standalone Windows Build Firebase app creation failed on Standalone Windows Build when project contain special charactors Aug 20, 2020
@chkuang-g chkuang-g changed the title Firebase app creation failed on Standalone Windows Build when project contain special charactors Firebase app creation failed on Standalone Windows Build when project contains special charactors Aug 20, 2020
@chkuang-g
Copy link
Contributor

@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.

@Edward205
Copy link

@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.

@google-oss-bot
Copy link

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@UgurEmre06
Copy link

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

@jonsimantov jonsimantov self-assigned this Jul 13, 2023
@jonsimantov
Copy link
Contributor

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.

@firebase firebase locked and limited conversation to collaborators Aug 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests