난 그냥 프로 이온에 내 이온이 응용 프로그램을 마이그레이션 및 설정 오류 모니터링 아래 링크의 지침에 따라 :Ionic Pro 오류 모니터링은 Ionic View에서 작동합니까?
https://ionicframework.com/docs/pro/monitoring/
을하지만, 그래서 여기까지 작동 제를 어떻게 알아낼 수 없었다 문제 :
내 API와 통신하기 위해 내 응용 프로그램에서 @ angular/http의 HTTP 모듈을 사용하고 있으며 Chrome --disable-web-security 기능으로 테스트 한 이후 지금까지 레거시 버전에서는 프록시를 필요로하지 않았습니다. 기존의 Ionic View에 배치했을 때 작동합니다. 그러나 Ionic Pro에 배포 한 후에 Ionic DevApp를 사용하려면 프록시를 추가해야했으며 Ionic View에 배포 할 때는 프록시와 전혀 작동하지 않습니다.
따라서 Ionic View에서 테스트 할 때 오류 및 로그가 표시되지만 Ionic의 모니터링 페이지에는 아무 것도 표시되지 않습니다.
import { Pro } from '@ionic/pro';
err => {
loader.dismissAll();
var errorTitle = this.authService.connectionService.GetNoInternetConnectionErrorTitle();
var errorMessage = this.authService.connectionService.GetNoInternetConnectionErrorMessage();
if (err.status != 0) {
console.log(JSON.parse(err._body));
var errMessageJson = JSON.parse(JSON.parse(err._body));
console.log("Error Code is " + errMessageJson.ErrorCode);
errorTitle = errMessageJson.ErrorTitle;
errorMessage = errMessageJson.ErrorMessage;
}
let alert = this.alertCtrl.create({
title: errorTitle,
subTitle: errorMessage,
buttons: ['OK']
});
// add error monitoring here
Pro.getApp().monitoring.exception(new Error('Could not connect to API. Error Message is ' + errorMessage));
Pro.getApp().monitoring.log('This happens sometimes Could not connect to API. The whole message object is ' + err, { level: 'error' });
alert.present();
},
동일한 문제가 있습니다. 콘텐츠 보안 정책을 게시 할 수 있습니까? –