-
Notifications
You must be signed in to change notification settings - Fork 27k
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
[BUG] The Serve-Send-Event request cannot receive a close event. #50804
Comments
Is this expected behavior? It seems to be mentioned in the fastify docs https://www.fastify.io/docs/latest/Guides/Detecting-When-Clients-Abort/ |
Heyo, I tested this out and noticed two things.
|
I also tested it locally, and it seems to work on [email protected], but not on latest. It seems like any version higher than 13.2.4 causes issues (13.3.0 does not work properly) |
I tested the version and found that this issue first appeared in 13.2.5-canary.27. 13.2.5-canary.26 is work I checked all commit records in 13.2.5-canary.26 through 13.2.5-canary.27, and this commit may be the cause. |
This updates to have a separate routing process and separate rendering processes for `pages` and `app` so that we can properly isolate the two since they rely on different react versions. Besides allowing the above mentioned isolation this also helps us control recovering from process crashes easier as pieces are more isolated from one another e.g. an infinite loop during rendering will no longer block the compiler and can be stopped/restarted as needed. In follow-up PRs we will continue to separate out the routing logic from the rendering logic so that each process only loads what is relevant to it helping simplify the flow for requests regardless of type. --------- Co-authored-by: Shu Ding <[email protected]> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
[email protected] The presence of this problem remains. v13.4.8-canary.5 The problem was not detected |
Fixed by #51727 |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.5.0: Mon Apr 24 20:52:24 PDT 2023; root:xnu-8796.121.2~5/RELEASE_ARM64_T6000 Binaries: Node: 18.16.0 npm: 9.5.1 Yarn: 1.22.19 pnpm: 8.6.0 Relevant packages: next: 13.4.4 eslint-config-next: 13.4.4 react: 18.2.0 react-dom: 18.2.0 typescript: 5.1.3
Which area(s) of Next.js are affected? (leave empty if unsure)
Middleware / Edge (API routes, runtime)
Link to the code that reproduces this issue or a replay of the bug
https://stackblitz.com/edit/stackblitz-starters-n5uvup?file=pages%2Findex.js
To Reproduce
Describe the Bug
Create an SSE (Server-Sent-Event) request using an API Endpoint that does not receive a disconnect event properly when the client disconnects.
Expected Behavior
API Request is able to accept disconnected events, as the inability to accept events causes the timer to run forever and add a new one each time it runs.
Which browser are you using? (if relevant)
Microsoft Edge 113.0.1774.57
How are you deploying your application? (if relevant)
none
note 2023-6-6
I tried to write an api with the same functionality using express and I can receive the close event.
https://github.com/StringKe/node-sse-example
link1: #48682
The text was updated successfully, but these errors were encountered: