-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
[Bug] Binary fixture upload #70
Comments
Hi @kammerer Thanks for submitting the issue! In the meantime, we can blame Cypress, they are blaming Node.js 😃 |
Thanks for sharing this workaround! InvalidCharacterError: Failed to execute 'atob' on 'Window': The string to be decoded contains characters outside of the Latin1 range. The file I'm uploading is a PDF file Do you have an idea what goes wrong in my case? |
@MaaikeFox It seems my workaround does not work universally :( Have you perhaps tried the approach proposed in cypress-io/cypress#1558 (comment)? It did not work in my case but who knows, perhaps it will work for PDFs. |
@MaaikeFox please let us know your results – if that works, likely I need to extend PDF processing logic to support alternative encoding somehow.. Generally I suggest trying to play with I am happy to help with that, but the only thing here is – only you have this specific PDF, so if you can pick the investigation part and say what is the proper encoding for your PDF, I may bring support, add example with this file, etc. |
I also noticed an issue with cypress-file-upload. |
@Pieras2 thanks for the feedback! |
@abramenal I found workaround:
|
Not sure if that should be considered a bug in
cypress-file-upload
since there is also an ongoing discussion forcypress
itself: cypress-io/cypress#1558. Still, I think it makes sense to point out that there is a problem with binaries.Current behavior:
I am trying to upload binary files constituting a shapefile.
I specify
"binary"
as enconding, both for fixture and upload payload.I get
InvalidCharacterError: Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded
error when doing the upload.Desired behavior:
Upload works correctly with encoding specified as
"binary"
.Steps to reproduce: (app code and test code)
Workaround
Use
"base64"
as encoding (both for fixture loading and upload).Versions
cypress 3.2.0
cypress-file-upload: 3.1.1
Linux Mint 18.2 Cinnamon 64-bit
The text was updated successfully, but these errors were encountered: