slim share does not proxy Next.js HMR websocket upgrades (wss /_next/hmr)

Open
#27 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
go, next.js
Domain
networking

Research direction

Reproduce with a Next.js dev server on port 3000, slim share --port 3000, and the /_next/hmr websocket path, comparing Slim with the working local and ngrok cases. Trace the tunnel's websocket upgrade and __/slim/visit handling; done means the remote request returns 101 and the app hydrates normally.

Written by the indexing model from the issue text.

Description

Summary

When using slim share to expose a local Next.js dev server, page hydration fails on mobile because the HMR websocket upgrade request does not complete through the tunnel.

Environment

  • macOS 25.6.0
  • Next.js 16.3.0-preview.5 (tested with both Turbopack and Webpack dev)
  • Local app at http://localhost:3000
  • Tunnel command: slim share --port 3000
  • Client: iPhone Safari

Repro

  1. Start Next.js dev server on port 3000.
  2. Start slim share --port 3000.
  3. Open the generated https://<slug>.slim.show URL on iPhone Safari.
  4. Continue from the Slim interstitial (/__slim/visit) to the app route.
  5. Observe that the app remains on a loading/blank state and React hydration does not complete.

Expected

The tunnel should support websocket upgrade requests so Next dev runtime can connect to /_next/hmr and hydrate normally.

Actual

Websocket upgrade to wss://<slug>.slim.show/_next/hmr fails (browser reports non-101 / bad response, and we also observed 504 in some attempts).

Evidence

  • Local websocket works: ws://localhost:3000/_next/hmr opens successfully.
  • Same app + same machine over ngrok works: wss://<slug>.ngrok-free.app/_next/hmr opens successfully.
  • Only Slim tunnel fails for the HMR websocket path.

Additional note

The interstitial visit flow (/__slim/visit) appears before reaching the app. If there is a way to bypass or pre-authorize this for dev websocket paths, that may help as well.

Happy to provide more logs/videos if useful.

Dominant language
Go
Stars
2.2k
Forks
139
PR merge metrics
No merged PRs in 30d

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nilbuild/slim

All issues in nilbuild/slim

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.