I can’t trace the cause with the error message too general and files were compiled. So, I write this post hope to get some help.
This cmd I used to push source maps to Sentry
sentry-cli --auth-token [TOKEN] releases -o my-application -p my-application-staging files '0.0.33' upload-sourcemaps --url-prefix / .sourcemaps
=> Analyzing 57 sources
=> Adding source map references
=> Uploading source maps for release 0.0.23
and this SentryErrorHandler
import { IonicErrorHandler } from 'ionic-angular';
import Raven from 'raven-js';
import { ENV } from '@environment';
Raven.config(ENV.sentry_dsn, {
release: require('../../../package.json').version || (new Date().getTime() + ''),
environment: ENV.mode,
dataCallback: data => {
if(data.culprit){
data.culprit = data.culprit.substring(data.culprit.lastIndexOf('/'));
}
var stacktrace = data.stacktrace ||
data.exception &&
data.exception.values[0].stacktrace;
if(stacktrace){
stacktrace.frames.forEach(function(frame){
frame.filename = frame.filename.substring(frame.filename.lastIndexOf('/'));
});
}
}
}).install();
export class SentryErrorHandler extends IonicErrorHandler {
handleError(error) {
super.handleError(error);
try {
Raven.captureException(error.originalError || error);
}catch(e) {
console.error(e);
}
}
}
export function getEnvironmentErrorHandler() {
if(ENV.mode != 'development' && ENV.mode != 'test') {
return new SentryErrorHandler();
} else {
return new IonicErrorHandler();
}
}
And the error message in the Sentry, look not good.
Error/vendor.js?v=1540444318989 in i
errorUncaught (in promise): TypeError: Cannot read property 'call' of undefined TypeError: Cannot read property 'call' of undefined at i (https://domain.com/build/vendor.js?v=1540444318989:1:409) at https://domain.com/build/main.js?v=1540444318989:1:102210 at t.invoke (https://domain.com/build/polyfills.js?v=1540444318989:3:14976) at Object.onInvoke (https://domain.com/build/vendor.js?v=1540444318989:1:35803) at t.invoke (https://domain.com/build/polyfills.js?v=1540444318989:3:14916) at r.run (https://domain.com/build/polyfills.js?v=1540444318989:3:10143) at https://domain.com/build/polyfills.js?v=1540444318989:3:20242 at t.invokeTask (https://domain.com/build/polyfills.js?v=1540444318989:3:15660) at Object.onInvokeTask (https://domain.com/build/vendor.js?v=1540444318989:1:35715) at t.invokeTask (https://domain.com/build/polyfills.js?
Error
Uncaught (in promise): TypeError: Cannot read property 'call' of undefined
TypeError: Cannot read property 'call' of undefined
at i (https://domain.com/build/vendor.js?v=1540444318989:1:409)
at https://domain.com/build/main.js?v=1540444318989:1:102210
at t.invoke (https://domain.com/build/polyfills.js?v=1540444318989:3:14976)
at Object.onInvoke