Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibly unhandled rejection with ng 1.5.5 #2699

Closed
celsomtrindade opened this issue Apr 17, 2016 · 4 comments
Closed

Possibly unhandled rejection with ng 1.5.5 #2699

celsomtrindade opened this issue Apr 17, 2016 · 4 comments

Comments

@celsomtrindade
Copy link

celsomtrindade commented Apr 17, 2016

When using ui-router v-0.2.18 and angularjs v-1.5.5 I keep getting this error 4 times:

Possibly unhandled rejection: {}

I reversed angular to v-1.5.3 and the error is gone. Any ideas why? I didn't found anything related to this issue.

I also noticed this error shows up as soon as I insert the ui.router module.

@christopherthielen
Copy link
Contributor

Looks like this behavior came from this commit: angular/angular.js@c9dffde

And they added an API method to disable that: https://docs.angularjs.org/api/ng/provider/$qProvider

I think the ui-router code may need to chain catch() off of various promises now 👎

@christopherthielen
Copy link
Contributor

Actually, that code doesn't seem to have landed in ng 1.5.5: https://github.com/angular/angular.js/blob/v1.5.5/src/ng/q.js

Are you sure you're using the released version of angular 1.5.5?

@celsomtrindade
Copy link
Author

@christopherthielen I updated my files with bower and it said version 1.5.5 (both on the prompt and on the actual file) and i had to go back to 1.5.3 because of this error.

@christopherthielen
Copy link
Contributor

@celsomtrindade

I just fetched 1.5.5 final version from bower, and it doesn't have "Possibly unhandled rejection" in the angular.js file.

╭─ christhielen@lappy486  ~/t
╰─  rm -rf bower_components; bower install angular#1.5.5 > /dev/null && grep "Possibly unhandled" bower_components/angular/angular.js

The pre-release versions of 1.5.5 did seem to have the change to $q.

Pre-release build 1.5.5-build.4756+sha.165a862

╭─ christhielen@lappy486  ~/t
╰─  rm -rf bower_components; bower install angular#1.5.5-build.4756+sha.165a862 > /dev/null && grep "Possibly unhandled" bower_components/angular/angular.js
        var errorMessage = 'Possibly unhandled rejection: ' + toDebugString(toCheck.value);

I suspect if you re-fetch 1.5.5 it will not exhibit the error message. Clear your bower cache (if that's a thing) first.

christopherthielen referenced this issue in angular/angular.js Apr 19, 2016
Rejected promises that do not have a callback to handle the rejection report
this to $exceptionHandler so they can be logged to the console.

BREAKING CHANGE

Unhandled rejected promises will be logged to $exceptionHandler.

Tests that depend on specific order or number of messages in $exceptionHandler
will need to handle rejected promises report.

Closes: #13653
Closes: #7992
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants