GeezerVison is showing github.com — test(nuxt): Keep Nitro 2 WebSocket handlers resolvable with the managed tunnel by chan-mai · Pull Request #26082 · getsentry/sentry-javascript
Conversation
chan-mai
commented
Nov 4, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Why:
The tunnel plugin for Nitro 2, added in #25418, was adding a layer with a route of '' to the top of the h3 application stack. Because the h3 WebSocket handler resolution logic does not skip layers with a route of '', this layer matched all paths and prevented the upgrade hook of user-defined WebSocket handlers in the app from being called. Since this layer was removed in #26001, this PR makes no code changes. Only a test is added to prevent the same issue from recurring.
How to review:
The added tests register the plugin in an app that uses h3's createApp and createRouter with the router mounted at /, just like Nitro. They then verify that Nuxt's app.baseURL is passed as the tunnel's basePath, and that the resolved WebSocket handlers include the app's upgrade hook.
Unsure about:
E2E tests using WebSockets in an actual Nuxt app have not been added.
Refs #25991
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
luc122c reacted with thumbs up emoji
…websocket-route
# Conflicts:
# packages/nuxt/src/runtime/plugins/tunnel-legacy.server.ts
|
I have merged develop. The h3 layer that was modified in this PR was removed in #26001, so the fix itself is no longer necessary. To prevent the original issue from recurring, I have kept only the tests for the Nitro 2 tunnel plugin. These tests verify that app.baseURL is passed as the tunnel's basePath and that the app's WebSocket handler can still be resolved after registering the plugin.
|
s1gr1d reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
s1gr1d
changed the title
fix(nuxt): Keep Nitro 2 WebSocket handlers resolvable with the managed tunnel
test(nuxt): Keep Nitro 2 WebSocket handlers resolvable with the managed tunnel
Nov 9, 2026
s1gr1d
left a comment
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this test! Please update your PR description as it still references something more than the test. And also format the files (CI will fail here)
btw, I also updated the PR title to day test instead of fix
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
chan-mai reacted with eyes emoji
|
Thank you for the review. I have formatted the test files and updated the PR description to only mention the addition of the tests. I also fixed a test type error that occurred because the tunnel plugin function in develop no longer takes arguments.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
msonnb
pushed a commit
that referenced
this pull request
Nov 10, 2026
This PR adds the external contributor to the CHANGELOG.md file, so that
they are credited for their contribution. See #26082
Co-authored-by: s1gr1d <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
external
PR from an external contributor
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|