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

[Bug] Python2 is removed on macOS 12.3 !! Please update the Editor script #1232

Closed
sableangle opened this issue Feb 14, 2022 · 15 comments
Closed

Comments

@sableangle
Copy link

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2020.3, 2021,2
  • Firebase Unity SDK version: 7.0 - 8.8
  • Source you installed the SDK: unitypackage (.unitypackage or Unity Package Manager)
  • Platform you are using the Unity editor on: Mac (Mac, Windows, or Linux)

[REQUIRED] Please describe the issue here:

According to the Apple's release notes:
https://developer.apple.com/documentation/macos-release-notes/macos-12_3-release-notes

Python2 is removed on macOS 12.3, and will not be added back any more, also the Python2 is end-of-life!

Due to the Python2 is removed, the Firebase SDK comes with the error logs likes "Unable to find command line tool python required for Firebase Android resource generation."

I've try to install back the Python2 by .pkg installer, but it doesn't work, looks like Firebase SDK use a specific path to local Python binary.

The error cause problem, on 2020.3 version, sometimes it cause the Android build faild (The error log comes so the Editor stop the build proccess)
And on 2021.2 the problem goes worse, this problem cause the C# script compile backend crash with no reason, and than you cannot compile any edited C# script until editor restart.

I would point out the issue is cause by Firebase SDK(and the removed Python2) are because of 2 reason.

  • On 2021.2 on macOS 12.3, after deleting the Firebase.Editor.dll (the part that Firebase SDK using Python2) file, the issue gone.
  • On 2021.2 on macOS 12.2 (which system include Python2 built-in), everything works great.

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)

100% if you open a project which is install Firebase SDK and on macOS 12.3 beta.

I understand that macOS 12.3 is a beta version OS, so there may be something unstable.
But the Python2 is end-of-life 2 years ago, if the issue is really cause by the removing of Python2 on macOS 12.3 beta, I think the issue should not be happend today.

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

@sableangle
Copy link
Author

Well, after some research,
I have some new clues, maybe the issue is not the SDK is using Python2.
When I try explore the files inside /usr/bin, I found that "python" binary or symlink is gone and the python is renamed into "python2.7" and "python3" two different files.

And after decompiled the Firebase.Editor.dll, I saw that SDK just use "python" to execute python script, therefore this may be the actual reason which cause the problem.

Since I didn't have source of Firebase.Editor.dll and cannot re-compile the Firebase.Editor.dll from decompiled files, I cannot tested the inference.

@techyworm10
Copy link

@chkuang-g I created fixed editor dll files (until it will be officially fixed):
https://github.com/techyworm10/firebase-unity-sdk-editor-python-fix

@rusitschka
Copy link

@techyworm10 I'm using tgz installation method and archive contains a Firebase.Editor.dll.mdb which needs to match with DLL. I was not able to convert pdb to mdb:

$ pdb2mdb Firebase.Editor.dll
Error: A portable PDB can't be converted to mdb.

Can you provide mdb file, too?

@techyworm10
Copy link

@rusitschka Added the mdb files to the repo.

@alkanyunus
Copy link

@rusitschka Added the mdb files to the repo.

Thanks, it worked I lost 1 hour today for this :(

@chkuang-g
Copy link
Contributor

Sorry to hear that. :(

We are currently working on a release. For a workaround, you can create a symbolic link using command like this

sudo ln -s /usr/local/bin/python3 /usr/local/bin/python

@nextvern
Copy link

Symbolic link does not working

python
python: error: Failed to locate 'python'.
xcode-select: Failed to locate 'python', requesting installation of command line developer tools.

And I installed Python3 by Homebrew then made a symbolic link but it didn't work either.

@daltonbr
Copy link

The workaround of replacing pre-compiled files didn't work for me. 😢
After restarting Unity, the files were reverted with the following error:

The package cache was invalidated and rebuilt because the following immutable asset(s) were unexpectedly altered:
  Packages/com.google.firebase.app/Firebase/Editor/Firebase.Editor.pdb
  Packages/com.google.firebase.app/Firebase/Editor/Firebase.Editor.dll.mdb

@techyworm10
Copy link

@daltonbr Did you try to clear ./Library/PackageCache folder?

@daltonbr
Copy link

@techyworm10 Tried that and it seems to work! Thanks!

@daltonbr
Copy link

@techyworm10 I just had to create a meta file for Firebase.Editor that was lacking for your repository.

@techyworm10
Copy link

Good catch @daltonbr!
I added the missing .meta file to the repo.

@a-maurice
Copy link
Contributor

Hey all,

Firebase SDK for Unity 8.9.0 is now live, which contains a fix for this issue, and you can download it directly here, or through the usual places like the package manager.

I'm going to close this issue for now, but please let us know if there are any outstanding problems.

@GaborSimonSala
Copy link

GaborSimonSala commented Apr 14, 2022

Firebase SDK for Unity 8.9.0 is now live, which contains a fix for this issue...

Hi! I've just integrated Firebase Analytics to our project, using 8.9.0, on MacOs 12.3, and the issue still happens.
I see there are 3 release branches for 8.9.0, and 2 of them don't contain the fix yet.
Is it possible that the release was made from the wrong branch, or that the download link on the official page somehow points to a build that doesn't have this fix?

The DLL patch mentioned in this comment above worked for me, so that's why I assume I might have received a wrong delivery of the SDK.

@firebase firebase locked and limited conversation to collaborators May 8, 2022
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