Repository navigation
fix(cli): Make local run and --verify messages say what to do - #2370
Merged
Merged
Conversation
A plain `local run` failed while the Local daemon held port 8969, and it holds that port for as long as it retains sessions. Without --port it now captures on a free port and says so, the same way --verify already does. An explicit --port still fails. --verify printed a crash, an early exit and a timeout twice, once as a warning and once as the error. It now prints them once. When a Wrangler Worker times out, it says the Worker needs a request and repeats the tunnel and DSN setup. The local docs now cover --verify. Co-Authored-By: Aditya Mathur <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
MathurAditya724
approved these changes
Nov 18, 2026
MathurAditya724
left a comment
Member
There was a problem hiding this comment.
Reviewed explicit-port precedence, daemon fallback, and verification failures. All 67 Local run/Wrangler tests pass, including real loopback sockets and child processes. No blocking issues found.
MathurAditya724
marked this pull request as ready for review
November 18, 2026 18:30
7 tasks done
MathurAditya724
added a commit
that referenced
this pull request
Nov 19, 2026
Follow-up to #2370. When the Local daemon holds port 8969, a plain `local run` captures on a free port. The daemon quietly drops anything that isn't session traffic, so an SDK that hard-codes 8969 (common in browser setups) lost every event with no hint why. The notice now gives the port it picked and says to read `SENTRY_SPOTLIGHT`. `--verify` already had a warning like this, so both now come from one small helper and can't drift apart. Before: ``` $ sentry local run -- npm run dev [info] The Local daemon is using port 8969, so this run captures on a free port. Add --session <name> to capture into the daemon instead. $ sentry local run --verify -- npm run dev [info] Port 8969 is in use; verifying on a free port ``` After: ``` $ sentry local run -- npm run dev [info] Port 8969 is held by the Local daemon, so this run listens on port 40017 instead. SDKs that hard-code 8969 won't reach it; make sure they read SENTRY_SPOTLIGHT. Add --session <name> to capture into the daemon instead. $ sentry local run --verify -- npm run dev [info] Port 8969 is in use, so this run listens on port 43321 instead. SDKs that hard-code 8969 won't reach it; make sure they read SENTRY_SPOTLIGHT. ``` <!-- junior-request-attribution:start --> via @MathurAditya724. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3Ac09543c99f130ceb0d3f1b55688bbf01 --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3Ac09543c99f130ceb0d3f1b55688bbf01) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3Ac09543c99f130ceb0d3f1b55688bbf01/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: Aditya Mathur <[email protected]>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three small fixes to what
sentry local runprints.Plain
local runafter a--sessionrun. The Local daemon keeps port 8969 while it holds retained sessions, which can be hours. A plainlocal runthen failed with "A Sentry Local daemon is using this port". The control-plane docs say a plain run can't use the daemon's receiver, since that receiver only takes session traffic, so attaching to it wasn't an option. Turning plain runs into hidden sessions would change what they keep after they exit. So a plain run without--portnow captures on a free port and says so, the same way--verifyalready does. An explicit--portthat the daemon holds still fails, because you asked for that port.--verifyprinted each failure twice, once as a warning and once as the error. It now prints it once.--verifywith Wrangler. A Worker sends nothing until it gets a request, so a timeout looked the same as broken setup. On a timeout it now says to send the Worker a request, and repeats the tunnel and DSN setup. The local docs also get a short--verifysection.Before:
After:
via @MathurAditya724.
--
View Session [Sentry]