-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
bun exits early, with no visible cause. #9117
Comments
Try moving this to the bottom of the file and prepending await clearDB()
.then(run)
.catch(e => console.error(e))
.then(closeDb)
.then(_=>{
console.log(`Ended: ${new Date}, took ${humanizeDuration(performance.now() - start)}`);
return null;
})
.catch(e => {throw e;}); |
Thanks @Jarred-Sumner , just adding the Seems odd that you would need to prepend the |
what is happening is somewhere in this line of async work, bun does not realize there are active operations happening, so it quits thinking the async work is done. the this is still a bug its just not immediatly clear what part of the async chain is forgetting to keep the event loop alive. |
@paperdave seems similar to this other issue , where adding an |
What version of Bun is running?
1.0.29+a146856d1
What platform is your computer?
Darwin 23.3.0 x86_64 i386
What steps can reproduce the bug?
Here is a small repo that can reproduce the issue. https://github.com/adrianbrowning/mvt-bun-prisma.
bun i
, will also create the db.db filebun no-brk
/bun just-inspect
and see that the output stopbun with-brk
. Brin up the debugger and see that the output continues.What is the expected behavior?
Running
bun with-brk
gives:What do you see instead?
Running
bun no-brk
ORbun just-inspect
both show the following:Additional information
Might also relate to:
#8629
The text was updated successfully, but these errors were encountered: