sentry-javascript
sentry-javascript copied to clipboard
TypeError: stack.split is not a function
Is there an existing issue for this?
- [X] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- [X] I have reviewed the documentation https://docs.sentry.io/
- [X] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which package are you using?
@sentry/react
SDK Version
7.11.1
Framework Version
React 17.0.2
Link to Sentry event
https://sentry.io/organizations/planable/issues/3541513245/?project=144953&query=is%3Aunresolved
Steps to Reproduce
- Do something that generates Meteor.Error
- Sentry.captureException(error)
- For some errors, Sentry exception is triggered
Expected Result
In JavaScript, everything can be thrown, so Sentry should handle this internally and not complain. Maybe if stack is not according to expected format, add it to issue's Additional Data
Actual Result

From my debugging, I found out that for some reason, Some Meteor errors have stack nested { stack: { stack: "" }}
:

Hey, thanks for writing in! error.stack
should be a string stacktrace as per the MDN docs and the spec proposal (it's non-standard as each browser does it slightly differently).
We can put guards on this to make sure we only parse string stacktraces, but I recommend reaching out to the Meteor folks and asking them to fix the errors generated from Meteor
!