SSyncropel Docs

Troubleshooting connection issues

The ten connection states Studio at syncropel.com can show when it talks to an instance, the fix for each, and a reference of common error codes.

When Studio can't reach an instance, the connection is in exactly one of ten states. Every state has a clear sign on screen and a short fix. This page maps each state to its symptom and remedy so you can resolve issues without opening DevTools.

Quick diagnose

For a live snapshot of what the browser knows about its connection, visit /diagnose. The page shows:

  • Current connection state + active credential
  • Recent API errors (the last 20 in this session)
  • Browser feature checklist (IndexedDB, Web Crypto, Service Worker)
  • Reset-pairing button (forgets the credential, redirects to re-pair)
  • A copy-paste JSON snapshot for support tickets

The banner at the top of the workspace always links here ("diagnose").

Failure modes

1. Instance offline

Symptom: Banner says "Instance offline". The dashboard shows the offline panel with a spl serve hint.

Why: /health is timing out or refused on every candidate URL.

Fix: spl serve in your terminal. Verify with curl http://localhost:9100/health. If the instance was running but stopped, spl serve --status will tell you whether the PID file is orphaned.

2. Pair required

Symptom: Banner says "Pair required". The dashboard shows the pairing screen.

Why: Instance has auth.required = true (the default) and the browser has no stored credential for this instance's DID.

Fix (fastest, no CLI): if you kept a key to this place, open + add a connection and paste the whole line; you are back in as the same person (Keeping your access). Members and guests without the CLI should always start here.

Fix (operator with the CLI): Run spl pair --device browser-<name> --scopes admin. The CLI's first line of output is a single clickable URL of the form https://syncropel.com/pair#<encoded-payload>. Click it (or copy into your browser). The page decodes the link, verifies the token, stores the credential, and redirects you to /tasks, all without typing or scanning anything. The token rides in the URL fragment (after the #), which never reaches any server: it stays inside your browser.

Fix (no clickable URL): paste the QR or payload into the pairing card. Add --scopes admin if you want access to admin-only routes.

3. Pairing invalid (token_invalid)

Symptom: Banner says "Pairing invalid". The dashboard shows the expired-pairing screen.

Why: Stored credential is rejected by the instance, usually because the instance's data was wiped since pairing (so its DID changed) or the token was revoked.

Fix: if you kept a key, paste it into + add a connection first; a revoked or expired bearer does not spend your key, and you come back under the same grant. Otherwise open /diagnose and click "Reset pairing", then re-pair with spl pair --device browser-<name> --scopes admin and click the printed URL.

4. Limited (scope insufficient): partial_access

Symptom: Banner is amber and says "Limited (scope insufficient)". Some panels render; others show an inline error panel saying the token is missing a specific scope.

Why: /v1/health succeeds + the credential is valid, but two or more API endpoints have returned 403 SCOPE_FORBIDDEN in the last 60 seconds. The token is real but doesn't have the scopes this view needs.

Fix: Re-pair with broader scopes. The error panel shows the exact command to copy:

spl pair --device browser --url <instance-url> --scopes admin

Or scope it more narrowly to the resources you actually need.

5. Browser blocked (PNA / CORS)

Symptom: Banner says "Browser blocked". The dashboard shows a panel explaining the block, with a link to the pre-flight diagnostic.

Why: Chrome's Private Network Access policy blocks https://syncropel.com from fetching http://127.0.0.1 without an explicit ACK from the instance. Older versions of the instance don't answer that browser check.

Fix: Upgrade the instance: curl -sSf https://get.syncropic.com/spl | sh && spl stop && spl serve. Or grant PNA permission manually in chrome://settings/content/insecureprivatenetwork.

6. Multiple instances reachable

Symptom: Banner says "Connecting…" and a card appears listing the instances it found.

Why: Two or more addresses answered /health (this machine, your LAN, or a URL you entered). You have to pick one.

Fix: Click the instance you want. The browser remembers your choice, so later loads skip the chooser.

7. Mobile cold start

Symptom: On a phone, the page shows welcome cards (pair by QR, paste a URL, or browse).

Why: Phones cannot run a Syncropel instance. The page offers pairing options instead.

Fix: Pair via QR from a desktop / laptop instance. Or paste a URL to an instance you've reached on your LAN.

8. Connected (insecure)

Symptom: Amber banner says "DEV MODE · auth bypassed".

Why: Instance was started with auth.required = false, typically during development with --insecure-localhost. Functional but not safe to expose.

Fix: Restart with auth.required = true (the default) once you've finished dev work. Or leave as-is for ephemeral test instances on --port 9200 --memory.

9. Connected (secure)

Symptom: Green dot. Banner says Connected to <instance-label>.

Why: Healthy. /health 200 + credential injected + recent /v1/* queries succeeded.

Fix: None. This is the happy path.

10. Connecting / generic unreachable

Symptom: Banner says "Connecting…" and the dashboard renders a generic unreachable panel.

Why: Some other problem reaching the instance, such as it being unreachable, blocked by CORS, too old, or returning an error.

Fix: Open /diagnose → "Recent API errors" to see the underlying code + message from the instance. Most often it's either an outdated instance (upgrade it), a missing CORS allow entry (spl config auth-set-cors-origins ...), or a network glitch.

Common error codes (HTTP 4xx)

The instance returns a structured error envelope on every 4xx response:

{
  "object": "error",
  "code": "SCOPE_FORBIDDEN",
  "message": "token missing required scope 'admin' for this route",
  "required_scope": "admin"
}

The workspace shows these with a suggested fix you can copy.

CodeMeaningRemediation
AUTH_REQUIREDNo bearer token sentspl pair --device browser-<name> --scopes admin and retry
AUTH_INVALIDToken rejected (expired, revoked, or instance changed)Reset pairing on /diagnose, then re-pair
SCOPE_FORBIDDENToken valid but missing required scopeRe-pair with --scopes admin (or narrower scope per use)
NOT_FOUNDEndpoint not available on this instanceUpgrade the instance or stop using this view
CORSOrigin not on instance's CORS allowlistspl config auth-set-cors-origins https://syncropel.com http://localhost:3000 && spl stop && spl serve
PNABrowser blocked the cross-origin → loopback fetchUpgrade the instance or grant PNA permission in browser
NETWORKCouldn't reach the instancespl serve --status and verify with curl http://localhost:9100/health
TIMEOUTRequest timed outInstance under load or unreachable; retry; check spl doctor
INTERNALInstance returned 5xxInspect ~/.syncro/logs/spl.log; file an issue if reproducible

See also

On this page