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

Fuzzy behavior #27

Open
aef opened this issue May 27, 2021 · 2 comments
Open

Fuzzy behavior #27

aef opened this issue May 27, 2021 · 2 comments

Comments

@aef
Copy link

aef commented May 27, 2021

So I tried to load some EPUBs (based on ZIP containers). Sometimes they load fine, sometimes they fail. I wrote some tests for it here. At least for me these sometimes pass and other times they produce the following result:

deno test --unstable --allow-read epub.test.ts
running 3 tests from file:///home/aef/Projects/deno-zip/epub.test.ts
test can load an EPUB container file ... ok (30ms)
test can load another EPUB container file ... FAILED (4ms)
test can load an EPUB media type ... FAILED (4ms)

failures:

can load another EPUB container file
Error: Corrupted zip: can't find end of central directory
    at ZipEntries.readEndOfCentral (https://dev.jspm.io/npm:jszip@3.5.0/lib/zipEntries.dew.js:197:17)
    at ZipEntries.load (https://dev.jspm.io/npm:jszip@3.5.0/lib/zipEntries.dew.js:287:12)
    at https://dev.jspm.io/npm:jszip@3.5.0/lib/load.dew.js:64:18
    at async JSZip.loadAsync (file:///home/aef/Projects/deno-zip/mod.ts:172:5)
    at async readZip (file:///home/aef/Projects/deno-zip/mod.ts:22:3)
    at async file:///home/aef/Projects/deno-zip/epub.test.ts:15:32
    at async asyncOpSanitizer (deno:runtime/js/40_testing.js:21:9)
    at async resourceSanitizer (deno:runtime/js/40_testing.js:58:7)
    at async exitSanitizer (deno:runtime/js/40_testing.js:85:9)
    at async runTest (deno:runtime/js/40_testing.js:199:7)

can load an EPUB media type
Error: Corrupted zip: can't find end of central directory
    at ZipEntries.readEndOfCentral (https://dev.jspm.io/npm:jszip@3.5.0/lib/zipEntries.dew.js:197:17)
    at ZipEntries.load (https://dev.jspm.io/npm:jszip@3.5.0/lib/zipEntries.dew.js:287:12)
    at https://dev.jspm.io/npm:jszip@3.5.0/lib/load.dew.js:64:18
    at async JSZip.loadAsync (file:///home/aef/Projects/deno-zip/mod.ts:172:5)
    at async readZip (file:///home/aef/Projects/deno-zip/mod.ts:22:3)
    at async file:///home/aef/Projects/deno-zip/epub.test.ts:22:32
    at async asyncOpSanitizer (deno:runtime/js/40_testing.js:21:9)
    at async resourceSanitizer (deno:runtime/js/40_testing.js:58:7)
    at async exitSanitizer (deno:runtime/js/40_testing.js:85:9)
    at async runTest (deno:runtime/js/40_testing.js:199:7)

failures:

	can load another EPUB container file
	can load an EPUB media type

test result: FAILED. 1 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out (190ms)

I'm running

deno --version
deno 1.10.2 (release, x86_64-unknown-linux-gnu)
v8 9.1.269.27
typescript 4.2.2

on Linux 5.10.0-0.bpo.5-amd64 #1 SMP Debian 5.10.24-1~bpo10+1 (2021-03-29) x86_64 GNU/Linux

@aef
Copy link
Author

aef commented May 28, 2021

Today, all 3 tests failed without any code changes:

deno test --unstable --allow-read epub.test.ts 
running 3 tests from file:///home/aef/Projects/deno-zip/epub.test.ts
test can load an EPUB container file ... FAILED (8ms)
test can load another EPUB container file ... FAILED (70ms)
test can load an EPUB media type ... FAILED (19ms)

failures:

can load an EPUB container file
Error: Corrupted zip: can't find end of central directory
    at ZipEntries.readEndOfCentral (https://dev.jspm.io/npm:jszip@3.5.0/lib/zipEntries.dew.js:197:17)
    at ZipEntries.load (https://dev.jspm.io/npm:jszip@3.5.0/lib/zipEntries.dew.js:287:12)
    at https://dev.jspm.io/npm:jszip@3.5.0/lib/load.dew.js:64:18
    at async JSZip.loadAsync (file:///home/aef/Projects/deno-zip/mod.ts:172:5)
    at async readZip (file:///home/aef/Projects/deno-zip/mod.ts:22:3)
    at async file:///home/aef/Projects/deno-zip/epub.test.ts:8:32
    at async asyncOpSanitizer (deno:runtime/js/40_testing.js:21:9)
    at async resourceSanitizer (deno:runtime/js/40_testing.js:58:7)
    at async exitSanitizer (deno:runtime/js/40_testing.js:85:9)
    at async runTest (deno:runtime/js/40_testing.js:199:7)

can load another EPUB container file
Error: Corrupted zip: can't find end of central directory
    at ZipEntries.readEndOfCentral (https://dev.jspm.io/npm:jszip@3.5.0/lib/zipEntries.dew.js:197:17)
    at ZipEntries.load (https://dev.jspm.io/npm:jszip@3.5.0/lib/zipEntries.dew.js:287:12)
    at https://dev.jspm.io/npm:jszip@3.5.0/lib/load.dew.js:64:18
    at async JSZip.loadAsync (file:///home/aef/Projects/deno-zip/mod.ts:172:5)
    at async readZip (file:///home/aef/Projects/deno-zip/mod.ts:22:3)
    at async file:///home/aef/Projects/deno-zip/epub.test.ts:15:32
    at async asyncOpSanitizer (deno:runtime/js/40_testing.js:21:9)
    at async resourceSanitizer (deno:runtime/js/40_testing.js:58:7)
    at async exitSanitizer (deno:runtime/js/40_testing.js:85:9)
    at async runTest (deno:runtime/js/40_testing.js:199:7)

can load an EPUB media type
Error: Corrupted zip: can't find end of central directory
    at ZipEntries.readEndOfCentral (https://dev.jspm.io/npm:jszip@3.5.0/lib/zipEntries.dew.js:197:17)
    at ZipEntries.load (https://dev.jspm.io/npm:jszip@3.5.0/lib/zipEntries.dew.js:287:12)
    at https://dev.jspm.io/npm:jszip@3.5.0/lib/load.dew.js:64:18
    at async JSZip.loadAsync (file:///home/aef/Projects/deno-zip/mod.ts:172:5)
    at async readZip (file:///home/aef/Projects/deno-zip/mod.ts:22:3)
    at async file:///home/aef/Projects/deno-zip/epub.test.ts:22:32
    at async asyncOpSanitizer (deno:runtime/js/40_testing.js:21:9)
    at async resourceSanitizer (deno:runtime/js/40_testing.js:58:7)
    at async exitSanitizer (deno:runtime/js/40_testing.js:85:9)
    at async runTest (deno:runtime/js/40_testing.js:199:7)

failures:

	can load an EPUB container file
	can load another EPUB container file
	can load an EPUB media type

test result: FAILED. 0 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out (229ms)

@hayd
Copy link
Owner

hayd commented Jun 19, 2021

On docker I ran this more than 10 times without reproducing this error.

What OS are you using and which version of deno?

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

2 participants