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

Watchers fired in the last 5 iterations: [["fn: function $locationWatch() #3935

Closed
rcrezende opened this issue May 22, 2015 · 4 comments
Closed

Comments

@rcrezende
Copy link

$rootScope:infdig] 10 $digest() iterations reached. Aborting!
Watchers fired in the last 5 iterations: [["fn: function $locationWatch() {\n      var oldUrl = $browser.url();\n      var currentReplace = $location.$$replace;\n\n      if (!changeCounter || oldUrl != $location.absUrl()) {\n        changeCounter++;\n        $rootScope.$evalAsync(function() {\n          if ($rootScope.$broadcast('$locationChangeStart', $location.absUrl(), oldUrl).\n              defaultPrevented) {\n            $location.$$parse(oldUrl);\n          } else {\n            $browser.url($location.absUrl(), currentReplace);\n            afterLocationChange(oldUrl);\n          }\n        });\n      }\n      $location.$$replace = false;\n\n      return changeCounter;\n    }; newVal: 14; oldVal: 13"],["fn: function $locationWatch() {\n      var oldUrl = $browser.url();\n      var currentReplace = $location.$$replace;\n\n      if (!changeCounter || oldUrl != $location.absUrl()) {\n        changeCounter++;\n        $rootScope.$evalAsync(function() {\n          if ($rootScope.$broadcast('$locationChangeStart', $location.absUrl(), oldUrl).\n              defaultPrevented) {\n            $location.$$parse(oldUrl);\n          } else {\n            $browser.url($location.absUrl(), currentReplace);\n            afterLocationChange(oldUrl);\n          }\n        });\n      }\n      $location.$$replace = false;\n\n      return changeCounter;\n    }; newVal: 15; oldVal: 14"],["fn: function $locationWatch() {\n      var oldUrl = $browser.url();\n      var currentReplace = $location.$$replace;\n\n      if (!changeCounter || oldUrl != $location.absUrl()) {\n        changeCounter++;\n        $rootScope.$evalAsync(function() {\n          if ($rootScope.$broadcast('$locationChangeStart', $location.absUrl(), oldUrl).\n              defaultPrevented) {\n            $location.$$parse(oldUrl);\n          } else {\n            $browser.url($location.absUrl(), currentReplace);\n            afterLocationChange(oldUrl);\n          }\n        });\n      }\n      $location.$$replace = false;\n\n      return changeCounter;\n    }; newVal: 16; oldVal: 15"],["fn: function $locationWatch() {\n      var oldUrl = $browser.url();\n      var currentReplace = $location.$$replace;\n\n      if (!changeCounter || oldUrl != $location.absUrl()) {\n        changeCounter++;\n        $rootScope.$evalAsync(function() {\n          if ($rootScope.$broadcast('$locationChangeStart', $location.absUrl(), oldUrl).\n              defaultPrevented) {\n            $location.$$parse(oldUrl);\n          } else {\n            $browser.url($location.absUrl(), currentReplace);\n            afterLocationChange(oldUrl);\n          }\n        });\n      }\n      $location.$$replace = false;\n\n      return changeCounter;\n    }; newVal: 17; oldVal: 16"],["fn: function $locationWatch() {\n      var oldUrl = $browser.url();\n      var currentReplace = $location.$$replace;\n\n      if (!changeCounter || oldUrl != $location.absUrl()) {\n        changeCounter++;\n        $rootScope.$evalAsync(function() {\n          if ($rootScope.$broadcast('$locationChangeStart', $location.absUrl(), oldUrl).\n              defaultPrevented) {\n            $location.$$parse(oldUrl);\n          } else {\n            $browser.url($location.absUrl(), currentReplace);\n            afterLocationChange(oldUrl);\n          }\n        });\n      }\n      $location.$$replace = false;\n\n      return changeCounter;\n    }; newVal: 18; oldVal: 17"]]

image

image

Is there anything else I need to provide for this error? I can consistently hit that from my deployment.

@rcrezende
Copy link
Author

I see the following error happening before

rison decoder error: unmatched "'"

image

@rcrezende
Copy link
Author

At some point I see an error in:

  rison.decode = function(r) {
      var errcb = function(e) { throw Error('rison decoder error: ' + e); };
      var p = new rison.parser(errcb);
      return p.parse(r);
  };

r contains the url state (filters:!((meta:(disabled: ... is very large and getting truncated

the method is invoked by:

State.prototype._readFromURL = function () {
      var search = $location.search();
      try {
        return search[this._urlParam] ? rison.decode(search[this._urlParam]) : null;

I repro consistently in IE, but never in Chrome. It should be some limitation on the url size for the browser.

Is there any ongoing work to make state encoding smaller or avoiding 100% of the state in the URL?

@rcrezende
Copy link
Author

Note that this is different than #2103 and #1553 because this repro'ing while interacting with the filters from the dashboard. Not when sharing or pasting into the address bar.

This is a warning for who is willing to build complex dashboards targeting IE users.

And so my ask is to have a smaller representation of the state.

@rashidkpc
Copy link
Contributor

I've opened a new ticket for you here: #3947

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