-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
Errors are swallowed non-deterministically #779
Comments
How did you track this down to better-sqlite3 specifically and not, say, a bug in the test framework? Let me rephrase: are you sure better-sqlite3 does not throw or could the test framework swallow the errors? How does a typical test that fails look like?
Your own servers or some cloud provider? What I mean is, is it the same physical hardware (SSD, RAM) or different all the time?
Are these prebuilds or are you compiling better-sqlite3 every time on the CI? In both cases compare the check sums of the node file. If possible pull the entire node_modules from a working CI build vs a failing build and see if something is different. |
Thanks for getting back to me! I managed to find out something else: Normally, when an error occurs, At this point, I'm not quite sure whether the problem lies with Regarding your questions:
I added a number of additional tests around the problematic ones to make sure that thrown errors actually get detected.
They are our own servers. All using the same hardware. And sadly, there is no pattern regarding the build agents.
Will do, but I haven't gotten around to it yet. |
Tests are probably running in a worker? See nodejs/node#37988 and #575 |
Also maybe refs #162 ? |
Thank you so much for your answers! Now the whole thing makes sense to me. (I've been bitten by Jest's behavior regarding worker threads and serialization in the past, but I didn't connect the dots in this case.) As a workaround, I now convert all try {
return database.prepare(someQuery).all();
} catch (error) {
throw new Error(error.message);
} |
statement.all()
andstatement.run()
normally forward any SQLite errors by throwing a correspondingSqliteError
. Under some circumstances, however, these errors are swallowed instead.I'd love to give you a compact repro, but I've been trying unsuccessfully for several hours:
I know this is very little to go on. If there is anything else that might help to narrow down the problem, please let me know!
The text was updated successfully, but these errors were encountered: