inspector icon indicating copy to clipboard operation
inspector copied to clipboard

[BUG] Infinite loading screen when using MCPJam as a non-signed-up user

Open Jatlus opened this issue 4 months ago • 2 comments

Issue

As a first-time user who hasn't signed in or created an account, opening the app redirects to /playground (this is expected, first-run onboarding). But then it gets stuck on a full-screen loading spinner forever. There's no error, no timeout, and no way to escape it from the UI itself. The spinner is a fixed, full-screen overlay that covers the sidebar and header too.

How to reproduce

  1. Open the app in a fresh/incognito browser session (no existing account, not signed in).
  2. Don't sign in or create an account. Just let it load as a guest.
  3. It redirects to /playground automatically (expected first-run behavior).
  4. Instead of the Playground loading, you're stuck on a spinner indefinitely. Refreshing doesn't help, same result.
  5. The only way out is to manually type a different URL into the address bar (e.g. /tools) that isn't part of the app's own first-run redirect list. Clicking sidebar links like "Servers" just bounces you back into the loop.

Expected Behavior

Either the first-run onboarding flow completes normally for a guest user, or if it can't (no account yet), it should fail gracefully with an error/timeout and a way to dismiss it, not hang forever with no escape.

Screenshots

Image

Platform

  • Web (local dev via npm run dev, and likely reproduces in hosted/production too since the guest-provisioning path isn't Windows/local-specific)

Jatlus avatar Jul 21 '26 19:07 Jatlus

Hi @Jatlus! I'm Dosu and I'm helping the MCPJam team.

This looks like an authentication state deadlock in the guest user flow. Here's what I found in the code:

The hosted shell gate allows unauthenticated guests through by returning "ready" when !hasWorkOsUser && !isConvexAuthenticated [1]. However, the first-run onboarding redirect to /playground requires isAuthenticated to be true in hosted mode, along with several other conditions (!isLoadingRemoteProjects, areServersHydrated, a valid activeProjectId) [2]. If guest session provisioning fails or never completes, isAuthenticated stays false and the redirect conditions never resolve.

Meanwhile, the LoadingScreen component has no timeout or error handling — it simply spins indefinitely until unmounted [3], which explains why there's no escape from the UI.

This was likely surfaced (or made worse) by PR #2868, which added the LoadingScreen spinner during the NUX decision to avoid flashing the Home tab. If the NUX decision logic never resolves for guests, you're stuck forever. There's also been prior work in PR #2425 fixing a guest startup crash where queries fired before the user's DB row existed, pointing to ongoing timing issues in guest initialization.

To help narrow down the root cause, it'd be useful to check in a stuck state:

  1. Browser Network tab — are there failed calls to /api/web/guest-session or similar?
  2. Console errors during bootstrap injection or Convex auth
  3. React DevTools — what are the values of isAuthenticated, activeProjectId, areServersHydrated, and hostedShellGateState?

A potential fix path would be adding a timeout/fallback to LoadingScreen so it fails gracefully, and reconciling the shell gate's guest-ready state with the downstream isAuthenticated requirement so they don't contradict each other.

To reply, just mention @dosu.


Docs are dead. Just use Dosu.

Leave Feedback Ask Dosu about inspector Share Dosu with your team

dosubot[bot] avatar Jul 21 '26 20:07 dosubot[bot]

Hey @Jatlus , we'll look into this, thanks for reporting!

olartgabo avatar Jul 21 '26 21:07 olartgabo