-
Notifications
You must be signed in to change notification settings - Fork 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
[Bug?]: Server is killed and doesn't come back up when saving changes #11719
Comments
After upgrading to 8.4.1 the same thing happens in my project that if I edit in the api the server shuts down and doesn't start again. I use vscode on mac. Really glad I found the bug report here, because I've spent hours debugging. |
Same thing happening to me on 8.4.1 without editing any file. It seems
|
I have almost the same problem, the API comes back up but is still killed |
Oh yeah, i'm also seeing this after the upgrade to 8.4.1: gen | File system change: change api/src/services/interviewPostprocessing/interviewPostprocessing.ts
gen | Modified Directory named module: api/src/services/interviewPostprocessing/interviewPostprocessing.ts 1 ms
api | Shutting down API server.
api | Took 2003 ms
api | Debugger listening on ws://127.0.0.1:18911/c114f28b-8f88-4c9d-a207-e4cd67a3ed2d
api | For help, see: https://nodejs.org/en/docs/inspector
api |
api | 12:06:36 🌲 Configuring api side
api | Importing Server Functions...
api | /auth 1268 ms
api | /livekit 1265 ms
api | ...Done importing in 1269 ms
api | API server did not exit within 2 seconds, forcefully closing it.
web | 12:07:02 PM [vite] http proxy error: /auth?method=getToken
web | Error: connect ECONNREFUSED :::8911
web | at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1607:16) But this doesn't happen deterministically, so it makes sense that this must be down to some sort of race condition (#11731 🚀 ) … seems like sort of a critical issue for the next patch release. |
Yeah, this has been bugging me too. Thanks for the nudge here @Philzen 🙏 |
Could we please have a patch release with this fix? Thanks in advance @Tobbe |
What's not working?
When the server restarts after making a code change it is killed and doesn't come back up. After some investigation it appears to have been introduced with this pr: #11691
Essentially if the first promise wins then it resolves and
await this.startApiServer()
is called. The problem here is the second promise still executes so after 2 seconds it still kills the server anyways.Running the following code in chrome dev tools console will demonstrate the issue:
Output is:
Promise 1 resolved
Race settled with: First
Promise 2 resolved
How do we reproduce the bug?
Make a change in some code on the api side and save so the server restarts
What's your environment? (If it applies)
No response
Are you interested in working on this?
The text was updated successfully, but these errors were encountered: