Skip to content

[FR] Unable to find command line tool python - extend binary checks #1005

Open
@mastef

Description

@mastef

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2019.2.11f1
  • Firebase Unity SDK version: 7.1.0
  • Source you installed the SDK: This happened with both (.unitypackage and Unity Package Manager)
  • Problematic Firebase Component: Auth, Database, Analytics
  • Other Firebase Components in use: Auth, Database, Analytics
  • Additional SDKs you are using: AdMob,GoogleMobileAds,Facebook, ...
  • Platform you are using the Unity editor on: Ubuntu for CI builds
  • Platform you are targeting: Android
  • Scripting Runtime: IL2CPP (Mono, and/or IL2CPP)

[REQUIRED] Please describe the issue here:

This seems related to #835

I tried with having python and python3 symlinked. Moved to the folders, the editor folders, etc. To no avail.

Steps to reproduce:

Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)?
What's the issue repro rate? (eg 100%, 1/5 etc)

What happened? How can we make the problem occur?
This could be a description, log/console output, etc.

If you have a downloadable sample project that reproduces the bug you're reporting, you will
likely receive a faster response on your issue.

Relevant Code:

We even have an extra build step, to add python to many folders, to no avail. I mean we just put python everywhere where the script may look, but we have no idea where it's actually looking.

          which python
          ls -lsah /usr/bin/python
          sudo rm -rf /usr/bin/python
          sudo ln -s $(which python) /usr/bin/python
          sudo ln -s $(which python) $PWD/Assets/Firebase/Editor/python
          sudo ln -s $(which python) $PWD/python
          which python
          python --version

Note: I was most likely doing that above step in the wrong environment.

Relevant Error Message:

Unable to find command line tool python required for Firebase Android resource generation.
python is required to generate the Firebase Android resource file google-services.xml from Assets/Resources/GoogleService-Info.plist. Without Firebase Android resources, your app will fail to initialize.
python was distributed with each Firebase Unity SDK plugin, was it deleted?
2021-03-25T07:31:11.4431920Z 
System.ComponentModel.Win32Exception (0x80004005): ApplicationName='python', CommandLine='"/github/workspace/Library/PackageCache/com.google.firebase.app@7.1.0/Firebase/Editor/generate_xml_from_google_services_json.py" -i "Assets/Resources/GoogleService-Info.plist" -l --plist', CurrentDirectory='/github/workspace', Native error= Cannot find the specified file
  at System.Diagnostics.Process.StartWithCreateProcess (System.Diagnostics.ProcessStartInfo startInfo) [0x002dc] in <fb35542c49c94f4d9bf912c73e79fe13>:0 
  at System.Diagnostics.Process.Start () [0x0003a] in <fb35542c49c94f4d9bf912c73e79fe13>:0 
  at (wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start()
  at GooglePlayServices.CommandLine.RunViaShell (System.String toolPath, System.String arguments, System.String workingDirectory, System.Collections.Generic.Dictionary`2[TKey,TValue] envVars, GooglePlayServices.CommandLine+IOHandler ioHandler, System.Boolean useShellExecution, System.Boolean stdoutRedirectionInShellMode) [0x002e8] in /Users/chkuang/Workspace/Git/unity-jar-resolver/source/AndroidResolver/src/CommandLine.cs:631 
  at GooglePlayServices.CommandLine.Run (System.String toolPath, System.String arguments, System.String workingDirectory, System.Collections.Generic.Dictionary`2[TKey,TValue] envVars, GooglePlayServices.CommandLine+IOHandler ioHandler) [0x00000] in /Users/chkuang/Workspace/Git/unity-jar-resolver/source/AndroidResolver/src/CommandLine.cs:510 
  at Firebase.Editor.PythonExecutor.Run (System.Collections.Generic.IEnumerable`1[T] arguments, System.String workingDirectory, System.Collections.Generic.Dictionary`2[TKey,TValue] envVars, GooglePlayServices.CommandLine+IOHandler ioHandler) [0x00000] in Z:\tmp\tmp.RemzflXQPx\firebase\app\client\unity\editor\src\PythonExecutor.cs:180 
  at Firebase.Editor.GenerateXmlFromGoogleServicesJson.RunResourceGenerator (System.Collections.Generic.IEnumerable`1[T] arguments, System.String inputPath, System.Boolean showCommandLine) [0x0001b] in Z:\tmp\tmp.RemzflXQPx\firebase\app\client\unity\editor\src\GenerateXmlFromGoogleServicesJson.cs:521 
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogError(Object)
Firebase.Editor.GenerateXmlFromGoogleServicesJson:RunResourceGenerator(IEnumerable`1, String, Boolean) (at Z:\tmp\tmp.RemzflXQPx\firebase\app\client\unity\editor\src\GenerateXmlFromGoogleServicesJson.cs:525)
Firebase.Editor.GenerateXmlFromGoogleServicesJson:ReadBundleIds(String) (at Z:\tmp\tmp.RemzflXQPx\firebase\app\client\unity\editor\src\GenerateXmlFromGoogleServicesJson.cs:407)
Firebase.Editor.GenerateXmlFromGoogleServicesJson:UpdateConfigFileDirectory() (at Z:\tmp\tmp.RemzflXQPx\firebase\app\client\unity\editor\src\GenerateXmlFromGoogleServicesJson.cs:295)
Firebase.Editor.GenerateXmlFromGoogleServicesJson:OnPostprocessAllAssets(String[], String[], String[], String[]) (at Z:\tmp\tmp.RemzflXQPx\firebase\app\client\unity\editor\src\GenerateXmlFromGoogleServicesJson.cs:705)
System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)
System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
System.Reflection.MethodBase:Invoke(Object, Object[])
UnityEditor.AssetPostprocessingInternal:InvokeMethod(MethodInfo, Object[]) (at /home/builduser/buildslave/unity/build/Editor/Mono/AssetPostprocessor.cs:662)
UnityEditor.AssetPostprocessingInternal:PostprocessAllAssets(String[], String[], String[], String[], String[]) (at /home/builduser/buildslave/unity/build/Editor/Mono/AssetPostprocessor.cs:146)
 
(Filename: Z Line: 0)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions