Skip to content

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

@ctykaya

Description

@ctykaya

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%

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions