sentry-react-native icon indicating copy to clipboard operation
sentry-react-native copied to clipboard

@sentry/react-native fails to catch error triggered from useEffect

Open MU-XICHEN opened this issue 3 years ago • 3 comments

https://github.com/getsentry/sentry-javascript/issues/2785 I found a problem in @sentry/react-native as same as the above link

when I write some code like this:

useEffect(()=>{ throw new Error('here is Error !'); },[])

Sentry catch failed, looks like the same with the above link

MU-XICHEN avatar Mar 07 '23 08:03 MU-XICHEN

Thank you for the message, we will take a look at it.

krystofwoldrich avatar Mar 07 '23 14:03 krystofwoldrich

Hi, I've tried the following in our sample app and the error is reported to Sentry as expected.

const App = () => {
  useEffect(() => {
    throw new Error('here is Error !');
  }, [])

  return (
    ...
  );
};

Could you provide a minimal reproducible example?

krystofwoldrich avatar Mar 10 '23 15:03 krystofwoldrich

Closing this due to inactivity. If this is still an issue feel free to comment here or open a new issue if the context changed.

krystofwoldrich avatar Mar 24 '23 12:03 krystofwoldrich