-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Exception on captureException() call #5622
Comments
Hi @mark-b-ab thanks for reporting! We recently made a change (#5426) to how we create uuids so this might have to something with your problem. Could you tell us a little bit about your setup? For instance, it would be good to know the node version you're using? Also, are you using any frameworks (e.g. Express)? Can you provide a small reproduction what to do to get to this error? |
I use node:18 container. NestJS as a framework. I can't send you code to reproduce as this error I receive if I have any unhandled exception in my app. |
I added this code it try catch where I report exceptions
|
Here is result
|
The last UUID is from node crypto module |
Seems that Sentry SDK is not using NodeJS Crypto module but a polyfill |
Hi, @mark-b-ab. Thanks for doing that investigation! The results are puzzling, though:
UPDATE: I did some experimenting on my own machine, with more confusing results. Specifically, while the node docs say that In any case, my best guess is that maybe this has to do with the node binary you're using inside your container. Do you know anything about it other than its version? Meanwhile, @timfish, since you worked on this - do you have any idea what's going on here? It all seems very strange... |
Yeah very strange. The stack trace and results from that script don't add up in a way I can fathom. Would love to try out that container!
My testing showed that in node v18+ |
@mark-b-ab Do you happen to have the specific version and hash/id of the docker image you were using to get this error? Or were you just using the unpinned version? Having the exact version would help a lot in debugging this. One other random thought: Maybe there's stuff missing we need in reduced versions of images like alpine. |
I am using just |
There is some funky stuff going on in the I can't pinpoint the exact problem yet but I bet it has to do with this. |
Hello guys!
I have tried to watch the returned I print the function code of
And there is no The function
|
@mark-b-ab @max-korsun-nuant Random question but is anyone of you using Astro? Or wasm for that matter? |
I'm getting this same error, but for
How is the error handling within the sentry node package so extremely poor, that errors like this bubble up with vague messaging instead of being caught within the lib, with proper custom errors (with codes) thrown? This is basic package authoring stuff folks. |
@shellscape I believe the error you posted is unrelated to this particular issue ( Would you mind creating a separate issue for this so we can track it there? Thank you! |
@lforst already did. you can see the reflink directly above your reply |
@shellscape Cool thank you! |
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
I just encountered this issue too. Same exception as #5622 (comment), but I haven't been able to replicate on my local machine |
I'm on node
|
I found the issue. We had a bad polyfill included by a dependency. The polyfill was: globalThis.crypto = {
getRandomValues: function getRandomValues(b) {
require('crypto').randomFillSync(b) // missing return statement!
},
} should have been: globalThis.crypto = {
getRandomValues: function getRandomValues(b) {
return require('crypto').randomFillSync(b)
},
} |
it helped, thanks! |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which package are you using?
@sentry/node
SDK Version
7.11.1
Framework Version
No response
Link to Sentry event
No response
Steps to Reproduce
Catch exception, call
captureException
.Expected Result
Exception being reported to Sentry
Actual Result
The text was updated successfully, but these errors were encountered: