-
Notifications
You must be signed in to change notification settings - Fork 83
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
Sentry is not sending global errors #23
Comments
@mfru You have closed this issue. Is the issue solved? |
I don't know if it is my fault or sentry-expos, but when running in prod mode, Errors get indeed reported while in dev mode it seems to not report everything (some errors yes, some not). I closed the issue, because it kind of is resolved for me. |
@mfru Thanks. |
I'm having the same problem but it is not working even on production. I have tried using |
I get the same. I only see errors in production if I explicitly call |
In my case, the problem was because of using a different entry point than the expo’s default. I imported an index.js from App.js. Moving the index.js content to App.js solved the problem. |
It took a while, but in my case the error (that I was testing with) happened in In the end I've done this in my import React from 'react';
import { Provider } from 'react-redux';
import store from './lib/createStore';
import Root from './containers/Root';
import Sentry from 'sentry-expo';
// Sentry.enableInExpoDevelopment = true
Sentry.config('https://[email protected]/...').install();
export default () => (
<Provider store={store}>
<ErrorBoundary>
<Root />
</ErrorBoundary>
</Provider>
);
// This is a way to handle all errors in the app.
class ErrorBoundary extends React.Component {
componentDidCatch (error, errorInfo) {
Sentry.captureException(error, {
extra: errorInfo
});
}
render () {
const { children } = this.props;
return children;
}
} |
Using above method and |
Update: Seems like |
So I have tried to install Sentry as specified in the Expo section for Sentry / Sentry section for Expo.
My App.js contains the Sentry import, I enabled it in development and called
Sentry.config(<MyPublicDSN>).install()
.When trying to throw a test error like so:
throw new Error("TestError)
, Sentry does not pick up on it, even though the application crashes as expected.However, using
Sentry.captureException(new Error("TestError")
yields the expected results.Am I missing something?
EDIT: I also tried reloading the app (as it is stated that errors will get reported on next startup) a few times in the meantime, but it is not sending then either.
The text was updated successfully, but these errors were encountered: