Repository navigation
fix: Module injection silently fails on Windows - #58
Merged
Merged
Conversation
timfish
force-pushed
the
fix/windows-resolve-file-url
branch
from
September 24, 2026 12:08
a229a6d to
efa372f
Compare
module-details-from-path so Windows resolves modules
timfish
force-pushed
the
fix/windows-resolve-file-url
branch
from
September 24, 2026 12:13
6fc7b5d to
ae23710
Compare
timfish
force-pushed
the
fix/windows-resolve-file-url
branch
from
September 24, 2026 12:18
ae23710 to
9fa75a4
Compare
module-details-from-path so Windows resolves modules
AbhiPrasad
approved these changes
Sep 24, 2026
This was referenced Sep 24, 2026
Merged
isaacs
pushed a commit
to getsentry/sentry-javascript
that referenced
this pull request
Sep 24, 2026
) - Fixes #24695 Bumps `@apm-js-collab/tracing-hooks` to 0.13.3 in `@sentry/server-runtime-injection` to pick up the Windows fix for orchestrion diagnostics-channel injection (apm-js-collab/tracing-hooks#58). Without it, sync `Module.registerHooks()` instrumentation silently no-ops on Windows and Node 24.13+.
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.
On Windows the resolve hook never matched any module:
resolveFromURLpassed afile://URL tomodule-details-from-path, which splits onpath.sep, sonode_moduleswas never found and no transformer was registered. This converts the URL withfileURLToPathfirst (guarding non-file URLs) and uses the nativebasedirdirectly, which fixes the syncModule.registerHooks()path on Node 24.13+ and keeps the async path working.The new tests resolve a Windows-style file URL and a
node:URL.module-details-from-pathreadspath.seponce when it loads, so the Windows-style test also passes against the old code on POSIX. It only catches this bug on a Windows runner.