-
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
Cypress began to inject additional markup into the downloaded csv, tsv & txt files (after v. 10.9.0) #24297
Comments
My issue looks quite similar to this unanswered issue: |
Hi @kryshenp . Thank you for opening an issue. I am working on putting together a reproduction repository here but am unable to reproduce the issue. are you downloading CSV's inside the origin command and would you mind helping me fill in the blanks to get this repo to be reproducible? It sounds like a bug with the injection logic, which with a reproduction I can likely narrow down fairly easily 😃 |
@kryshenp @MateuszKobiera If you could, can you run your test with |
Actually got a working reproduction here. I think this is the suspected area of code https://github.com/cypress-io/cypress/blob/develop/packages/proxy/lib/http/response-middleware.ts#L97. Likely needs to be fixed to check html like mime types over not javascript 😅 |
Hi @AtofStryker, thanks for reply.
|
Yeah, I see the "fullCrossOrigin" in my output. |
@kryshenp looks like it is injection on |
The code for this is done in cypress-io/cypress#24414, 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
Downloaded or opened in the new tab csv, tsv or txt file contains a very long markup code before the actual content of the file, for example
Desired behavior
Downloaded file should not contain any <script></script> markup.
It should contain actual csv/tsv/txt content, for example:
The issue started to happen after we updated Cypress from 10.8.0 to 10.9.0. Also occurs in Cypress 10.10.0
Test code to reproduce
Cypress Version
^10.8.0
Node version
16.13.1
Operating System
macOS 12.5.1
Debug Logs
No response
Other
Sadly, the issue is not reproducible when we're trying to download sample CSVs from here: https://www.sample-videos.com/download-sample-csv.php , it happens only on our product, which is closed to the public :(
The text was updated successfully, but these errors were encountered: