You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue tracker is for Bug Reports and Feature Requests only.
Please direct requests for help to StackOverflow. See http://bit.ly/UIR-SOF for details.
This is a:
Bug Report
Feature Request
General Query
My version of UI-Router is: v1.0.0-rc.1
Bug Report
Current Behavior:
Unhandled promise rejection errors in console
Expected Behavior:
No unhandled promise rejection errors in console
Link to Plunker that reproduces the issue:
Too complex to create a plunkr test case.
Since update to v1.0.0-rc.1, I noticed that a lot of unhandled promise rejection errors were logged to the console in some complex transition sequences, involving multiple onBefore, onStart and redirect hooks.
I made sure that all promises in the application code had their catch handlers attached to avoid unhandled rejection errors but that didn't fix the issue.
I then decorated $qProvider as described here #2889 (comment) and narrowed it down to this line:
I can see that error contains a Rejection with a target state that I'm redirecting to:
Rejection {type: 2, message: "The transition has been superseded by a different transition", detail: TargetState, redirected: true}
and trans.promise.$$state.stack contains:
Error
at Promise.set [as $$state] (.../decorator-service.js:23:36)
at new Promise (.../libs/angular.js:16789:18)
at new Deferred (.../libs/angular.js:16780:34)
at Function.defer (.../libs/angular.js:16776:12)
at new Transition (.../libs/angular-ui-router.js:6081:38)
at TransitionService.create (.../libs/angular-ui-router.js:4337:16)
at StateService.transitionTo (.../libs/angular-ui-router.js:5613:56)
at StateService.go (.../libs/angular-ui-router.js:5514:21)
at .../libs/angular-ui-router.js:7929:24
at .../libs/angular.js:20178:31
The same error is logged 4 times consecutively.
The text was updated successfully, but these errors were encountered:
This issue tracker is for Bug Reports and Feature Requests only.
Please direct requests for help to StackOverflow. See http://bit.ly/UIR-SOF for details.
This is a:
My version of UI-Router is: v1.0.0-rc.1
Bug Report
Current Behavior:
Unhandled promise rejection errors in console
Expected Behavior:
No unhandled promise rejection errors in console
Link to Plunker that reproduces the issue:
Too complex to create a plunkr test case.
Since update to v1.0.0-rc.1, I noticed that a lot of unhandled promise rejection errors were logged to the console in some complex transition sequences, involving multiple
onBefore
,onStart
and redirect hooks.I made sure that all promises in the application code had their
catch
handlers attached to avoid unhandled rejection errors but that didn't fix the issue.I then decorated
$qProvider
as described here #2889 (comment) and narrowed it down to this line:ui-router/src/directives/stateDirectives.ts
Line 567 in 20d1fcd
If I add a
catch()
there, no unhandled promise rejection errors are logged to the console.Logging the current transition promise stack with the following code:
I can see that
error
contains a Rejection with a target state that I'm redirecting to:and
trans.promise.$$state.stack
contains:The same error is logged 4 times consecutively.
The text was updated successfully, but these errors were encountered: