-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid state: Reader released #41858
Comments
This is expected behavior.
Therefore, if you attach a input_reader.closed.then(() => {
console.log( 'INPUT_READ__CLOSE' );
}, (reason) => {
// Handle the rejection somehow
console.error("Oh no, the input reader errored!", reason);
}); If you don't care about if or why the input_reader.closed.then(() => {
console.log( 'INPUT_READ__CLOSE' );
}, (reason) => {}); |
Not quite so, it is the line |
That's where the error is created, which is what appears in
Huh, that seems to be a documentation error. The specification says:
It looks like this was originally incorrectly documented in the spec, and was fixed a couple of years ago in whatwg/streams#914. But that hasn't stopped the mistake from propagating... MDN also has the incorrect documentation:
We'll need to fix both MDN and Node's documentation then. 😛 |
The `closed` promise may reject. Document the states where it rejects based on the spec. Fixes: nodejs#41858
@MattiasBuelens I'll make a PR for Node thanks for the MDN fix |
Yes, thanks for clearing up the misunderstandings! |
@essential-existence not your fault our docs were wrong 😅 thanks for the detailed report that resulted in a doc fix! |
The `closed` promise may reject. Document the states where it rejects based on the spec. Fixes: nodejs#41858 Co-Authored-By: Mattias Buelens <mattias@buelens.com>
The `closed` promise may reject. Document the states where it rejects based on the spec. Fixes: nodejs#41858 Co-Authored-By: Mattias Buelens <mattias@buelens.com>
Let's keep this open until the docs issue is fixed (hope that's ok with you!)? |
all in your hands! |
The `closed` promise may reject. Document the states where it rejects based on the spec. Fixes: nodejs#41858 PR-URL: nodejs#41860 Co-Authored-By: Mattias Buelens <mattias@buelens.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
The `closed` promise may reject. Document the states where it rejects based on the spec. Fixes: nodejs#41858 PR-URL: nodejs#41860 Co-Authored-By: Mattias Buelens <mattias@buelens.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
The `closed` promise may reject. Document the states where it rejects based on the spec. Fixes: nodejs#41858 PR-URL: nodejs#41860 Co-Authored-By: Mattias Buelens <mattias@buelens.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
I have a next js project here is the layout.tsx code
Here I am passing current User from backend here is the type of users where I am editing the types
here is the user schema using mongodb and prisma orm
when ever I run the I am getting error unhandledRejection: TypeError [ERR_INVALID_STATE]: Invalid state: Unable to enqueue |
@RishabhSolutionsArchitectTelecard That error is unrelated to this one. I recommend you search again, or open a new issue if nobody has yet. I also recommend providing the trace for this as well so we can figure out if this is a NodeJS error or Prisma error. |
Version
17.4.0
Platform
No response
Subsystem
No response
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
input_reader.closed.then( () => {} );
What is the expected behavior?
No response
What do you see instead?
TypeError [ERR_INVALID_STATE]: Invalid state: Reader released
Additional information
No response
The text was updated successfully, but these errors were encountered: