GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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

@chan-mai chan-mai commented Nov 4, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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
All reactions
  • 👍 1 reaction
@chan-mai
fix(nuxt): Keep Nitro 2 WebSocket handlers resolvable with the manage…
bafb5a2
…d tunnel
@chan-mai
chan-mai requested a review from a team as a code owner November 4, 2026 07:16
@chan-mai
chan-mai requested review from chargome and s1gr1d and removed request for a team November 4, 2026 07:16
@github-actions github-actions Bot added the external PR from an external contributor label Nov 4, 2026
@chan-mai chan-mai mentioned this pull request Nov 4, 2026
@sentry/nuxt 11.10.0 tunnel plugin causes Nitro 2 WebSocket handlers to fail to resolve #25991
Closed
3 tasks done
@andreiborza
andreiborza requested a review from logaretm November 6, 2026 08:48
@chan-mai
Merge remote-tracking branch 'upstream/develop' into fix/nuxt-tunnel-…
fa5f0cb
…websocket-route

# Conflicts:
#	packages/nuxt/src/runtime/plugins/tunnel-legacy.server.ts
@chan-mai

chan-mai commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

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
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@s1gr1d 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
s1gr1d approved these changes Nov 9, 2026
View reviewed changes

@s1gr1d s1gr1d left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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
All reactions
  • 👀 1 reaction
@chan-mai
test(nuxt): Fix formatting and types in Nitro 2 tunnel plugin test
1922933
@chan-mai

chan-mai commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

logaretm
logaretm approved these changes Nov 9, 2026
View reviewed changes
@s1gr1d
s1gr1d enabled auto-merge (squash) November 10, 2026 12:45
@s1gr1d
s1gr1d merged commit 5a4ac0a into getsentry:develop Nov 10, 2026
742 of 744 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@javascript-sdk-gitflow javascript-sdk-gitflow Bot mentioned this pull request Nov 10, 2026
chore: Add external contributor to CHANGELOG.md #26238
Merged
msonnb pushed a commit that referenced this pull request Nov 10, 2026
@javascript-sdk-gitflow @s1gr1d
chore: Add external contributor to CHANGELOG.md (#26238)
e60350c
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]>
@sentry-release-bot sentry-release-bot Bot mentioned this pull request Nov 10, 2026
publish: getsentry/[email protected] getsentry/publish#10343
Closed
51 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@logaretm logaretm logaretm approved these changes
@s1gr1d s1gr1d s1gr1d approved these changes
@chargome chargome Awaiting requested review from chargome chargome was automatically assigned from getsentry/team-javascript-sdks-framework

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

external PR from an external contributor

Projects

None yet

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.

3 participants

@chan-mai @logaretm @s1gr1d
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.