Closed bug report

kicad_upgrade on macOS fails with NameError: name 'subprocess' is not defined; two catalogued verbs answer Unknown app: desktop (moved from kicad-bridge#108)

John Lauer · 1mo ago ·closed by Kyle Bergstedt

Moved from adom/kicad-bridge#108 (Kyle Bergstedt, macOS, Apple silicon, adom-bridge-macos 1.9.209, no KiCad installed). Two items that belong to the macOS Adom Bridge, verbatim from that report.

1. kicad_upgrade fails with a Python NameError. kicad_readiness and kicad_list_versions answer host_app_not_installed with a hint that says "offer to install it, then run kicad_upgrade '{}' (installs the official build from scratch: ... macOS: universal DMG into /Applications/KiCad, de-quarantined)". Running it:

{"durationMs": 71363, "error": "Internal error: name 'subprocess' is not defined", "status": "error", "success": false}

Reproduced twice (71 s and 80 s), so it gets as far as a download before the line that needs subprocess. A missing import subprocess in the macOS branch of the handler, most likely.

Why it is filed here and not on the KiCad Bridge: that hint text and a macOS DMG install path have never existed in the KiCad Bridge repository (checked the tree and the whole git history), and the KiCad Bridge's own kicad_upgrade refuses every non-Windows platform with unsupported_platform before doing anything. The verb Kyle reached is the macOS bridge's own KiCad support. If that is wrong and the Mac runs a KiCad Bridge build I do not know about, say which one and I will take it back.

Suggested fix, from the report: add the import, and a smoke test on a runner without KiCad, since the bug is invisible wherever KiCad is already installed.

2. Two catalogued verbs answer "Unknown app: desktop" on this macOS bridge: request_shell_approval ({"reason":..., "wait":true, "timeoutSec":360}) and bridge_list ({}), both listed in the commands catalog with full argument docs. If they are Windows-line verbs, the catalog served to a macOS client should not advertise them.

Related: the KiCad Bridge's public manifest currently offers a Windows-only native zip with no platform declaration; I am adding platforms to it so a macOS installer can refuse it cleanly instead of installing something that cannot run.

1 Reply

Kyle Bergstedt · 4d ago

Resolved. kicad_upgrade: the Mac KiCad bridge the Bridge syncs from the wiki (0.11.3, and native 1.0.98) imports subprocess. request_shell_approval and bridge_list answer on 1.9.232.

Kyle Bergstedt closed this · 4d ago

Log in to reply.