question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] "Unable to load Firebase app options" when running as standalone executable in a folder which contains non-ASCII characters

See original GitHub issue

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2020.3.19f1
  • Firebase Unity SDK version: 8.6.2
  • Source you installed the SDK: .unitypackage
  • Problematic Firebase Component: App
  • Other Firebase Components in use: Auth
  • Additional SDKs you are using: None
  • Platform you are using the Unity editor on: Windows
  • Platform you are targeting: Desktop
  • Scripting Runtime: Mono

[REQUIRED] Please describe the issue here:

When running as a standalone executable, Firebase is unable to create app/load Firebase app options when a non-ASCII character is present in the directory name/path.

Here is a YouTube video demonstrating this bug:

https://youtu.be/6zDzuXBCTB8

This appears similar to firebase/quickstart-unity#1089 firebase/quickstart-unity#1069 firebase/firebase-unity-sdk#427

Steps to reproduce:

To reproduce the issue:

  1. Create new Unity project
  2. Import Firebase Unity SDK
  3. Create a method/function which tries to login with Firebase Auth, and a way to call that method/function.
  4. Build a standalone executable 4a. Assuming the build is in a folder that does not contain any special characters, the login attempt should succeed at this point
  5. Rename the directory where the build is located to something which contains a special character
  6. Attempt to login and the following error will be thrown:
InitializationException:  Firebase app creation failed.
  at Firebase.FirebaseApp.CreateAndTrack (Firebase.FirebaseApp+CreateDelegate createDelegate, Firebase.FirebaseApp existingProxy) [0x000da] in Z:\tmp\tmp.uQUresKAQs\firebase\app\client\unity\proxy\FirebaseApp.cs:597 
  at Firebase.FirebaseApp.Create () [0x00000] in Z:\tmp\tmp.uQUresKAQs\firebase\app\client\unity\proxy\FirebaseApp.cs:124 
  at Firebase.FirebaseApp.get_DefaultInstance () [0x0000b] in Z:\tmp\tmp.uQUresKAQs\firebase\app\client\unity\proxy\FirebaseApp.cs:99 
  at Firebase.Auth.FirebaseAuth.get_DefaultInstance () [0x00000] in Z:\tmp\tmp.iEHLvp1aL4\firebase\auth\client\unity\proxy\FirebaseAuth.cs:295 
  at TestScript.Update () [0x00053] in C:\Users\work\Desktop\FirebaseMinimalTest\Assets\TestScript.cs:31 

(Filename: Z:/tmp/tmp.uQUresKAQs/firebase/app/client/unity/proxy/FirebaseApp.cs Line: 597)

Unable to load Firebase app options ([C:/Users/work/Desktop/FirebaseMinimalTest/Buildé/FirebaseMinimalTest_Data/StreamingAssets\google-services-desktop.json, C:/Users/work/Desktop/FirebaseMinimalTest/Buildé/FirebaseMinimalTest_Data/StreamingAssets\google-services.json] are missing or malformed)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
UnityEngine.Logger:Log (UnityEngine.LogType,object)
UnityEngine.Debug:LogError (object)
Firebase.Platform.FirebaseLogger:LogMessage (Firebase.Platform.PlatformLogLevel,string) (at Z:/tmp/tmp.cEjnms3lS8/firebase/app/client/unity/src/Unity/FirebaseLogger.cs:95)
Firebase.LogUtil:LogMessage (Firebase.LogLevel,string) (at Z:/tmp/tmp.uQUresKAQs/firebase/app/client/unity/proxy/LogUtil.cs:69)
Firebase.LogUtil:LogMessageFromCallback (Firebase.LogLevel,string) (at Z:/tmp/tmp.uQUresKAQs/firebase/app/client/unity/proxy/LogUtil.cs:77)
Firebase.AppUtil:PollCallbacks () (at Z:/tmp/tmp.uQUresKAQs/firebase/app/client/unity/proxy/AppUtil.cs:32)
Firebase.Platform.FirebaseAppUtils:PollCallbacks () (at Z:/tmp/tmp.uQUresKAQs/firebase/app/client/unity/proxy/FirebaseAppUtils.cs:33)
Firebase.Platform.FirebaseHandler:Update () (at Z:/tmp/tmp.cEjnms3lS8/firebase/app/client/unity/src/Unity/FirebaseHandler.cs:208)
Firebase.Platform.FirebaseMonoBehaviour:Update () (at Z:/tmp/tmp.cEjnms3lS8/firebase/app/client/unity/src/Unity/FirebaseMonoBehaviour.cs:45)

(Filename: Z:/tmp/tmp.uQUresKAQs/firebase/app/client/unity/proxy/LogUtil.cs Line: 69)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jonsimantovcommented, Jul 13, 2023

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.

1reaction
yubingxdccommented, Jan 18, 2023

is this issue resolved now? I am still encountering same issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unity Firebase "Unable to load options for default app" error
In my case Special sign in filepath caused this error! ... you can place the Firebase config files anywhere within the Assets folder.)....
Read more >
Error when builden apk
Your project path contains non-ASCII characters. This will most likely cause ... Run with --info or --debug option to get more log output....
Read more >
apksigner | Android Studio
This page presents a short guide for using the tool and serves as a reference for the different command-line options that the tool...
Read more >
The file contains non-ASCII characters error when ...
The ATO's portals cannot interpret an export file that contains non-ASCII characters and will fail to validate the TPAR export file or reject...
Read more >
Sophos Known Issues list
Sophos Engineering is aware of an issue seen in the Sophos Central Dashboard when viewing either the “Partner info” or “Co-branding” pages displays...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found