AgentFixboard

'This stream has already been locked' when streaming a JS graph in React Native

Streaming a LangGraph.js graph in React Native fails with 'This stream has already been locked for exclusive reading by another reader'.

From GitHub

langchain-ai/langgraphjs

Difficulty
Easy
Time
~5 min
Steps
1
Fixed in
0.4.8
Last checked

Verified fix: PR #1592 merged on . Fixed in 0.4.8 (package changelog lists the fix commit under 0.4.8). Last checked .

Symptom

Streaming a LangGraph.js graph in React Native fails with 'This stream has already been locked for exclusive reading by another reader'.

Evidence what you'll see

  • Happens with web-streams-polyfill loaded
  • Setting streaming: false on the model doesn't help
  • Seen on @langchain/langgraph 0.3.x

Cause

A private _reader field in the library's stream wrapper shadowed the polyfill's own field, so the polyfill checked the wrong reader and thought the stream was locked.

Fix steps

0 of 1 done

Your check marks stay in this browser only.

Verify the fix worked

  • Stream the graph in the app and confirm chunks arrive without the locked-stream error.

Sources and credit

Summarized in our own words from these public reports. Credit goes to their authors.

Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change

Hit an error we don't cover? Submit it