You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I find that not to be the case, and don't have a clue what to do about it.
I recently joined a project in which Sentry was configured, and they told me sometimes Sentry doesn't catch their crashes and errors. I found that a bit strange but figured - it happens, I didn't know how it was implemented fully yet or even how it functions. When I got deeper into it, I realized they were right and it was actually a pattern - it doesn't catch unhandled errors as it says it does.
I've researched what other people have done but the community has not gotten far on it. I've linked two github issues, as well as a reproducible example of this strange occurence here.
Tl;dr
it looks to be related to how promises are implemented across the projects' node modules folder. This feature heavily relies on promises as it overwrites it - sentry adds an unhandled promise handler to global promise instance. However, it appears that another package "fbjs" does a similar thing so this could be the source of the issue. I didn't quite verify this as I don't have that much time to now go dig into this on a technical level. If I wind up doing that, I'll be happy to update my findings, but right now - I'd like to get some help on this.
In essence, what I wanna know is what's the best practice in dealing with this or am I missing some key step in project instantiation? Keep in mind that I've also only used the official init command.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
According to the docs, Sentry SDK catches unhandled promise rejections out of the box.
I find that not to be the case, and don't have a clue what to do about it.
I recently joined a project in which Sentry was configured, and they told me sometimes Sentry doesn't catch their crashes and errors. I found that a bit strange but figured - it happens, I didn't know how it was implemented fully yet or even how it functions. When I got deeper into it, I realized they were right and it was actually a pattern - it doesn't catch unhandled errors as it says it does.
I've researched what other people have done but the community has not gotten far on it. I've linked two github issues, as well as a reproducible example of this strange occurence here.
Tl;dr
it looks to be related to how promises are implemented across the projects' node modules folder. This feature heavily relies on promises as it overwrites it - sentry adds an unhandled promise handler to global promise instance. However, it appears that another package "fbjs" does a similar thing so this could be the source of the issue. I didn't quite verify this as I don't have that much time to now go dig into this on a technical level. If I wind up doing that, I'll be happy to update my findings, but right now - I'd like to get some help on this.
In essence, what I wanna know is what's the best practice in dealing with this or am I missing some key step in project instantiation? Keep in mind that I've also only used the official init command.
Beta Was this translation helpful? Give feedback.
All reactions