-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Cannot set property 'pur' of undefined #16164
Comments
This is very strange. All promises have a A repro woud definitely help. (Other than the missing repro, awesome bug report ❤️ ) |
My apologies, this is an issue of my own creation and explains why I couldn't reproduce the issue on Plunker. I was using Bluebird.js with angular-bluebird-promises to override the built in Angular promise service for the cancelable promise feature. I guess these have both diverged enough from Kris Kowal's Q. |
Hm....so I guess we have made it impossible (or possibly just harder than necessary) for people to swap |
Instead of using
|
For testing, it can be useful to run with other promise implementations like Bluebird.js + angular-bluebird-promises. This broke in angularjs 1.6 with a "TypeError: Cannot set property 'pur' of undefined". Closes angular#16164
I'm going to land this with comments explaining why those if statements are there. |
May I propose re-opening this issue? The PR referenced above #16471 landing would be very helpful -- we're currently stuck on 1.6.4 because we're relying on bluebird to install our own generic promise rejection handler. Much appreciated, thank you. |
Hm...I think we were supposed to land #16471 (but didn't) 😕 @wiltzius, do you by any chance know (or have a way to find out) the answer to https://github.com/angular/angular.js/pull/16471/files#r172260779? |
Yes, here's a minimal repo: https://github.com/wiltzius/angularjs-webpack I just cloned a basic starter repo (https://github.com/preboot/angularjs-webpack) and then made the following changes to it: wiltzius/angularjs-webpack@4b8342f Hopefully that commit ^ should tell you all you need to know. Obviously its contrived, but I basically copied the $interval code from ng-infinite-scroll (which is a project we're using that's causing this problem). See that code here: https://github.com/sroze/ngInfiniteScroll/blob/master/src/infinite-scroll.js#L257 Appreciate you taking a look at this! |
btw this is tagged 1.6.10 but 1.7.0 (all versions >= 1.6.5) exhibit the same behavior. |
Thx! So, afaict (based on your repro) is that the answer to https://github.com/angular/angular.js/pull/16471/files#r172260779 is that @wiltzius, would you like to take over #16471, remove the unnecessary change to |
I'm submitting a ...
Current behavior:
After upgrading to v1.6.5, a panel whose visibility delayed using $timeout is throwing an error
angular.js:14642 TypeError: Cannot set property 'pur' of undefined
Expected / new behavior:
Timeout cancelation should fail gracefully
Minimal reproduction of the problem with instructions:
Unfortunately I have not been able to create a Plunker that recreates this issue. In the environment I am working in, I am able to regularly reproduce this error by moving the mouse in and out of the element that triggers the showPanel/hidePanel functions three or four times.
Below I have attached a stacktrace and relative code. Please let me know if this is insufficient and I will continue to try to recreate the issue in Plunker.
Angular version: 1.6.5 but not version 1.6.4
Browser: Chrome 60 (only browser tested)
Anything else:
I am assuming that it is related to this commit: fix($timeout/$interval): do not trigger a digest on cancel and the simplest fix would be to add a check here:
** Debugging information**
Stacktrace:
Relative element with mouse event triggers
Relative JavaScript functions
The text was updated successfully, but these errors were encountered: