-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
AST rewriting not adding closing script tag when string is too long #8043
AST rewriting not adding closing script tag when string is too long #8043
Comments
I've seen an issue with the AUT not loading with this option in a few cases. Hopefully this addresses some of those. 🤞 |
@jennifer-shehane Looks like we're not actually checking that the stream has finished being rewritten before returning the result, meaning long strings will complete after it returns: https://github.com/cypress-io/cypress/blob/develop/packages/rewriter/lib/html.ts#L17. Hopefully fixing with a PR later today. |
The code for this is done in cypress-io/cypress#8048, but has yet to be released. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior:
The following test case, with
experimentalSourceRewriting
turned on, will not properly render the page. (It doesn't properly render the page without it either, see #1068)It looks like when the source is being rewritten, something is causing the closing
</script>
tag to be omitted. When this tag is omitted, the rest of the page goes missing as well.Here's what the rewritten response looks like:
Here's the actual response:
From some initial investigations it appears that this is a bug caused by the length of the script.
The text was updated successfully, but these errors were encountered: