Open o0charlie0o opened 2 weeks ago
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 yarn rw dev api
touch trustedDocumentSotore when starting and 8.4.1 fails to restart it
[change] /src/lib/trustedDocumentsStore.ts
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: https://github.com/redwoodjs/redwood/pull/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?