2017-07-27 13 views
0

私は283行であるクロムコンソールで例外スタックトレースを取得し、私のコードを参照する行は80 - 81(ワードカードを検索)です。角の巨大なスタックトレース

at CardService.getCards (eval at 70 
(http://localhost:8080/app.js:142:1), <anonymous>:46:14) 
    at CardsComponent.ngOnInit (eval at 144 (http://localhost:8080/app.js:7:1), <anonymous>:19:26) 

なぜすべてのジャンクが例外になっているのだろうと思いますが、それを取り除く方法はありますか?

スタックトレース(少し減少)

(unknown) ERROR Error: Uncaught (in promise): Response with status: 
401 Unauthorized for URL: http://localhost:5000/api/user 
    at resolvePromise (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:783:31) 
    at resolvePromise (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:754:17) 
    at eval (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:831:17) 
    at ZoneDelegate.invokeTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:424:31) 
    at Object.onInvokeTask (eval at <anonymous> (http://localhost:8080/vendor.js:67:1), <anonymous>:4085:33) 
    at ZoneDelegate.invokeTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:423:36) 
    at Zone.runTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:191:47) 
    at drainMicroTaskQueue (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:595:35) 
    at ZoneTask.invokeTask [as invoke] (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:502:21) 
    at invokeTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:1364:14) 
    at XMLHttpRequest.globalZoneAwareCallback (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:1382:17) 
    at ____________________Elapsed_13_ms__At__Thu_Jul_27_2017_14_51_10_GMT_0300__Turkey_Standard_Time_ 
(http://localhost) 
    at Object.onScheduleTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2706:1), <anonymous>:109:22) 
    at ZoneDelegate.scheduleTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:404:51) 
    at Object.onScheduleTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:300:29) 
    at ZoneDelegate.scheduleTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:404:51) 
    at Zone.scheduleTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:235:43) 
    at Zone.scheduleMicroTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:255:25) 
    at scheduleResolveOrReject (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:829:14) 
    at resolvePromise (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:778:21) 
    at resolvePromise (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:754:17) 
    at eval (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:831:17) 
    at ZoneDelegate.invokeTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:424:31) 
    at Object.onInvokeTask (eval at <anonymous> (http://localhost:8080/vendor.js:67:1), <anonymous>:4085:33) 
    at ZoneDelegate.invokeTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:423:36) 
    at Zone.runTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:191:47) 
    at drainMicroTaskQueue (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:595:35) 
    at ZoneTask.invokeTask [as invoke] (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:502:21) 
    at invokeTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:1364:14) 
    at XMLHttpRequest.globalZoneAwareCallback (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:1382:17) 
    at ____________________Elapsed_1_ms__At__Thu_Jul_27_2017_14_51_10_GMT_0300__Turkey_Standard_Time_ 
(http://localhost) 
    at Object.onScheduleTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2706:1), <anonymous>:109:22) 
    at ZoneDelegate.scheduleTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:404:51) 
    at Object.onScheduleTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:300:29) 
    at ZoneDelegate.scheduleTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:404:51) 
    at Zone.scheduleTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:235:43) 
    at Zone.scheduleMicroTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:255:25) 
    at scheduleResolveOrReject (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:829:14) 
    at resolvePromise (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:778:21) 
    at eval (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:709:17) 
    at SafeSubscriber.eval [as _error] (eval at <anonymous> (http://localhost:8080/vendor.js:2626:1), <anonymous>:68:85) 
    at SafeSubscriber.__tryOrUnsub (eval at <anonymous> (http://localhost:8080/vendor.js:14:1), <anonymous>:238:16) 
    at SafeSubscriber.error (eval at <anonymous> (http://localhost:8080/vendor.js:14:1), <anonymous>:197:26) 
    at Subscriber._error (eval at <anonymous> (http://localhost:8080/vendor.js:14:1), <anonymous>:128:26) 
    at Subscriber.error (eval at <anonymous> (http://localhost:8080/vendor.js:14:1), <anonymous>:102:18) 
    at XMLHttpRequest.onLoad (eval at <anonymous> (http://localhost:8080/vendor.js:336:1), <anonymous>:1270:34) 
    at ZoneDelegate.invokeTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:424:31) 
    at Object.onInvokeTask (eval at <anonymous> (http://localhost:8080/vendor.js:67:1), <anonymous>:4085:33) 
    at ZoneDelegate.invokeTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:423:36) 
    at Zone.runTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:191:47) 
    at ZoneTask.invokeTask [as invoke] (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:498:34) 
    at invokeTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:1364:14) 
    at XMLHttpRequest.globalZoneAwareCallback (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:1382:17) 
    at ____________________Elapsed_94_ms__At__Thu_Jul_27_2017_14_51_10_GMT_0300__Turkey_Standard_Time_ 
(http://localhost) 
    at Object.onScheduleTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2706:1), <anonymous>:109:22) 
    at ZoneDelegate.scheduleTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:404:51) 
    at Object.onScheduleTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:300:29) 
    at ZoneDelegate.scheduleTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:404:51) 
    at Zone.scheduleTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:235:43) 
    at Zone.scheduleEventTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:261:25) 
    at XMLHttpRequest.eval [as addEventListener] (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:1634:33) 
    at XMLHttpRequest.__zone_symbol__send (<anonymous>:1:682) 
    at ZoneTask.scheduleTask [as scheduleFn] (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:2616:24) 
    at ZoneDelegate.scheduleTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:410:26) 
    at Object.onScheduleTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2706:1), <anonymous>:117:35) 
    at ZoneDelegate.scheduleTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:404:51) 
    at Object.onScheduleTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:300:29) 
    at ZoneDelegate.scheduleTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:404:51) 
    at Zone.scheduleTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:235:43) 
    at Zone.scheduleMacroTask (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:258:25) 
    at eval (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:2640:29) 
    at XMLHttpRequest.proto.(anonymous function) [as send] (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), 
<anonymous>:1221:20) 
    at Observable.eval [as _subscribe] (eval at <anonymous> (http://localhost:8080/vendor.js:336:1), <anonymous>:1314:18) 
    at Observable._trySubscribe (eval at <anonymous> (http://localhost:8080/vendor.js:6:1), <anonymous>:171:25) 
    at Observable.subscribe (eval at <anonymous> (http://localhost:8080/vendor.js:6:1), <anonymous>:159:65) 
    at eval (eval at <anonymous> (http://localhost:8080/vendor.js:2626:1), <anonymous>:68:15) 
    at new ZoneAwarePromise (eval at <anonymous> (http://localhost:8080/polyfills.js:2712:1), <anonymous>:847:29) 
    at Observable.toPromise (eval at <anonymous> (http://localhost:8080/vendor.js:2626:1), <anonymous>:66:12) 
    at CardService.getCards (eval at 70 (http://localhost:8080/app.js:142:1), <anonymous>:46:14) 
    at CardsComponent.ngOnInit (eval at 144 (http://localhost:8080/app.js:7:1), <anonymous>:19:26) 
    at checkAndUpdateDirectiveInline (eval at <anonymous> (http://localhost:8080/vendor.js:67:1), <anonymous>:11038:19) 
    at checkAndUpdateNodeInline (eval at <anonymous> (http://localhost:8080/vendor.js:67:1), <anonymous>:12534:17) 
    at checkAndUpdateNode (eval at <anonymous> (http://localhost:8080/vendor.js:67:1), <anonymous>:12473:16) 
    at debugCheckAndUpdateNode (eval at <anonymous> (http://localhost:8080/vendor.js:67:1), <anonymous>:13334:59) 
    at debugCheckDirectivesFn (eval at <anonymous> (http://localhost:8080/vendor.js:67:1), <anonymous>:13275:13) 
    at Object.eval [as updateDirectives] (ng:///AppModule/CardsComponent_Host.ngfactory.js:8:5) 
    at Object.debugUpdateDirectives [as updateDirectives] (eval at <anonymous> (http://localhost:8080/vendor.js:67:1), 
<anonymous>:13260:21) 
    at checkAndUpdateView (eval at <anonymous> (http://localhost:8080/vendor.js:67:1), <anonymous>:12440:14) 
    at callViewAction (eval at <anonymous> (http://localhost:8080/vendor.js:67:1), <anonymous>:12805:21) 
    at execEmbeddedViewsAction (eval at <anonymous> (http://localhost:8080/vendor.js:67:1), <anonymous>:12763:17) 
    at checkAndUpdateView (eval at <anonymous> (http://localhost:8080/vendor.js:67:1), <anonymous>:12441:5) 
    at callViewAction (eval at <anonymous> (http://localhost:8080/vendor.js:67:1), <anonymous>:12805:21) 
    at execComponentViewsAction (eval at <anonymous> (http://localhost:8080/vendor.js:67:1), <anonymous>:12737:13) 
    at checkAndUpdateView (eval at <anonymous> (http://localhost:8080/vendor.js:67:1), <anonymous>:12446:5) 
    at callWithDebugContext (eval at <anonymous> (http://localhost:8080/vendor.js:67:1), <anonymous>:13660:42) 
    at Object.debugCheckAndUpdateView [as checkAndUpdateView] (eval at <anonymous> (http://localhost:8080/vendor.js:67:1), 
<anonymous>:13200:12) 
    at ViewRef_.detectChanges (eval at <anonymous> (http://localhost:8080/vendor.js:67:1), <anonymous>:10371:18) 
    at eval (eval at <anonymous> (http://localhost:8080/vendor.js:67:1), <anonymous>:5009:63) 
    at Array.forEach (<anonymous>) 
+0

なぜあなたは気になりますか? – Igor

+0

@Igor - これは大きな問題ではありませんが、まだかなり迷惑です。問題の原因を探して複数の画面をスクロールする必要があるのはなぜですか?一日の終わりに、それは合計されます。 – eugenekr

答えて

0

最初の2行は、また、私が思うだろう関連していますか?

(unknown) ERROR Error: Uncaught (in promise): Response with status: 401 Unauthorized for URL: http://localhost:5000/api/user

それはあなたのngOnInitが失敗することができ、その要求はありませんか?

+0

正解ですが、問題の原因を見つけるのに役立ちますが、あまりにも一般的です。私は、コードの問題がどこで起こっているのかを見たいと思います。なんらかの理由で、この情報は283行中にあります。] – eugenekr

+0

APIでエラーを処理して 'catch(function(error){console.log(error)});'より具体的なエラー?角は常にこれらの奇妙で一般的なスタックトレースを持っています。 –

+0

ルーカスありがとう、私はこの特定のケースを処理することができます。将来的に角スタックトレースをより重要なポイントにする方法があるかどうかを知りたいああ... .. – eugenekr