You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: RSC renderToReadableStream/createFromReadableStream gets stuck for certain objects on development #34751
(This didn't reproduce on 19.1.1. Based on old reproduction hi-ogawa/react-router-templates@e6eddd0, it reproduced since at least 19.2.0-canary-19baee81-20250725.)
Steps To Reproduce
When serializing and deserializing certain objects with the same object reference as a property and as a prop, createFromReadableStream gets stuck.
import{renderToReadableStream}from"react-server-dom-xxx/server.edge";import{createFromReadableStream}from"react-server-dom-xxx/client.edge";asyncfunctiontest1(){// serialize same `obj` reference as top-level object and as propconstobj={};functionTest(_props: {obj: {}}){return"test";}constoriginal={obj: obj,node: <Testobj={obj}/>,}console.log("[original]",original);conststream=renderToReadableStream(original);console.log("[stream]",stream);constrestored=awaitcreateFromReadableStream(stream);// 👈 this gets stuckconsole.log("[restored]",restored);}
Interestingly, it works if the order of properties are flipped, for example:
constoriginal={node: <Testobj={obj}/>,obj: obj,}
This happens only on development. I initially observed this behavior on react-router remix-run/react-router#14085 and minimized a reproduction to the above pattern.
Activity
[Flight] Don't hang after resolving cyclic references