IONIC PRO Monitoring Response for preflight does not have HTTP ok status

#1

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"}}
#2

This should not happen. Wrong ID maybe? Can you load the failing URL in the browser?

#3

The last thing i wrote:

{"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"}}

Is what i get if i try to reach the url

#4

Same problem with monitoring “Unable to send exception to server”
POST https://api.ionicjs.com/monitoring/XXXXXX/exceptions

Resolved.
APP_ID must be lowercase in app.module.ts and ionic.config.json

#5

I’m seeing a similar problem on the mobile but not in the browser. I’ve tried running it on two phones and I get “Unable to send exception to server”. Whereas the same app run with Ionic Serve logs exceptions to Pro. The ID/app version are correct and lowercase.