Repository navigation
Description
Summary
After upgrading a two-Mac setup to bb Desktop 0.42.0, the enrolled execution machine remained offline with Needs update · daemon protocol 176 · server protocol 180, even though both desktop apps were already updated. The primary desktop server's /install/bb-app.tgz endpoint returns HTTP 500 because host-package generation tries to copy a README.md missing from the installed application. The enrolled daemon should download the matching package, restart, and reconnect automatically.
Versions and environment
- Primary: bb Desktop 0.42.0,
/Applications/bb.app, macOS 26.6.2 (25G83), arm64; server protocol 180. - Enrolled machine: bb Desktop 0.42.0, macOS 27.0 (26A5425a), arm64; separate launchd-managed
bb-appdaemon still at 0.41.0, protocol 176. - Daemon runtime: Node 24.14.0, npm 11.9.0.
- Existing enrollment uses
host-daemon --auto-update, a private npm prefix under~/.bb-machines/<server>/npm, and its original pairing/configuration. - The local desktop targets the primary's custom HTTPS URL over Tailscale, on port 38886. The enrolled daemon listens locally on 38888.
- No provider-specific operation is needed to reproduce this.
- Live reproduction used installed release binaries. Source inspection used commit
7d5de7301544de3073996b4f8a8c33b311ecb2db; a source-built server was not tested.
Steps to reproduce
The smallest reproduced failure is the download endpoint on the running macOS desktop server; a second machine is not needed to exercise that failure.
-
Run the installed macOS bb Desktop 0.42.0 application as a server.
-
Set
BB_REPRO_SERVERto that server's reachable URL. For the observed setup this was an existing Tailscale HTTPS URL:BB_REPRO_SERVER='https://YOUR-PRIMARY.YOUR-TAILNET.ts.net:38886' curl -sS -i "$BB_REPRO_SERVER/install/version" curl -sS -i "$BB_REPRO_SERVER/install/bb-app.tgz"
-
Observe a successful version response followed by HTTP 500 for the package download.
-
On the primary Mac, check the expected source file:
test -f /Applications/bb.app/Contents/Resources/app.asar.unpacked/node_modules/bb-app/README.md \ && echo README_PRESENT || echo README_MISSING
Actual output:
README_MISSING. -
Inspect the primary's
~/.bb/logs/server.*.logfor theENOENTcopy failure below.
Observed upgrade impact: an existing launchd-managed 0.41.0 daemon with --auto-update reaches this endpoint after the primary starts serving protocol 180. Its download fails repeatedly, so it stays on protocol 176 and Settings → Machines shows it offline. This was observed in the existing installation; a fresh enrollment was not tested.
Expected vs actual
Expected: /install/bb-app.tgz serves the server-matched daemon package, allowing the existing enrolled machine to update and reconnect.
Actual response excerpts, reproduced again on September 5 after recovering the client:
HTTP/2 200
content-type: application/json
{"version":"0.42.0","protocolVersion":180}
HTTP/2 500
content-type: application/json
{"code":"internal_error","message":"Internal server error"}
Exact daemon error messages:
Failed to open session: 400 Bad Request - Daemon protocol version 176 does not match server protocol version 180
Package download failed: 500 Internal Server Error
Daemon self-update failed; keeping the current daemon running and retrying normally.
Evidence
Primary server log excerpt. Only the username and generated temporary-directory suffix are redacted:
ENOENT: no such file or directory, copyfile '/Applications/bb.app/Contents/Resources/app.asar.unpacked/node_modules/bb-app/README.md' -> '/Users/<user>/.bb/install-cache/host-package-<suffix>/README.md'
at async copyFile (node:internal/fs/promises:622:10)
at async materializePackagedHostPackage (.../bb-app/server/dist/start-server.js:322892:3)
at async buildArtifact (.../bb-app/server/dist/start-server.js:322932:34)
The observed exception matches the unconditional README copy in materializePackagedHostPackage, lines 208–211. The download route calls getArtifact() before returning the tarball, so this missing documentation file prevents the update payload from being served.
This packaged-host materialization path was introduced by PR #2969, merged September 2. The failure is confirmed in the released desktop installation; the build-stage reason the README is absent has not been independently traced.
Verified recovery: installed the official [email protected] npm package into the enrolled daemon's existing private prefix and gracefully restarted its launchd service. The daemon logged Connected to server, retained the same machine identity, and both machines appeared online with all 11 project associations intact. The primary's download endpoint still returns HTTP 500, so this is a workaround, not a fix for the server bug.
What you ruled out
- Tailscale reachability or TLS failure: SSH and HTTPS requests to the primary succeeded;
/install/versionreturned HTTP 200 and the daemon reached the server's protocol validation. - Disabled daemon auto-update: the existing launchd arguments include
--auto-update, and logs show repeated self-update attempts and backoff. - Merely an outdated desktop app: both desktop applications were already 0.42.0; the enrolled daemon is a separate installation.
- An npm install failure causing this incident: the updater fails at the server's package-download step, before npm installation. Manual installation of 0.42.0 succeeded.
- Broken pairing: the updated daemon reconnected using its original identity and configuration.
- Duplicate reports: searched open and closed issues/PRs for the README copy error, artifact endpoint, and daemon update failure. #2968 requests the host-only artifact feature; #2997 concerns skipped daemon startup with
BB_INSTALL_SKIP_SERVICE=1, which is a different failure.
Suggested priority and effort
High: blocks automatic recovery of an enrolled machine after its desktop primary upgrades to an incompatible protocol. Manual npm update is a verified workaround; project associations were preserved in this recovery. Effort needs triage, including coverage against the actual packaged macOS layout.
AGENT GENERATED - GPT-6 Astra High
Activity
bb-slop-cop commentedon Sep 5, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotBug· PriorityHigh· EffortLow· labelsdesktop,confirmed-reproREPRODUCED· root-cause confidence:highENOENTand an HTTP 500 response.confirmed-reproskillet07 commentedon Sep 5, 2026
Confirming this on a different setup — same root cause, but with a Linux host daemon rather than a second Mac, so the failure is not macOS-daemon-specific.
Environment
Server: bb Desktop 0.42.0 on macOS (arm64), reachable through its
*.getbb.appURL (Cloudflare-fronted)./install/version→{"version":"0.42.0","protocolVersion":180}.Enrolled machine: Ubuntu 24.04 (kernel 7.0.0-30-generic), x86_64. No bb Desktop there — a systemd user unit runs the daemon directly:
Daemon package stuck at 0.41.0 (protocol 176) against server protocol 180.
Observed
bb machine showon the client:{ "status": "disconnected", "lastRejectedProtocolVersion": 176 }Daemon log, repeating every ~30s:
bb machine retry-update <id>is accepted by the server but cannot help, since the daemon is already disconnected and its own retry path hits the same 500.Endpoint probe from two different networks (the server Mac itself and the Linux host), unauthenticated:
Only
/install/bb-app.tgzreaches a handler that throws; everything else stops at the auth wall. Server log on the Mac, matching #3118 exactly:And
README.mdis indeed absent from/Applications/bb.app/Contents/Resources/app.asar.unpacked/node_modules/bb-app/in the shipped 0.42.0 build (siblings present:app,dist,host-daemon,package.json,scripts,server,src,tsconfig.json,vitest.config.ts).Workaround for non-desktop enrolled machines
Since the daemon on Linux is a plain npm install, bypassing the server artifact works — install the version matching the server's from the public registry and restart the unit:
After that the daemon logs
Connected to serverandbb machine showreports"status": "connected","lastRejectedProtocolVersion": null.Suggestions
README.mdin the packagedbb-app(or makematerializePackagedHostPackagetolerate optional files — a missing README should not take down host enrollment).buildArtifactfailures return a diagnosable error rather than a genericinternal_error500; the daemon-side messagePackage download failed: 500gives an operator nothing to act on.Fix daemon updates when desktop packaging omits README (#3126)
Show the server's host package error in the machine installer (#4212)