-
Notifications
You must be signed in to change notification settings - Fork 174
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
JSZip Returns an empty blob when ZipObject.async used #2115
Comments
More info on method used at : |
Thank you for your report. Could you please share a page and a test that can be used to reproduce the problem? Otherwise, I will need to create my own example. It will take some time and it's not guaranteed that the problem will be reproduced with it. |
Hey! I'll check with my superiors if the page can be shared and gladly will do so. |
Hey, great news! https://jsfiddle.net/L6adh8g1/98/ You can use the button to make the request to the zip and try to decompress it with jszip. You'll notice it returns 20 filesize for each file using testcafe and without using testcafe it returns different file size for each. Hope this helps bring out a solution! |
Thank you for sharing your example. Unfortunately, I get the following error when I try to run it without TestCafe: Error text
I also tried to view it without the editor (https://jsfiddle.net/L6adh8g1/98/show) but still get the same error. Could you please check if it works correctly on your side? |
Oh im sorry this might be the file we were accessing was deleted, let me try and find the same file through other url and publish again the jsfiddle |
Sorry about that, this is the new fiddle |
I had to finally edit the js fiddle to fetch a url that doesn't expire. This is the final fiddle, im sorry for the inconvenience. It's pretty hard to actually find a way to serve a file with a direct url to work with fetch. |
Hello, Thank you for the sample "JSFiddle" project. |
This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow. |
What is your Scenario?
Our app uses jszip to uncompress files from a zip. We get this file through a request and later try to unzip it using jszip.
At a certain point this command is run :
def.async('blob').then(content => new ContentData(path, content)
where def is a ZipObject.
What is the Current behavior?
When using our app without testcafe everything works properly, it returns a blob with correct filesize.
When using our app through testcafe the blob returned is size 20 and it turns out to be an empty string. It returns 20 whether the file is empty or it contains content. Each file provided from the zip file returns 20 and finally an empty file.
This makes decompressing these files impossible through testcafe's hammerhead.
What is the Expected behavior?
Decompressing with JSZip on testcafe should first get the correct size when using async on a jszip ZipObject of type binary
What is your public web site URL?
Your website URL (or attach your complete example):
Your complete app code (or attach your test files):
Screenshots:
Steps to Reproduce:
Your Environment details:
The text was updated successfully, but these errors were encountered: