Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HMR breaks in 13.4.3 and 13.4.4 (and in 13.4.8) when used with custom server #50881

Open
1 task done
firmableharry opened this issue Jun 7, 2023 · 7 comments
Open
1 task done
Labels
bug Issue was opened via the bug report template.

Comments

@firmableharry
Copy link

firmableharry commented Jun 7, 2023

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
      Platform: win32
      Arch: x64
      Version: Windows 10 Home
    Binaries:
      Node: 18.0.0
      npm: N/A
      Yarn: N/A
      pnpm: N/A
    Relevant packages:
      next: 13.4.4
      eslint-config-next: 13.0.0
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.0.2

Which area(s) of Next.js are affected? (leave empty if unsure)

No response

Link to the code that reproduces this issue or a replay of the bug

https://github.com/vercel/next.js/tree/canary/examples/reproduction-template

To Reproduce

Install 13.4.3/13.4.4
Use a custom server
Please have a look at WS in the network.

Nextjs-13 4 3_HMR-Issue

(sorry for not providing the reproduction repo, as its just 4 lines of custom server)

Describe the Bug

Using a custom dev server as I need https,

const hostName = 'productname.dev';
const port = 443;
const dev = true;
const app = next({ dev, dir: path.join(__dirname, '../'), hostname: hostName, port });

This setup works fine and HMR works as expected on 13.4.2, but fails on 13.4.3/13.4.4 and the latest 13.4.5-canary.6.HTTPS

Expected Behavior

HMR should work as normal and expected

Which browser are you using? (if relevant)

Chrome

How are you deploying your application? (if relevant)

Its a local only issue

@firmableharry firmableharry added the bug Issue was opened via the bug report template. label Jun 7, 2023
@KhuongDuy106
Copy link

KhuongDuy106 commented Jun 7, 2023

Hi, so how to disable fast refresh on 404/500 page with next.js 13.4.4?
Screenshot_1

@firmableharry
Copy link
Author

firmableharry commented Jul 6, 2023

Can some one have a look at this please? This issue still exist in 13.4.8

Here is the screenshot.

image

@firmableharry firmableharry changed the title HMR breaks in 13.4.3 and 13.4.4 when used with custom server HMR breaks in 13.4.3 and 13.4.4 (and in 13.4.8) when used with custom server Jul 6, 2023
@meds
Copy link

meds commented Jul 16, 2023

Can confirm happening on 13.4.10 too, 13.4.7 was last version it's working on.

Currently it does update the UI but then does a full page refresh.

I don't think I'm using a custom server so it might be unrelated to that?

@KhuongDuy106
Copy link

it won't happen in production mode

@meds
Copy link

meds commented Jul 17, 2023

it won't happen in production mode

Who is using HMR in prod and why are they?

@meds
Copy link

meds commented Jul 21, 2023

From a very brief test 13.4.11 looks to have fixed the issue for me

@firmableharry
Copy link
Author

Still the same to me on both 13.4.11 and 13.4.12

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template.
Projects
None yet
Development

No branches or pull requests

3 participants