Repository navigation
Description
Is there an existing issue for this?
- I have checked for existing issues
- I have reviewed the documentation
- I am using the latest SDK release
How do you use Sentry?
Sentry SaaS (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
11.11.0
Framework Version
Next.js 16.4.6, Node.js 26.13.0, Windows 11 with Windows Terminal as the default terminal
Link to Sentry event
No response
Reproduction Example/SDK Setup
// next.config.mjs, in a git repo
import { withSentryConfig } from '@sentry/nextjs/config';
export default withSentryConfig({}, { silent: true, telemetry: false });There's no release.name, no SENTRY_RELEASE and no CI commit variable, so the release name falls back to getGitRevision().
Steps to Reproduce
- On Windows, run
next devin that app. - Stop it. I ended the dev server's child process. Ctrl+C goes through the same
handleSessionStop()andflushDetached()innext/dist/cli/next-dev.js. - Watch the screen right after it stops.
Expected Result
No window. The git lookup should run hidden, the way gitRevision() in the bundler plugins has since getsentry/sentry-javascript-bundler-plugins#941.
Actual Result
A Windows Terminal window flashes up each time next dev stops.
When it stops, Next spawns next/dist/telemetry/detached-flush.js with detached: true to send its session-stopped event, so that process has no console. It loads next.config.mjs, withSentryConfig calls getGitRevision(), and execSync('git rev-parse HEAD') starts cmd.exe without windowsHide. Windows gives cmd.exe a new console, and that's the window. Turning off Next's telemetry doesn't help: next telemetry status says Disabled on my machine and the flush process still runs.
I first caught it with a window watcher on a real app. The window belonged to cmd.exe /d /s /c "git rev-parse HEAD", whose parent was node next\dist\telemetry\detached-flush.js dev ... under next dev -p 3077.
To check the current versions, I ran the repro above with a small preload script (NODE_OPTIONS=--require) that logs child_process calls and forces windowsHide on, so nothing opened while I tested:
pid 28680 next/dist/bin/next spawn node next/dist/telemetry/detached-flush.js dev <app> _events_28680_4c480dba
options: {"windowsHide":true,"detached":true,"shell":false}
pid 69848 telemetry/detached-flush.js execSync git rev-parse HEAD
options: {"stdio":["ignore","pipe","ignore"]}
at @sentry/nextjs/build/cjs/config/withSentryConfig/buildTime.js:54
at @sentry/nextjs/build/cjs/config/withSentryConfig/getFinalConfigObjectUtils.js:21
at @sentry/nextjs/build/cjs/config/withSentryConfig/getFinalConfigObject.js:10
at @sentry/nextjs/build/cjs/config/withSentryConfig/index.js:26
The dev server process makes the same call when it starts, but it shares the console it was started from, so no window opens there.
Additional Context
The call is here:
sentry-javascript/packages/nextjs/src/config/withSentryConfig/buildTime.ts
Lines 88 to 91 in 4316c26
| gitRevision = childProcess | |
| .execSync('git rev-parse HEAD', { stdio: ['ignore', 'pipe', 'ignore'] }) | |
| .toString() | |
| .trim(); |
The SvelteKit package has the same one:
sentry-javascript/packages/sveltekit/src/vite/sourceMaps.ts
Lines 367 to 370 in 4316c26
| releaseFallback = child_process | |
| .execSync('git rev-parse HEAD', { stdio: ['ignore', 'pipe', 'ignore'] }) | |
| .toString() | |
| .trim(); |
The fix would be the same as getsentry/sentry-javascript-bundler-plugins#941: add windowsHide: true to both execSync calls. It has no effect on macOS or Linux.
Until then, setting release.name or SENTRY_RELEASE, or release: { create: false }, skips the lookup.
I can send a PR for both, with a test like the one in that PR, if you'd like.
Priority
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.
Metadata
Metadata
Assignees
Projects
- StatusShow more project fieldsNo status
Activity
linear-code commentedon Nov 10, 2026
JS-4091
nicohrubec commentedon Nov 10, 2026
Hey, thanks for the report. It's fixed with the next release.
fix(nextjs,sveltekit): Hide git revision console on Windows (getsentr…
github-actions commentedon Nov 10, 2026
A PR closing this issue has just been released 🚀
This issue was referenced by PR #26223, which was included in the 11.12.0 release.