我刚被抛出这个丑陋的错误,我不太确定如何开始调试它?我查看了zone.js中的代码或下面的其他文件,但乍一看并没有说太多东西。
据我所知,这段代码是Zone.js中的drainMicroTaskQueue失败了。但是我从哪里开始呢。如果没有我仔细了解这个Zone.js,就无法确定失败的原因。
有关如何继续调查此问题的任何提示?
ERROR Error: "Uncaught (in promise): TypeError: value is null
applyUpdate@webpack-internal:///./node_modules/@angular/common/esm2015/http.js:286:1
init/<@webpack-internal:///./node_modules/@angular/common/esm2015/http.js:246:51
init@webpack-internal:///./node_modules/@angular/common/esm2015/http.js:246:17
forEach@webpack-internal:///./node_modules/@angular/common/esm2015/http.js:323:9
handle/<@webpack-internal:///./node_modules/@angular/common/esm2015/http.js:1753:13
_trySubscribe@webpack-internal:///./node_modules/rxjs/_esm2015/Observable.js:175:20
subscribe@webpack-internal:///./node_modules/rxjs/_esm2015/Observable.js:163:88
call@webpack-internal:///./node_modules/rxjs/_esm2015/operators/tap.js:58:16
subscribe@webpack-internal:///./node_modules/rxjs/_esm2015/Observable.js:160:13
call@webpack-internal:///./node_modules/rxjs/_esm2015/operators/catchError.js:75:16
subscribe@webpack-internal:///./node_modules/rxjs/_esm2015/Observable.js:160:13
subscribeToResult@webpack-internal:///./node_modules/rxjs/_esm2015/util/subscribeToResult.js:31:20
_innerSub@webpack-internal:///./node_modules/rxjs/_esm2015/operators/mergeMap.js:124:18
_tryNext@webpack-internal:///./node_modules/rxjs/_esm2015/operators/mergeMap.js:121:9
_next@webpack-internal:///./node_modules/rxjs/_esm2015/operators/mergeMap.js:104:13
next@webpack-internal:///./node_modules/rxjs/_esm2015/Subscriber.js:87:13
_subscribe@webpack-internal:///./node_modules/rxjs/_esm2015/observable/ScalarObservable.js:43:13
_trySubscribe@webpack-internal:///./node_modules/rxjs/_esm2015/Observable.js:175:20
subscribe@webpack-internal:///./node_modules/rxjs/_esm2015/Observable.js:163:88
call@webpack-internal:///./node_modules/rxjs/_esm2015/operators/mergeMap.js:81:16
subscribe@webpack-internal:///./node_modules/rxjs/_esm2015/Observable.js:160:13
call@webpack-internal:///./node_modules/rxjs/_esm2015/operators/filter.js:55:16
subscribe@webpack-internal:///./node_modules/rxjs/_esm2015/Observable.js:160:13
call@webpack-internal:///./node_modules/rxjs/_esm2015/operators/map.js:51:16
subscribe@webpack-internal:///./node_modules/rxjs/_esm2015/Observable.js:160:13
setNavItem@webpack-internal:///./src/app/shared/components/app-header/app-header.component.ts:36:13
ngOnInit/<@webpack-internal:///./src/app/shared/components/app-header/app-header.component.ts:90:17
__tryOrUnsub@webpack-internal:///./node_modules/rxjs/_esm2015/Subscriber.js:234:13
next@webpack-internal:///./node_modules/rxjs/_esm2015/Subscriber.js:182:17
_next@webpack-internal:///./node_modules/rxjs/_esm2015/Subscriber.js:123:9
next@webpack-internal:///./node_modules/rxjs/_esm2015/Subscriber.js:87:13
next@webpack-internal:///./node_modules/rxjs/_esm2015/Subject.js:54:17
runNavigate/</<@webpack-internal:///./node_modules/@angular/router/esm2015/router.js:4678:40
ZoneDelegate.prototype.invoke@webpack-internal:///./node_modules/zone.js/dist/zone.js:388:17
onInvoke@webpack-internal:///./node_modules/@angular/core/esm2015/core.js:4201:24
ZoneDelegate.prototype.invoke@webpack-internal:///./node_modules/zone.js/dist/zone.js:387:17
Zone.prototype.run@webpack-internal:///./node_modules/zone.js/dist/zone.js:138:24
scheduleResolveOrReject/<@webpack-internal:///./node_modules/zone.js/dist/zone.js:858:52
ZoneDelegate.prototype.invokeTask@webpack-internal:///./node_modules/zone.js/dist/zone.js:421:17
onInvokeTask@webpack-internal:///./node_modules/@angular/core/esm2015/core.js:4192:24
ZoneDelegate.prototype.invokeTask@webpack-internal:///./node_modules/zone.js/dist/zone.js:420:17
Zone.prototype.runTask@webpack-internal:///./node_modules/zone.js/dist/zone.js:188:28
drainMicroTaskQueue@webpack-internal:///./node_modules/zone.js/dist/zone.js:595:25
"
resolvePromisewebpack-internal:///./node_modules/zone.js/dist/zone.js:809:31scheduleResolveOrRejectwebpack-internal:///./node_modules/zone.js/dist/zone.js:861:17invokeTaskwebpack-internal:///./node_modules/zone.js/dist/zone.js:421:17node_modulesangular/core/esm2015/core.js:4192:24invokeTaskwebpack-internal:///./node_modules/zone.js/dist/zone.js:420:17runTaskwebpack-internal:///./node_modules/zone.js/dist/zone.js:188:28drainMicroTaskQueuewebpack-internal:///./node_modules/zone.js/dist/zone.js:595:25
答案 0 :(得分:0)
关于何时发生此错误的一些上下文会有帮助,当您单击一个按钮一个锚点或更改路径时会发生这种情况e.t.c ...
答案 1 :(得分:0)
问题是用户未登录并订阅以获取JSON文件失败。在用户登录之前,有一个安全约束阻止检索该数据。
一旦用户登录,错误就会消失。