sentry-cordova
sentry-cordova copied to clipboard
Not logging errors
Environment
sentry-cordova: 1.0.0-rc.0 cordova-ios: 6.2.0 cordova-android: 10.1.2
Steps to Reproduce
I followed the steps in the README.md file to set up sentry-cordova
I wrote the following code to initialize Sentry.
document.addEventListener('deviceready', () => {
alert("device ready")
try {
const Sentry = window.cordova.require('sentry-cordova.Sentry');
Sentry.init({ dsn: 'https://[email protected]/xxxxxxx' });
} catch (err) {
alert(String(err));
}
Sentry.nativeCrash();
// throw new Error('Hey sentry, catch that.')
});
The first alert
was to make sure that my deviceready
listener is being called. The second one was to see if something went wrong with the initialization. I tried both throwing an error and using Sentry.nativeCrash
, but nothing was logged to the dashboard.
Expected Result
I expected to see an event logged in the dashboard
Actual Result
There was nothing in the dashboard.
NB: I am using the free tier.
Hi thanks for opening this issue :D
Would you mind adding to the Sentry Initialization the option debug:true
and check the output?
Sentry.init({ dsn: 'https://[email protected]/xxxxxxx', debug:true });
Furthermore, have you configured your config.xml with the rules to allow the errors to be sent to Sentry? for example:
<access origin="o447951.ingest.sentry.io" />
<access origin="sentry.io" />
The value o447951
may vary and can be found on your DSN Key ( I believe the docs might be a bit outdated and we need to recommend using the ingest access instead of sentry.io
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 Status: Backlog
or Status: In Progress
, I will leave it alone ... forever!
"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀