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] genearate xml failed when Windows user folder contains when non-ASCII characters

See original GitHub issue

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2019.4.9f1, 2019.4.24f1
  • Firebase Unity SDK version: 7.0.2, 7.1.0, 7.2.0
  • Source you installed the SDK: .unitypackage
  • Problematic Firebase Component: FirebaseAnalytics, FirebaseInstanceId,FirebaseRemoteConfig
  • Other Firebase Components in use: NA
  • Additional SDKs you are using: NA
  • Platform you are using the Unity editor on: Windows
  • Platform you are targeting: desktop, Android
  • Scripting Runtime: IL2CPP

[REQUIRED] Please describe the issue here:

generate_xml_from_google_services_json.exe fails when executed by a user whose Windows user folder contains non-ASCII characters.

Example:

C:\Users\漢字太郎>c:\Users\Public\unityproject\Assets\Firebase\Editor\generate_xml_from_google_services_json.exe --help
Microsoft.VC90.CRT.manifest could not be extracted!

For the exact same project, when the user folder only contains ASCII characters the execution is successful.

Example:

C:\Users\taro>c:\Users\Public\unityproject\Assets\Firebase\Editor\generate_xml_from_google_services_json.exe --help
usage: generate_xml_from_google_services_json.exe [-h] [-i FILE] [-o FILE] [-p P] [-l] [-f] [--plist]

Converts a Firebase app/google-services.json into res/values/googleservices.xml similar to the Gradle plugin, or converts a Firebase GoogleService-Info.plist into a
google-services-desktop.json suitible for use on desktop apps.

optional arguments:
  -h, --help  show this help message and exit
  -i FILE     Override input file name
  -o FILE     Override destination file name
  -p P        Package ID to select within the set of packages in the input file. If this is not specified, the first package in the input file is selected.
  -l          List all package IDs referenced by the input file. If this is specified, the output file is not created.
  -f          Print project fields from the input file in the form 'name=value\n' for each field. If this is specified, the output is not created.
  --plist     Specifies a plist file to convert to a JSON configuration file. If this is enabled, the script will expect a .plist file as input, which it will convert
              into google-services-desktop.json file. The output file is *not* suitable for use with Firebase on Android.

Using pyinstaller I was able to generate an .exe file from generate_xml_from_google_services_json.py that could be successfully executed by non-ASCII users. However, the size of the .exe increased from 4.9MB to 6.7MB.

Steps to create:

  • Python Releases for Windows 3.9.5(amd64)
  • pip install pyinstaller
  • Copy Assets/Firebase/Editor/generate_xml_from_google_services_json.py into any folder
  • pyinstaller generate_xml_from_google_services_json.py --onefile

Would it be possible to replace generate_xml_from_google_services_json.exe with a version that can be executed by non-ASCII users as well?

Issues that seem to be related:

  • firebase/quickstart-unity#540: Error loading Python DLL (Generation of the Firebase Android resource file failed)
  • firebase/firebase-unity-sdk#427: Firebase app creation failed on Standalone Windows Build when project contains special charactors
  • firebase/quickstart-unity#1007: [Bug] Crash if windows user has non-ascii name

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
chkuang-gcommented, Jun 11, 2021

Oh, that is good to know!

Thank you for the confirmation!

0reactions
tsugeharacommented, Jul 26, 2021

We have also confirmed that this issue has been fixed. Thank you for your support.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error occurs when an XML contains Low-Order ASCII
This article provides resolutions for the error that occurs when an XML document contains Low-Order ASCII characters.
Read more >
Fix AAPT2 ERROR in Android Studio with non-ASCII ...
The problem in this case was that I have non-ASCII characters in my Windows user name and thus in my user folder and...
Read more >
Tex Live installation fails on Windows 10 if username ...
The path names in the logs were unlegible. I soon realized that the username is not fully composed of ascii characters and that...
Read more >
Non-Printable Characters in XML Files
If an XML file contains non-printable characters, the XML parsers that conform to the W3C XML specification will yield an error.
Read more >
python doesn't build if prefix contains non-ascii characters
> My build error seems actually unrelated to encoding issues. Working > directory is ASCII-only, locale is UTF-8. > > $ ./configure --with- ......
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