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

Protractor fails on pending: - $timeout #246

Open
azachar opened this issue Oct 3, 2016 · 3 comments
Open

Protractor fails on pending: - $timeout #246

azachar opened this issue Oct 3, 2016 · 3 comments

Comments

@azachar
Copy link

azachar commented Oct 3, 2016

Hi There,
I am experiencing a weird behaviour of ngStorage. Actually browser.waitForAngular() fails on this exception:

The following tasks were pending: -
$timeout: function() {
    var temp$storage;
    _debounce = null;
    if (!angular.equals($storage, _last$storage)) {
        temp$storage = angular.copy(_last$storage);
        angular.forEach($storage, function(v, k) {
            if (angular.isDefined(v) && '$' !== k[0]) {
                webStorage.setItem(storageKeyPrefix + k, serializer(v));
                delete temp$storage[k];
            }
        });
        for (var k in temp$storage) {
            webStorage.removeItem(storageKeyPrefix + k);
        }
        _last$storage = angular.copy($storage);
    }
} - $timeout: function() {
    var temp$storage;
    _debounce = null;
    if (!angular.equals($storage, _last$storage)) {
        temp$storage = angular.copy(_last$storage);
        angular.forEach($storage, function(v, k) {
            if (angular.isDefined(v) && '$' !== k[0]) {
                webStorage.setItem(storageKeyPrefix + k, serializer(v));
                delete temp$storage[k];
            }
        });
        for (var k in temp$storage) {
            webStorage.removeItem(storageKeyPrefix + k);
        }
        _last$storage = angular.copy($storage);
    }
}

Do you have any idea why this is happening?

Thanks a lot!

Cheers,
A.

@azachar
Copy link
Author

azachar commented Nov 30, 2016

Well, actually I just create a fork where instead of $timeout is $interval used. Replacing $timeout with setTimeout did not help.
Have a look at https://github.com/azachar/ngStorage-mock

@fabianclain
Copy link

fabianclain commented Jan 22, 2018

hey @azachar did you find any workaround for this?

does the fork work for you ?
with your fork seems like I am getting stuck in the exact same point, however, without the $timeout error..

@azachar
Copy link
Author

azachar commented Jan 22, 2018

I am using that fork and it seems to be a rock solid so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants