-
Notifications
You must be signed in to change notification settings - Fork 210
Angular 1.6, "Error: transition prevented" #356
Comments
i also have this problem.... |
If you upgrade to version UI Router 0.3.2 it fixed this for me |
yes see issue #354 and pull request #355 |
hmm... the example provided does use angular-ui-router v0.3.2 (look at the error message I pasted, second and last line), I don't see how bower.json is relevant here (btw. wouldn't the next ui-router-extras release be >0.1.3 ?). |
+1 |
I'm also get this error. Does this matter? Can i just ignore it? |
Getting this error with the following setup:
|
+1 |
We are also experiencing the same problem using:
|
@christopherthielen I created a PR that resolves this issue, Im not 100% sure that it is the correct solution. Can you check and give feedback? Thanks |
Use the latest version and it will be gone. I had the same problem and spent time figuring out what I did wrong. Thanks, @chris-eaton for the direction. |
the error is not gone if you are using ct-ui-router-extras, at least in some circumstances. however, I found making this change in ct-ui-router-extras resolves it... but I am not sure what other implication this may have. any idea? @christopherthielen?
|
Can confirm that using ct-ui-router-extras 0.1.3 together with ui-router 0.4.2 and angular 1.6.1 causes this. I was going nuts trying to find out what was causing it, thank's for spotting it goleafs. Removing return $q.reject(err); also seems to do the trick for me. |
I figured out that this happens because of this: angular/angular.js#14631 Another workaround, to restore the old behaviour (while a fix lands on ui-router-extras) is to disable the reporting of unhandled rejections, by setting this on a config block, on your applications:
This is just a band-aid! |
+1 |
i have the same problem Angular 1.6.4 |
got this problem also... $qProvider.errorOnUnhandledRejections(false); is not working in my case.. Edit: |
I found that the below work around has a bad side-effect where real javascript errors are sometimes not making it to the console. This means silent errors can happen (yikes!). $qProvider.errorOnUnhandledRejections(false); Does anyone have a better, trusted solution that removes the "transition prevented" error message, but doesn't affect other errors? |
I had all these same errors and attempted to fix by updating. My issue was resolved by removing a $location.hash statement in my controller. |
Anybody managed to fix the issue without other updates? |
I found that I could fix the issue with a small change to ct-ui-router-extras.dsr.js (see attached screen shot). The idea came from this similar fix from Christopher -> angular-ui/ui-router@66ab048 |
Since the angular 1.6.x releases dsr still seems to work but I get a nasty console message :
http://codepen.io/exchsac/pen/jVjGBJ
"Error: transition prevented $get@https://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.3.2/angular-ui-router.js:2912:75 invoke@https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.js:4842:24 $get@https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.js:4709:49 invoke@https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.js:4842:24 $get@https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.js:4709:49 invoke@https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.js:4842:24 $get@https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.js:4709:49 invoke@https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.js:4842:24 https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.js:4636:43 getService@https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.js:4783:39 https://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.3.2/angular-ui-router.js:3696:20 invoke@https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.js:4842:24 https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.js:4645:68 forEach@https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.js:357:24 createInjector@https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.js:4645:10 doBootstrap@https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.js:1838:34 bootstrap@https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.js:1859:23 angularInit@https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.js:1744:14 https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.js:32977:16 trigger@https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.js:3314:7" "Possibly unhandled rejection: {'line':2912,'column':75,'sourceURL':'https://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.3.2/angular-ui-router.js'}"
The text was updated successfully, but these errors were encountered: