next.js icon indicating copy to clipboard operation
next.js copied to clipboard

with-turbopack occasionally throws "Error during SSR rendering - timed out waiting for the Node.js process to connect" when navigating pages

Open muradbu opened this issue 1 year ago • 23 comments

Verify canary release

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

Provide environment information

Using Windows 10 with WSL2:

    Operating System:
      Platform: linux
      Arch: x64
      Version: #1 SMP Fri Apr 2 22:23:49 UTC 2021
    Binaries:
      Node: 16.17.1
      npm: 8.15.0
      Yarn: N/A
      pnpm: 7.14.0
    Relevant packages:
      next: 13.0.0
      eslint-config-next: 13.0.0
      react: 18.2.0
      react-dom: 18.2.0

Which example does this report relate to?

with-turbopack

What browser are you using? (if relevant)

Firefox 107.0b4

How are you deploying your application? (if relevant)

No response

Describe the Bug

The new with-turbopack example occasionally throws during dev:

error - [rendering] [root of the dev server]/[CURRENT ROUTE TRYING TO RENDER]
  Error during SSR Rendering
  timed out waiting for the Node.js process to connect

Most of the time the page does end up rendering successfully and an event - updated in _xxx_ms gets logged, but on some occasions it throws the above error in the console while still rendering the page. I can still navigate to other pages, but the console stops logging events. This can happen on all pages when I navigate to them.

Sometimes the error blocks the entire page from rendering by throwing an error in the browser, although this only occurred twice: image

I cannot figure out a pattern that causes this error, the pages load fine most of the time but occasionally throw this error unexpectedly.

Expected Behavior

On navigating, a page should render without errors, echoing an event to the console with the amount of time it took to update.

To Reproduce

  1. Create a new project using the example.
pnpm create next-app --ts --example with-turbopack
  1. Run the dev command (--turbo is included in the dev script by default in this example.)
pnpm run dev
  1. Go to http://localhost:3000 in the browser and click the links in the sidebar to navigate to different pages. 3.a. Pay attention to the console as the error might be thrown even though the page rendered.
  2. After some successful navigation events this error might be thrown (multiple times if you continue navigating): image 4.a On some occasions the error can be thrown in the browser as well, preventing the page from rendering.

muradbu avatar Oct 26 '22 14:10 muradbu

I have the same problem...

zacard-orc avatar Oct 27 '22 03:10 zacard-orc

I am also facing this issue currently – for me, it is happening on every render.


Version: "next": "13.0.0" Command: yarn dev -- --turbo (next dev --turbo)

juriadams avatar Oct 27 '22 09:10 juriadams

Switching from node14 to node16 fixed this for me.

using nvm

nvm use 16

nickbuckham avatar Oct 27 '22 13:10 nickbuckham

I used Node 16 and it worked!

npm install -g n n

iamanas20 avatar Oct 27 '22 19:10 iamanas20

Switching from node14 to node16 fixed this for me.

using nvm

nvm use 16

Weird, I'm already on 16.17.1

muradbu avatar Oct 27 '22 22:10 muradbu

I'm having the same problem on node version: 16.15.1 Edit: Tried to upgrade to node 18 LTS but i'm still having the same problem

M1 Max chip

notlimey avatar Oct 28 '22 06:10 notlimey

It didn't work for me on node v14, but I tried with v16.18.0, and it works well.

webston avatar Oct 28 '22 10:10 webston

The same issue. v14, v16, v16.18.0 - are not working.

Turbopack failed to compile error - [rendering] [root of the dev server]/ Error during SSR Rendering timed out waiting for the Node.js process to connect

PS: SoC M1

o2sevruk avatar Oct 29 '22 10:10 o2sevruk

I am getting this on every load using Windows 11, WSL2, Ubuntu 22.04, node 16 and node 18. If I run this directly on Windows 11 with node 16 it seems to work fine.

nrowan avatar Oct 29 '22 16:10 nrowan

Same issue happens in M1 Mac as well, with Node 19

praveenkumarsaravanan avatar Oct 29 '22 23:10 praveenkumarsaravanan

M1 Pro, Node LTS - happening here too

franzwilhelm avatar Oct 30 '22 10:10 franzwilhelm

Uhm , having issue, MBP 2018, Switched node versions to 16 as well and still the same

khervie-star avatar Oct 30 '22 14:10 khervie-star

I'm having the same problem on node version: v16.15.1 and v18.12.0

ssynowiec avatar Oct 30 '22 20:10 ssynowiec

I also have this problem in window 10 19044.2130 ,node v16.15.0 and there are no errors in the console, only on the page

littleCareless avatar Oct 31 '22 03:10 littleCareless

got same error using node 14.20.1, but running well using node 16.18.0 (windows 11)

agustrinaldokurniawan avatar Oct 31 '22 06:10 agustrinaldokurniawan

I am on v16.13.0 and getting the same error.

RajVarsani avatar Oct 31 '22 14:10 RajVarsani

16.18.0 worked for windows! Does not work with M1 MAC

YunosukeYoshino avatar Nov 01 '22 12:11 YunosukeYoshino

Having the same issue. It does not work even with v16.18.0.

nsaicharan avatar Nov 06 '22 12:11 nsaicharan

I am also getting the same error using trubopack, webpack ain't showing any kind of errors. node version 16.17.1

b-meet avatar Nov 07 '22 04:11 b-meet

node: 16.13.1

It was working fine at first, but then it suddenly stopped working.

EDIT: I resolved my issue. First time using Next.JS so I'm still learning as I go. I was attempting to use CSR but also by having my page as an async function. Removing the async signature resolved my issue.

Infinitay avatar Nov 08 '22 22:11 Infinitay

same error for me on node 16.13.0 and 18.12.0 on M2 chip. Nextjs version: 13.0.2, Nextjs 13.0.0 works fine.

shahin-bayat avatar Nov 10 '22 11:11 shahin-bayat

M1 Macbook Air same issue

Chip-Mortensen avatar Nov 15 '22 16:11 Chip-Mortensen

yes facing same issue on chip M1. node v14.17.6 and npm 6.14.15

shsxnk avatar Nov 16 '22 07:11 shsxnk

Same issue here, with node v16.18.1 and npm 8.19.2

camilo-mujica avatar Nov 24 '22 22:11 camilo-mujica

same issue M1 node v18.13.0 and npm 8.19.2

HuynhTuanWD avatar Jan 10 '23 06:01 HuynhTuanWD

same issue for me. Is there any progress on this issue?

  • pnpm v7.24.3
  • node v18.12.1
  • nextjs v13.1.2
  • Windows 11

Lmmmmmm-bb avatar Jan 13 '23 16:01 Lmmmmmm-bb

I'm having the same issue.

Windows 11 Arch Linux on WSL 2 node v19.3.0 Next.js v13.1.2

without the --turbo, the app runs normally

nx23 avatar Jan 14 '23 01:01 nx23

I'm also having the same issue and without the --turbo, the app runs normally.

  • node v16.17.0
  • Next.js v13.1.2
  • Linux Ubuntu 22.04

bernardomoraes avatar Jan 14 '23 14:01 bernardomoraes

I'm having the same issue.

Windows 11

  • Linux Ubuntu 22.04 WSL2
  • node v18.13.0
  • Next.js v13.1.2

ygorluiz avatar Jan 15 '23 02:01 ygorluiz

Same here:

  • Debian 11 (bullseye) (with WSL2)
  • Node.js v18.12.0 (pnpm v7.25.0)
  • Next.js v13.1.2

Also using the example with TypeScript and Turbopack.

iammati avatar Jan 15 '23 09:01 iammati