I’m trying to add Ionic Pro monitoring to my app. As for now i get this error message in my console when i debug in chrome.
Failed to load resource: the server responded with a status of 404 ()
Failed to load https://api.ionicjs.com/monitoring/xxxxxxxx/u: Response for preflight does not have HTTP ok status.
In my app.module.ts i have this code
Pro.init('XXXXXXX', {
appVersion: '0.01'
})
@Injectable()
export class MyErrorHandler implements ErrorHandler {
ionicErrorHandler: IonicErrorHandler;
constructor(injector: Injector) {
try {
this.ionicErrorHandler = injector.get(IonicErrorHandler);
} catch(e) {
console.log("UNABLE TO GET ERROR HANDLER");
// Unable to get the IonicErrorHandler provider, ensure
// IonicErrorHandler has been added to the providers list below
}
}
handleError(err: any): void {
Pro.monitoring.handleNewError(err);
// Remove this if you want to disable Ionic's auto exception handling
// in development mode.
this.ionicErrorHandler && this.ionicErrorHandler.handleError(err);
}
}
If i try to reach the url in the erro message i get this:
{"error": {"link": null, "message": "404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.", "type": "NotFound"}, "meta": {"status": 404, "request_id": null, "version": "2.0.0-beta.0"}}