Skip to content

bb connect: "Add a machine" always fails — createMachineCode rejects the UI's input (rpc input validation failed) #833

Closed

Description

@amrtawfik160

bb connect: "Add a machine" always fails — createMachineCode rejects the UI's input

bb-app version: 0.0.32 (desktop, macOS arm64; also reproduced against a paired remote server via *.getbb.app)

Summary

Settings → Machines → Add a machine never completes. The dialog shows rpc input validation failed (with a "Try again" button that loops), so no machine-installer command is ever generated and remote machines cannot be enrolled.

Server log

[plugin:connect] rpc createMachineCode failed: rpc input validation failed

(Reproduces every time the dialog is opened.)

Root cause

The connect plugin's RPC contract declares createMachineCode with a null() input schema (it must be called with no argument):

// builtin-plugins/connect/dist/server.js
createMachineCode: { input: external_exports.null(), output: machineCodeSchema },

But the frontend ("Add a machine" in app/dist SettingsView) invokes it with a non-null argument, which fails the server-side null() validation before the request is ever made to getbb.app.

Evidence it's only the UI

  • The CLI path bb machine join-code (which calls the machine-code path with the correct/empty input) succeeds and returns a code.
  • Calling the underlying gate endpoint directly with the paired credential works:
    POST https://getbb.app/api/connect/machine-code with header x-bb-connect-machine: <credential> → HTTP 200 { code, expiresInMs, serverUrl }.

So the getbb.app service and the RPC handler are both fine — only the frontend call site sends the wrong shape.

Impact

Remote machine enrollment via the UI is fully blocked on 0.0.32. Because bb machine join-code produces a direct-pairing code (not a getbb.app-gate credential), hand-enrolling a daemon through the gate returns 403 … machine not authorized at /internal/hosts/enroll. There is no working path to add a machine.

Suggested fix

Have the "Add a machine" frontend call createMachineCode with null / no argument (matching the contract), or relax the RPC input schema to accept the object the UI currently sends.

Activity

  1. SawyerHood commented on Jul 21, 2026

    @SawyerHood
    Collaborator

    Fixed this in the release that just went out! Thanks for the report

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions