vercel / vercel/next.js

Hot reloading stops working after sleep/resume device on Chrome, but not Firefox

Open
#76,782 8 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Webpack
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
  1. Start app via npm run dev (webpack, turbopack has same issue).
  2. Goto app/page.tsx, edit component, and observe hot reloading works in Chrome.
  3. Close laptop (or respective action for your device), then open it (ditto).
  4. 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

Open the 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.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.