I'm building an app using Ionic, Angular, and Firebase.
I'm having a problem where the code is being built and packaged by webpack and it returns an error from polyfills.js
, which is not useful in the slightest...
The error message looks like this:
Unhandled Promise rejection: Missing Command Error ; Zone: <root> ; Task:
Promise.then ; Value: Missing Command Error undefined
The error happens every 30ish seconds.
And the non-minifed version of the error looks like this:
function l(t) {
var e = t.prototype,
n = e.then;
e[d] = n;
var r = Object.getOwnPropertyDescriptor(t.prototype, "then");
r && !1 === r.writable && r.configurable && Object.defineProperty(t.prototype, "then", {
writable: !0
}),
t.prototype.then = function(t, e) {
var r = this;
return new x(function(t, e) {
n.call(r, t, e)
}).then(t, e)
},
t[R] = !0
}
var h = n.symbol,
p = [],
v = h("Promise"),
d = h("then");
n.onUnhandledError = function(t) {
if (n.showUncaughtError()) {
var e = t && t.rejection;
e ? console.error("Unhandled Promise rejection:", e instanceof Error ? e.message : e, "; Zone:", t.zone.name, "; Task:", t.task && t.task.source, "; Value:", e, e instanceof Error ? e.stack : void 0) : console.error(t)
}
},
n.microtaskDrainDone = function() {
for (; p.length;)
for (; p.length;)
! function() {
var t = p.shift();
try {
t.zone.runGuarded(function() {
throw t
})
} catch (t) {
r(t)
}
}()
};
Any idea how I would debug this? Thank you!