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

JSON is not parsed successfully when downloading from some servers #82

Closed
lahmatiy opened this issue Sep 8, 2022 · 0 comments
Closed

Comments

@lahmatiy
Copy link
Member

lahmatiy commented Sep 8, 2022

Based on discoveryjs/discovery#48

JsonDiscovery reads JSON from text nodes of a document (since there is no any other way to get a loading content). Our assumption was that a browser never changes a nodeValue of added text nodes on loading. As we found, that's not always true. In some conditions, like slow servers, a browser can append a new content to existing text node instead of creating a new one. As a result JsonDiscovery skips some part of content and fails with a parse error. This problem was hard to investigate since hard to reproduce a conditions. Since the root cause is clear now, a fix is coming.

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

1 participant