SSL_CERT_FILE not set for non-bundle entrypoints; HTTPS fails with CERTIFICATE_VERIFY_FAILED
Repro
Fresh install on macOS 13+, no SSL_CERT_FILE in env, no ElevenLabs key configured (so Kokoro is the active backend).
$ /Applications/Heard.app/Contents/MacOS/python -m heard doctor
...
Synth
· backend Kokoro (no ElevenLabs key configured)
✗ synth URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED]
certificate verify failed: unable to get local issuer
certificate (_ssl.c:1032)>
Persona (Haiku)
✗ anthropic key (HTTPS fails the same way before key auth even runs)
Same failure surfaces as the toast "Heard — couldn't generate audio. Run heard doctor for details."
Cause
packaging/app_entry.py sets SSL_CERT_FILE to certifi.where() before any HTTPS-using import — but that file only runs as the menu-bar bundle's main entry. Other entrypoints bypass it entirely:
python -m heard <cmd>— CLI (doctor, demo, say, …)python -m heard.hook <agent>— per-event hook subprocesspython -m heard.daemon— LaunchAgent / dev runs (also seen in the wild as a stale process; can't repro deliberately)
The frozen Python in the .app has no system CA, so any HTTPS call from those entrypoints fails.
Fix
Mirror the certifi setup at the top of heard/__init__.py so any import path is safe. PR #2 opened.
Workaround for affected users
launchctl setenv SSL_CERT_FILE /Applications/Heard.app/Contents/Resources/lib/python3.13/certifi/cacert.pem
launchctl setenv REQUESTS_CA_BUNDLE /Applications/Heard.app/Contents/Resources/lib/python3.13/certifi/cacert.pem
killall Heard ; open /Applications/Heard.app
Env
- macOS 26 (also reported on 13+)
- Heard v0.4 (pyproject
0.4.2, the bundled__version__says0.1.0— separate cosmetic issue)
Fixed by #2 (commit d8ad8ee). Thanks @arthursolwayne — clean repro, clean patch, tests included. Will ship in v0.4.3.