Skip to content
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

Fix TypeError [ERR_INVALID_STATE]: Invalid state: Unable to enqueue #64

Merged
merged 1 commit into from
Mar 16, 2024

Conversation

unstubbable
Copy link
Owner

@unstubbable unstubbable commented Mar 16, 2024

This error occurred when a request was cancelled by the user. This is logged by React as:

The render was aborted by the server without a reason.

In this case the HTML stream was already closed, and the buffering transform stream could not enqueue any more chunks.

Fortunately, after a bit of testing, it turned out that the whole buffering is not needed anymore. I also couldn't find similar code like this in Next.js anymore. So we are just removing it as well.

The injection of the RSC chunks, and the hydration still work fine without it.

Copy link

vercel bot commented Mar 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mfng ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 16, 2024 7:28pm

This error occurred when a request was cancelled by the user. This is
logged by React as:

```
The render was aborted by the server without a reason.
```

In this case the HTML stream was already closed, and the buffering
transform stream could not enqueue any more chunks.

Fortunately, after a bit of testing, it turned out that the whole
buffering is not needed anymore. I also couldn't find similar code like
this in Next.js anymore. So we are just removing it as well.

The injection of the RSC chunks, and the hydration still work fine
without it.
@unstubbable unstubbable merged commit 5519a09 into main Mar 16, 2024
6 checks passed
@unstubbable unstubbable deleted the fix-enqueue-error branch March 16, 2024 19:31
unstubbable added a commit to unstubbable/mfng-ai-demo that referenced this pull request Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant