Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
c0e51be2
Unverified
Commit
c0e51be2
authored
Nov 14, 2025
by
Sebastian "Sebbie" Silbermann
Committed by
GitHub
Nov 14, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't use inspector frontend URLs from other processes (#86082)
parent
6863a2bb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
15 deletions
+12
-15
hot-reloader-turbopack.ts
packages/next/src/server/dev/hot-reloader-turbopack.ts
+6
-7
hot-reloader-webpack.ts
packages/next/src/server/dev/hot-reloader-webpack.ts
+6
-8
No files found.
packages/next/src/server/dev/hot-reloader-turbopack.ts
View file @
c0e51be2
import
type
{
Socket
}
from
'net'
import
{
mkdir
,
writeFile
}
from
'fs/promises'
import
*
as
inspector
from
'inspector'
import
{
join
,
extname
,
relative
}
from
'path'
import
{
pathToFileURL
}
from
'url'
...
...
@@ -78,7 +79,6 @@ import { generateEncryptionKeyBase64 } from '../app-render/encryption-utils-serv
import
{
isAppPageRouteDefinition
}
from
'../route-definitions/app-page-route-definition'
import
{
normalizeAppPath
}
from
'../../shared/lib/router/utils/app-paths'
import
type
{
ModernSourceMapPayload
}
from
'../lib/source-maps'
import
{
getNodeDebugType
,
getParsedNodeOptions
}
from
'../lib/utils'
import
{
isMetadataRouteFile
}
from
'../../lib/metadata/is-metadata-route'
import
{
setBundlerFindSourceMapImplementation
}
from
'../patch-error-inspect'
import
{
getNextErrorFeedbackMiddleware
}
from
'../../next-devtools/server/get-next-error-feedback-middleware'
...
...
@@ -814,15 +814,14 @@ export async function createHotReloaderTurbopack(
}
let
devtoolsFrontendUrl
:
string
|
undefined
const
nodeOptions
=
getParsedNodeOptions
()
const
nodeDebugType
=
getNodeDebugType
(
nodeOptions
)
if
(
nodeDebugType
)
{
const
debugPort
=
process
.
debugPort
const
inspectorURLRaw
=
inspector
.
url
()
if
(
inspectorURLRaw
!==
undefined
)
{
const
inspectorURL
=
new
URL
(
inspectorURLRaw
)
let
debugInfo
try
{
// It requires to use 127.0.0.1 instead of localhost for server-side fetching.
const
debugInfoList
=
await
fetch
(
`http://
127.0.0.1:
${
debugPor
t
}
/json/list`
`http://
${
inspectorURL
.
hos
t
}
/json/list`
).
then
((
res
)
=>
res
.
json
())
debugInfo
=
debugInfoList
[
0
]
}
catch
{}
...
...
packages/next/src/server/dev/hot-reloader-webpack.ts
View file @
c0e51be2
...
...
@@ -13,6 +13,7 @@ import {
getOriginalStackFrames
,
}
from
'./middleware-webpack'
import
{
WebpackHotMiddleware
}
from
'./hot-middleware'
import
*
as
inspector
from
'inspector'
import
{
join
,
relative
,
isAbsolute
,
posix
,
dirname
}
from
'path'
import
{
createEntrypoints
,
...
...
@@ -81,7 +82,6 @@ import type { HmrMessageSentToBrowser } from './hot-reloader-types'
import
type
{
WebpackError
}
from
'webpack'
import
{
PAGE_TYPES
}
from
'../../lib/page-types'
import
{
FAST_REFRESH_RUNTIME_RELOAD
}
from
'./messages'
import
{
getNodeDebugType
,
getParsedNodeOptions
}
from
'../lib/utils'
import
{
getNextErrorFeedbackMiddleware
}
from
'../../next-devtools/server/get-next-error-feedback-middleware'
import
{
getDevOverlayFontMiddleware
}
from
'../../next-devtools/server/font/get-dev-overlay-font-middleware'
import
{
getDisableDevIndicatorMiddleware
}
from
'../../next-devtools/server/dev-indicator-middleware'
...
...
@@ -861,17 +861,15 @@ export default class HotReloaderWebpack implements NextJsHotReloaderInterface {
this
.
versionInfo
=
await
this
.
tracedGetVersionInfo
(
startSpan
)
const
nodeOptions
=
getParsedNodeOptions
()
const
nodeDebugType
=
getNodeDebugType
(
nodeOptions
)
if
(
nodeDebugType
&&
!
this
.
devtoolsFrontendUrl
)
{
const
debugPort
=
process
.
debugPort
const
inspectorURLRaw
=
inspector
.
url
()
if
(
inspectorURLRaw
!==
undefined
)
{
const
inspectorURL
=
new
URL
(
inspectorURLRaw
)
let
debugInfo
try
{
// It requires to use 127.0.0.1 instead of localhost for server-side fetching.
const
debugInfoList
=
await
fetch
(
`http://
127.0.0.1:
${
debugPor
t
}
/json/list`
`http://
${
inspectorURL
.
hos
t
}
/json/list`
).
then
((
res
)
=>
res
.
json
())
// There will be only one item for current process, so always get the first item.
debugInfo
=
debugInfoList
[
0
]
}
catch
{}
if
(
debugInfo
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment