Hot reloading stops working after sleep/resume device on Chrome, but not Firefox
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 142k
- Forks
- 32.4k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 351
Description
Link to the code that reproduces this issue
https://github.com/rob-myers/next-js-repro
To Reproduce
- Start app via
npm run dev(webpack, turbopack has same issue). - Goto
app/page.tsx, edit component, and observe hot reloading works in Chrome. - Close laptop (or respective action for your device), then open it (ditto).
- Try edit component again and observe hot reloading is not working in Chrome.
The above issue happens in Chrome Version 133.0.6943.142 (Official Build) (arm64).
It does not happen in Firefox 135.0.1 (aarch64).
Current vs. Expected behavior
When I close and re-open my laptop, I expect hot-reloading to work.
I do not want to do a full page reload, because I lose my app's state.
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 21.6.0: Thu Sep 29 20:13:56 PDT 2022; root:xnu-8020.240.7~1/RELEASE_ARM64_T6000
Available memory (MB): 65536
Available CPU cores: 10
Binaries:
Node: 22.0.0
npm: 10.5.1
Yarn: 1.22.22
pnpm: N/A
Relevant Packages:
next: 15.2.2-canary.0 // Latest available version is detected (15.2.2-canary.0).
eslint-config-next: N/A
react: 19.0.0
react-dom: 19.0.0
typescript: 5.8.2
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
Webpack
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
The repro repo uses the latest version i.e. next@15.2.2-canary.0.
The same problem happens for next@15.0.0-rc.1.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked next-js-repro repository, run npm run dev, and reproduce the failure by editing app/page.tsx before and after sleep/resume in Chrome. Compare the same steps in Firefox and with webpack and Turbopack. Done means hot reloading resumes in Chrome without a full page reload or loss of application state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nextjs, react, webpack
- Domain
- developer-experience, devtools, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100