Skip to content

[NEXT-697] React Dev Tools in chrome causes Error "Uncaught TypeError: wakeable.then is not a function" when a context provider wraps a suspense (next dev) #43389

Closed
@max-ch9i

Description

@max-ch9i

Verify canary release

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

Provide environment information

❯ npx next info

Operating System:
  Platform: linux
  Arch: x64
  Version: Ubuntu 20.04.0 LTS Fri Nov 25 2022 15:45:12 GMT+0000 (Greenwich Mean Time)
Binaries:
  Node: 16.14.2
  npm: 7.17.0
  Yarn: 1.22.19
  pnpm: 7.13.6
Relevant packages:
  next: 13.0.6-canary.1
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0

What browser are you using? (if relevant)

Chrome + React Dev tools extension

How are you deploying your application? (if relevant)

npx next dev (or yarn dev)

Describe the Bug

Error Uncaught TypeError: wakeable.then is not a function is thrown.

Expected Behavior

No error should be thrown.

Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster

https://stackblitz.com/edit/nextjs-sys3ek?file=package.json

To Reproduce

repro.mov
  1. Load stackblitz (tab A): https://stackblitz.com/edit/nextjs-sys3ek?file=package.json
  2. Make sure dev build is running (npx next dev)
  3. Open a new tab (tab B) and open dev console
  4. Copy the preview url from stackblitz from tab A
  5. Paste into the address bar tab B, load the page.
  6. Refresh the page.
  7. Observe Uncaught TypeError: wakeable.then is not a function

If the react dev extension is disabled, the error is not thrown.
If the context provider is removed, the error is not thrown.
If suspense is removed, the error is not thrown.

NEXT-697

Metadata

Metadata

Assignees

No one assigned

    Labels

    linear: nextConfirmed issue that is tracked by the Next.js team.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions