javascript - 当错误消息不显示位置时查找错误
问题描述
我正在使用 Ionic、Angular 和 Firebase 构建应用程序。
我遇到了一个问题,代码是由 webpack 构建和打包的,它从 中返回一个错误polyfills.js
,这一点用处都没有……
错误消息如下所示:
Unhandled Promise rejection: Missing Command Error ; Zone: <root> ; Task:
Promise.then ; Value: Missing Command Error undefined
该错误每 30 秒发生一次。
错误的非缩小版本如下所示:
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)
}
}()
};
知道如何调试吗?谢谢!
解决方案
推荐阅读
- sql - SQL - 检查是否在另一个表中找到唯一值
- regex - 使用 Google RE2 Regexp for Data Studio 从 URL 中提取域名
- macos - 无法在 Mac 上的系统启动时运行 shell 脚本?
- tensorflow - 我应该使用哪种 TensorFlow 来预测某人是否会喜欢某个地方?
- jenkins - Jenkins 定期构建表达式“*/40 * * * *”未按预期工作
- python - 安装包后Python中的请求不起作用
- cloud-foundry - 如何轻松地从带有目的地的 html5 应用程序中使用 nodejs-backend?
- sql - 如何根据返回的记录数选择列?
- redux - 如何在 Flutter 的 Redux Store 中存储变量?
- javascript - 如何使用角度显示测验应用程序的所有问题