Skip to content

Fix bridge connectivity, correct API auth, and add debug-status diagnostic#20

Open
sntxrr wants to merge 2 commits intongencokamin:mainfrom
sntxrr:main
Open

Fix bridge connectivity, correct API auth, and add debug-status diagnostic#20
sntxrr wants to merge 2 commits intongencokamin:mainfrom
sntxrr:main

Conversation

@sntxrr
Copy link
Copy Markdown

@sntxrr sntxrr commented Apr 11, 2026

Summary

  • Bridge was connecting to BlueBubbles via Tailscale URL instead of localhost:1234 — fixed bbctl run to use BB_LOCAL_URL. Since the bridge and BlueBubbles run on the same Mac, localhost is always correct; the Tailscale Serve URL is for remote clients (phone/tablet) only.
  • BlueBubbles API auth was using the wrong method — the server expects ?password= as a query param, not an Authorization header. Fixed in both debug-status.sh and the runner's startup health check.
  • bbctl download was broken — the GitHub releases endpoint no longer hosts binaries. Switched to nightly.link zips with proper unzip + Gatekeeper quarantine clear (xattr -d com.apple.quarantine).
  • Config save was unsafe for passwords with special characters — replaced heredoc with printf %q to safely shell-quote the password.
  • Removed invalid bbctl list command — this subcommand doesn't exist in bbctl v0.14+, causing a logged error on every bridge startup.
  • Fixed all setup-bb-beeper.sh name references throughout the script and README (file is setup-tailscale-serve.sh); fixed uninstall-bb-beeper.shuninstall.sh.
  • Bumped version to 1.1.0 and added a note to the script header clarifying the localhost vs. Tailscale URL split.

New: debug-status.sh

On-demand diagnostic snapshot covering all components:

  1. LaunchAgent registered + PID
  2. bbctl binary + bridge process + mautrix-imessage process
  3. bbctl whoami (Beeper login + bridge list)
  4. BlueBubbles API health check (correct ?password= auth)
  5. Tailscale status + serve config
  6. Config file (password redacted)
  7. Log file size + recent errors

Supports --log N (print last N log lines) and --errors (ERR lines only).

Test plan

  • Run bash setup-tailscale-serve.sh fresh on an Apple Silicon Mac — verify bbctl downloads and installs without Gatekeeper prompt
  • Confirm bridge starts and bbctl run receives bluebubbles_url=http://localhost:1234
  • Send a test iMessage and verify it appears in Beeper
  • Run bash debug-status.sh — all sections should show green, BlueBubbles API should return HTTP 200

🤖 Generated with Claude Code

sntxrr and others added 2 commits April 2, 2026 16:46
- setup-tailscale-serve.sh: idempotent script that installs bbctl, configures
  Tailscale Serve (HTTPS → localhost:1234), saves config, and installs a
  LaunchAgent for auto-start + keep-alive on login
- uninstall.sh: cleanly removes the LaunchAgent, Tailscale Serve config, and
  generated files
- README: documents both setup paths (Tailscale Serve + legacy), useful
  commands, and generated file layout
- .gitignore: exclude generated config.env and run-bridge.sh (contain secrets)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Key fixes:
- bbctl run now passes BB_LOCAL_URL (localhost:1234) not TAILSCALE_URL —
  bridge and BlueBubbles both run on the same Mac so localhost is correct
- BlueBubbles API auth uses ?password= query param, not Authorization header
- bbctl download switched from GitHub releases to nightly.link zips (the
  releases endpoint no longer hosts binaries); clears Gatekeeper quarantine
- Config save uses printf %q to safely handle special chars in password
- Removed invalid `bbctl list` command from startup diagnostics (no such
  subcommand in bbctl v0.14+)
- All setup-bb-beeper.sh name references corrected to setup-tailscale-serve.sh
- uninstall-bb-beeper.sh reference corrected to uninstall.sh

New: debug-status.sh — on-demand snapshot of all components (LaunchAgent,
bridge processes, Beeper login, BlueBubbles API, Tailscale serve, config,
log errors). Supports --log N and --errors flags.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant