electron / osx-sign

Codesign Electron macOS apps
BSD 2-Clause "Simplified" License
558 stars 96 forks source link

Running electron-oxs-sign on MacBook Air (M2) prevent python from working thereafter #278

Open gizzmo123456 opened 1 year ago

gizzmo123456 commented 1 year ago

Issue

running electron-osx-sign <myApp.app> --identity="Apple Distribution: <identity>" seems to break python after running, resulting in a python reinstall every time.

Steps

Other info

This also occurs when running via electron-forge by setting the osxSign value in forge.config.json

Mac Specs

Model Name:                      MacBook Air
Model Identifier:               Mac14,2
Chip:                               Apple M2
Total Number of Cores:      8 (4 performance and 4 efficiency)
Memory:                             16 GB
System Firmware Version:   7459.141.1
OS Loader Version:              7459.141.1

Node

Version 16.19.0 osx-sign 1.0.4

gizzmo123456 commented 1 year ago

Had to go through this again. This is the error I get when I run Python3

dyld[14128]: Library not loaded: '/Library/Frameworks/Python.framework/Versions/3.10/Python'
  Referenced from: '/Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10'
  Reason: tried: '/Library/Frameworks/Python.framework/Versions/3.10/Python' (code signature in <XXXXXXXX-XXXX-XXXX-XXXX-137B6196A0BF> '/Library/Frameworks/Python.framework/Versions/3.10/Python' not valid for use in process: mapping process and mapped file (non-platform) have different Team IDs), '/System/Library/Frameworks/Python.framework/Versions/3.10/Python' (no such file)
zsh: abort      python3

In addition the file /Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10 was last modified when I signed my app and it contains my Team-Id, PList and other signing info.

Furthermore if i start python via /Library/Frameworks/Python.framework/Versions/3.10/Resources/Python.app/Contents/MacOS/Python its working just fine.

murtaza-spec-dev commented 12 months ago

I ran into this a few days ago. The problem for me was that I had chokidar part of my dependencies when it should have been part of the dev dependencies.