Skip to content

Bug: react devtools TypeError: wakeable.then is not a function #25994

@huozhi

Description

@huozhi

React version: 18.3.0-next-555ece0cd-20230112

Steps To Reproduce

  1. open https://7rerbz-3000.preview.csb.app/

Link to code example:

https://codesandbox.io/p/github/huozhi/dynamic-suspense-forked/main

The current behavior

client throw error while hydration with react devtools opening

react-dom.development.js?ac89:14291 Uncaught TypeError: wakeable.then is not a function
    at Object.markComponentSuspended (react_devtools_backend.js:5694:16)
    at markComponentSuspended (react-dom.development.js?ac89:5153:1)
    at handleThrow (react-dom.development.js?ac89:30749:1)
    at renderRootSync (react-dom.development.js?ac89:30950:1)
    at performSyncWorkOnRoot (react-dom.development.js?ac89:30465:1)
    at flushSyncCallbacks (react-dom.development.js?ac89:14277:1)
    at flushPassiveEffectsImpl (react-dom.development.js?ac89:31855:1)
    at flushPassiveEffects (react-dom.development.js?ac89:31775:1)
    at eval (react-dom.development.js?ac89:31517:1)
    at workLoop (scheduler.development.js?bcd2:275:1)
    at flushWork (scheduler.development.js?bcd2:244:1)
    at performWorkUntilDeadline (scheduler.development.js?bcd2:551:1)
    at k (preview-protocol.js:36:2929)
    at Q (preview-protocol.js:36:3113)
    at J (preview-protocol.js:36:3473)

The weakable variable from react_devtools_backend.js at this time is an error instance with message "This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue.", then the later call of weakable.then(() => ...) will throw an error.

The expected behavior

Suepsne boundaries should be resolved successfully without error, but works with react devtools disabled

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions