Fix hosted callback 500 from missing join import#1590
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe path module import in the server index file has been updated to include the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
joinfrompathinmcpjam-inspector/server/index.ts/callbackRoot cause
Production sign-in on
app.mcpjam.comredirects to/callback, which goes through the SPA fallback inserver/index.ts. That code callsjoin(...)to loaddist/client/index.html, butjoinwas never imported, so the fallback throws at runtime.Railway logs for the production service show:
Error serving index.html: ReferenceError: join is not definedRepro
https://app.mcpjam.com/returns 200https://app.mcpjam.com/callback?code=testreturns 500 before this fix/fooalso return 500 for the same reasonTesting
join(...)without importing it before this changeNote
Low Risk
Low risk: adds a missing
joinimport to fix a runtimeReferenceErrorin the production SPA fallback path with no behavior changes beyond preventing 500s on deep links.Overview
Fixes hosted production deep links (e.g.
/callback) returning 500 by importingjoinfrompathinmcpjam-inspector/server/index.ts, preventing the SPA fallbackindex.htmlloader from throwingReferenceError: join is not defined.Written by Cursor Bugbot for commit b311afa. This will update automatically on new commits. Configure here.