Yubico / yubikey-manager-qt

Cross-platform application for configuring any YubiKey over all USB interfaces.
https://developers.yubico.com/yubikey-manager-qt/
BSD 2-Clause "Simplified" License
237 stars 29 forks source link

macOS: app crash on boot: Python cannot be opened because of a problem #261

Open wAuner opened 3 years ago

wAuner commented 3 years ago

Running Big Sur 11.2.2

Whenever I boot my system after I installed the yubikey manager from the yubico website (currently version 1.1.5) I get a crash report report from python, caused by the yubikey manager. Here is the log:

Process:               Python [1117]
Path:                  /Applications/YubiKey Manager.app/Contents/Frameworks/Python.framework/Versions/3.8/Resources/Python.app/Contents/MacOS/Python
Identifier:            Python
Version:               3.8.2 (3.8.2)
Code Type:             X86-64 (Native)
Parent Process:        mbfloagent [650]
Responsible:           mbfloagent [650]
User ID:               501

Date/Time:             2021-02-27 15:24:28.197 +0100
OS Version:            macOS 11.2.2 (20D80)
Report Version:        12
Bridge OS Version:     5.2 (18P4347)

Time Awake Since Boot: 250 seconds

System Integrity Protection: enabled

Crashed Thread:        0

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    DYLD, [0x1] Library missing

Application Specific Information:
dyld: launch, loading dependent libraries

Dyld Error Message:
  dyld: Using shared cache: 77B63435-1866-32DD-98A1-47090B666EFA
Library not loaded: /Library/Frameworks/Python.framework/Versions/3.8/Python
  Referenced from: /Applications/YubiKey Manager.app/Contents/Frameworks/Python.framework/Versions/3.8/Resources/Python.app/Contents/MacOS/Python
  Reason: image not found

Binary Images:
       0x107f80000 -        0x107f80fff +com.yubico.python (3.8.2 - 3.8.2) <A89E016E-52A7-3CC7-A797-C913CA1EADB6> /Applications/YubiKey Manager.app/Contents/Frameworks/Python.framework/Versions/3.8/Resources/Python.app/Contents/MacOS/Python
       0x1105b9000 -        0x110654fff  dyld (832.7.3) <0D4EA85F-7E30-338B-9215-314A5A5539B6> /usr/lib/dyld
    0x7fff204eb000 -     0x7fff20986fff  com.apple.CoreFoundation (6.9 - 1774.101) <2A0E160E-9EE6-3B23-8832-6979A16EC250> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation

There seems to be a problem with a dynamic library that can't be found.

igorbernstein commented 3 years ago
> ls /Library/Frameworks/Python.framework/Versions/3.8/Python
ls: /Library/Frameworks/Python.framework/Versions/3.8/Python: No such file or directory

It looks like Big Sur moved python3 to developer tools and its no longer shipped with the OS. Which probably breaks this bundling? https://github.com/Yubico/yubikey-manager-qt/blob/077f6e835d2b3908c44cb6f67ca8c93f38a580aa/.github/workflows/macOS.yml#L133-L137

fdennis commented 3 years ago

Hi, Thanks for reporting this. @igorbernstein thank you for doing some investigation. The log does also mention Referenced from: /Applications/YubiKey Manager.app/Contents/Frameworks/Python.framework/Versions/3.8/Resources/Python.app/Contents/MacOS/Python which might suggest that the Python framework we are building is causing this. That makes sense since Python 3.9.1 is the first version to support Big Sur and in the latest release of YubiKey Manager GUI we have Python 3.8.3, if I am not mistaken. We will most likely try with Python 3.9.1+ for the next release and see if that solves the issue.

fdennis commented 3 years ago

Please try updating to the latest version, 1.2.0, and see if that helps. We have a newer version of Python there that will hopefully solve this issue. Reopen if it does not.

smaddock commented 3 years ago

I'm getting this error in version 1.2.3 (Python 3.9.2). It looks like the Python.app is referencing the non-existant OS library instead of the bundled library.

Process:               Python [95978]
Path:                  /Applications/YubiKey Manager.app/Contents/Frameworks/Python.framework/Versions/3.9/Resources/Python.app/Contents/MacOS/Python
Identifier:            com.yubico.python
Version:               3.9.2 (3.9.2)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Python [95978]
User ID:               501

Date/Time:             2021-06-04 14:45:01.499 -0600
OS Version:            macOS 11.4 (20F71)
Report Version:        12
Bridge OS Version:     5.4 (18P4663)
Anonymous UUID:        E16D5099-88AE-E296-ED8C-8D7D09E3931B

Time Awake Since Boot: 5500 seconds

System Integrity Protection: enabled

Crashed Thread:        0

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    DYLD, [0x1] Library missing

Application Specific Information:
dyld: launch, loading dependent libraries

Dyld Error Message:
  dyld: Using shared cache: 4A889CE9-8D7E-304E-A5F7-84D819B0BF9C
Library not loaded: /Library/Frameworks/Python.framework/Versions/3.9/Python
  Referenced from: /Applications/YubiKey Manager.app/Contents/Frameworks/Python.framework/Versions/3.9/Resources/Python.app/Contents/MacOS/Python
  Reason: image not found

Binary Images:
       0x10ae18000 -        0x10ae1bfff +com.yubico.python (3.9.2 - 3.9.2) <44BCD2F5-7DAE-3729-80BE-9F5587ED0AB3> /Applications/YubiKey Manager.app/Contents/Frameworks/Python.framework/Versions/3.9/Resources/Python.app/Contents/MacOS/Python
       0x11936e000 -        0x119409fff  dyld (852) <1AC76561-4F9A-34B1-BA7C-4516CACEAED7> /usr/lib/dyld
    0x7fff20652000 -     0x7fff20aeffff  com.apple.CoreFoundation (6.9 - 1776.103) <01EFB7F8-BCE6-32DF-A0B8-02F9027F882C> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
smaddock commented 3 years ago

Looks like I don't have permission to re-open.

fdennis commented 3 years ago

@smaddock Thanks for letting us know! I have reopened.