Skip to content

Server move (connect mode) always fails at "Stop running work" on 0.45.0: freeze blocks the bb-account RPC needed for the source host's grant #4837

Description

@RichieGP

Summary

On bb 0.45.0, bb server move --to <machine> in connect mode fails within ~100 ms at step stop-work with "Server access provider failed". It reproduces every time (5 of 5 attempts, including after removing and re-enrolling the target from scratch).

Cause (from source at main)

runStopWork in apps/server/src/services/server-move/coordinator.ts:

  1. sets the write freeze (setServerMoveFrozen(deps.db, true)), then
  2. calls resolveServerHostGrant(move.sourceServerHost.id).

The source host here is a desktop-app server (primary host, connectMachineId: null), so it has no stored connect grant. The connect plugin's acquire() therefore calls createMachineCode(). Since #4253 (2026-09-29), that goes through the bb account plugin's RPC, POST /api/v1/plugins/bb-account/rpc/bb-account.v1.fetch. serverMoveFreezeMiddleware rejects it with 503 server_moving. hosted.ts maps the resulting AccountUnavailableError to MachineCodeError("not_paired"), and the move fails.

Server log, same second:

ERROR [server] Server error response {"method":"POST","path":"/api/v1/plugins/bb-account/rpc/bb-account.v1.fetch","status":503,"body":{"code":"server_moving",...}}
WARN  [server] [plugin:connect] server access failed: not_paired
WARN  [server] Server move failed {"step":"stop-work"}  Error: Server access provider failed

#4394 (bb 0.44.0, also a desktop-app source) got past stop-work, so this looks like a regression from moving connect onto the bb account plugin.

Side effect

resolve() writes the error to the source host's statusMessage, so the server machine then shows "Server access provider failed" in Settings → Machines.

Environment

  • bb desktop 0.45.0 on macOS (source server, primary host). Target: Linux VM, manual provider, enrolled with install.sh, bb 0.45.0.
  • bb Connect paired and healthy (bb connect status: paired, connected; bb account status: signed-in). bb connect machine-code works when the server isn't frozen.
  • --check passes (canMove: true).

Suggested fixes

  1. Resolve the source host's grant before setting the freeze, or
  2. exempt the bb account / connect plugin RPC routes from the freeze (they're already in CONNECT_HOLD_SOURCES and stay running during the move), and
  3. report the underlying error instead of "not_paired".

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-reproBug reproduced again from a clean trusted checkout; see linked reportconnectBuilt-in plugin: connectremoteMulti-device, LAN/tailnet access, notifications

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions