yubikey-manager-qt icon indicating copy to clipboard operation
yubikey-manager-qt copied to clipboard

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

Open wAuner opened this issue 3 years ago • 6 comments

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.

wAuner avatar Feb 27 '21 14:02 wAuner

> 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

igorbernstein avatar Mar 01 '21 17:03 igorbernstein

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 avatar Mar 02 '21 14:03 fdennis

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.

fdennis avatar Mar 16 '21 13:03 fdennis

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 avatar Jun 04 '21 20:06 smaddock

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

smaddock avatar Jun 04 '21 20:06 smaddock

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

fdennis avatar Jun 07 '21 08:06 fdennis