Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Infinite digest loop error logs too much data #15043

Closed
adamreisnz opened this issue Aug 19, 2016 · 4 comments
Closed

Infinite digest loop error logs too much data #15043

adamreisnz opened this issue Aug 19, 2016 · 4 comments

Comments

@adamreisnz
Copy link

Do you want to request a feature or report a bug?
Enhancement

What is the current behavior?
image

This goes on for pages and pages.

What is the expected behavior?
I would like the error message to be more legible, and for it not to include all my products JSON including Lorem Ipsum text etc. in it, because it's not being helpful and I can't make out anything meaningful from that mess.

What is the motivation / use case for changing the behavior?
To be able to debug more efficiently.

Which versions of Angular, and which browser / OS are affected by this issue? Did this work in previous versions of Angular? Please also test with the latest stable and snapshot (https://code.angularjs.org/snapshot/) versions.
1.5.8

Other information (e.g. stacktraces, related issues, suggestions how to fix)
Don't output nested object information, I don't think this is necessary. Or at least give us a flag so we might be able to toggle it on or off? Open to other suggestions as well.

@adamreisnz adamreisnz changed the title Infinite digest loop error logs too much information Infinite digest loop error logs too much data Aug 19, 2016
@gkalpak
Copy link
Member

gkalpak commented Aug 21, 2016

First of all, these error messages are not supposed to be legible in the console - they are URL encoded so the data can be presented better in the error page that the URL points to.

But I suppose logging arbitrarily deep objects doesn't help either. Maybe we could have a (configurable?) limit in the depth in which we traverse the logged objects.

@adamreisnz
Copy link
Author

@gkalpak Yeah, I think I gave up on clicking those links a long time ago as they often didn't work or didn't properly show the full extent of the error. There are some open issues in the Angular repo around this from what I saw yesterday when I was searching for my issue, so I don't find it very reliable.

Second, I prefer debugging in the Chrome console, and I often need to inspect network requests and the like, so I have it open most of the time. These monstrously long error messages are occasionally freezing up my console or almost slowing it down to a halt. And I have a pretty high end computer ;)

I just don't think that such long messages are helping anyone. The error seems to be chucking whatever object/array that changed into the log, which could very well be an array of 1000 complex objects that was received from the server.

I think some depth limit should definitely be applied, and for arrays perhaps a limit of how many items are displayed out of that array with something like ...295 more at the end.

@petebacondarwin petebacondarwin modified the milestones: Backlog, Backlog2 Oct 17, 2016
@gkalpak
Copy link
Member

gkalpak commented Mar 12, 2017

This will be (partially) addressed by #15707.

@Narretz
Copy link
Contributor

Narretz commented Oct 11, 2017

This is basically just a special case of #14744

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

No branches or pull requests

4 participants