downloaded .zips (epub or html) not working #104986

Closed
opened 2024-10-21 14:45:43 +02:00 by Dalai Felinto · 8 comments

The .zip for either the epub or html are invalid .zip files (I tried opening them both in Linux and Mac).

So far I confirmed this with any of the .zip files, from 2.79 all the way to 4.2 and main (4.4).

I'm not sure if this is an issue with buildbot or cloudfare? but I thought better to report here since this is where users would look at before reporting it.

4.2 docs:

Main docs:

Error:

Archive:  blender_manual_epub.zip
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of blender_manual_epub.zip or
        blender_manual_epub.zip.zip, and cannot find blender_manual_epub.zip.ZIP, period.
The .zip for either the epub or html are invalid .zip files (I tried opening them both in Linux and Mac). So far I confirmed this with any of the .zip files, from 2.79 all the way to 4.2 and main (4.4). I'm not sure if this is an issue ~~with buildbot or~~ cloudfare? but I thought better to report here since this is where users would look at before reporting it. 4.2 docs: * https://docs.blender.org/manual/en/latest/blender_manual_html.zip * https://docs.blender.org/manual/en/latest/blender_manual_epub.zip Main docs: * https://docs.blender.org/manual/en/dev/blender_manual_html.zip * https://docs.blender.org/manual/en/dev/blender_manual_epub.zip Error: ``` Archive: blender_manual_epub.zip End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of blender_manual_epub.zip or blender_manual_epub.zip.zip, and cannot find blender_manual_epub.zip.ZIP, period. ```
Dalai Felinto added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2024-10-21 14:45:43 +02:00
Member

Confirm, the downloaded files are corrupt.

Start of the file seems to be a zip.

00000000  50 4b 03 04 14 03 00 00  00 00 27 75 55 59 00 00  |PK........'uUY..|
00000010  00 00 00 00 00 00 00 00  00 00 1c 00 00 00 62 6c  |..............bl|
00000020  65 6e 64 65 72 5f 6d 61  6e 75 61 6c 5f 76 34 32  |ender_manual_v42|
00000030  30 5f 65 6e 2e 68 74 6d  6c 2f 50 4b 03 04 14 03  |0_en.html/PK....|
00000040  00 00 08 00 27 75 55 59  8c 6c 28 ab ab 00 00 00  |....'uUY.l(.....|
00000050  e6 00 00 00 26 00 00 00  62 6c 65 6e 64 65 72 5f  |....&...blender_|
00000060  6d 61 6e 75 61 6c 5f 76  34 32 30 5f 65 6e 2e 68  |manual_v420_en.h|
00000070  74 6d 6c 2f 2e 62 75 69  6c 64 69 6e 66 6f 25 8d  |tml/.buildinfo%.|
00000080  49 6e 84 30 10 45 f7 9c  e2 4b bd 8d 5a 24 60 03  |In.0.E...K..Z$`.|
00000090  7d 8d 44 ca da 43 15 2e  09 95 23 6c a7 73 fc 40  |}.D..C....#l.s.@|
000000a0  b3 fc e3 bb e1 f3 27 89  fe c1 37 d9 22 44 39 e3  |......'...7."D9.|
Confirm, the downloaded files are corrupt. Start of the file seems to be a zip. ``` 00000000 50 4b 03 04 14 03 00 00 00 00 27 75 55 59 00 00 |PK........'uUY..| 00000010 00 00 00 00 00 00 00 00 00 00 1c 00 00 00 62 6c |..............bl| 00000020 65 6e 64 65 72 5f 6d 61 6e 75 61 6c 5f 76 34 32 |ender_manual_v42| 00000030 30 5f 65 6e 2e 68 74 6d 6c 2f 50 4b 03 04 14 03 |0_en.html/PK....| 00000040 00 00 08 00 27 75 55 59 8c 6c 28 ab ab 00 00 00 |....'uUY.l(.....| 00000050 e6 00 00 00 26 00 00 00 62 6c 65 6e 64 65 72 5f |....&...blender_| 00000060 6d 61 6e 75 61 6c 5f 76 34 32 30 5f 65 6e 2e 68 |manual_v420_en.h| 00000070 74 6d 6c 2f 2e 62 75 69 6c 64 69 6e 66 6f 25 8d |tml/.buildinfo%.| 00000080 49 6e 84 30 10 45 f7 9c e2 4b bd 8d 5a 24 60 03 |In.0.E...K..Z$`.| 00000090 7d 8d 44 ca da 43 15 2e 09 95 23 6c a7 73 fc 40 |}.D..C....#l.s.@| 000000a0 b3 fc e3 bb e1 f3 27 89 fe c1 37 d9 22 44 39 e3 |......'...7."D9.| ```
Author
Owner

@bartvdbraak could you help investigating this? Since the issue seems to be there since 2.79 I suspect this may be a cloudfare issue and not a buildbot?

~~@bartvdbraak could you help investigating this? Since the issue seems to be there since 2.79 I suspect this may be a cloudfare issue and not a buildbot?~~
Author
Owner

I talked to Danny, he said that files > 32MB are likely getting truncated. I will poke Francesco about it, since Danny believe it is something he changed.

I talked to Danny, he said that files > 32MB are likely getting truncated. I will poke Francesco about it, since Danny believe it is something he changed.
Francesco Siddi was assigned by Dalai Felinto 2024-10-21 15:04:59 +02:00
Member

Last time (10 months ago) it was related to the worker hijacking, and was reported and closed here:

#104654

Last time (10 months ago) it was related to the worker hijacking, and was reported and closed here: https://projects.blender.org/blender/blender-manual/issues/104654
Member

@fsiddi I looked at the old code that worked around this and it seems like it should be trivial to add to the current survey.

We have:

export default {
  async fetch(request) {
    const originalResponse = await fetch(request);
    return await appendJavascript(originalResponse);
  },
};

And the patched one has something like:

export default {
  async fetch(request) {
    const originalResponse = await fetch(request);
    const contentType = originalResponse && originalResponse.headers.get('Content-type');
    if (contentType && contentType.startsWith('text/html')) {
      const url = new URL(request.url);
      return await appendJavascript(originalResponse, url.hostname);    
    } else {
      return originalResponse;
    }
  },
};

Note how it returns the originalResponse if it's anything other than text/html.

@fsiddi I looked at the [old code]([url](https://dash.cloudflare.com/c17f5e2ddeb2f87d8c907cbe8864d2d6/workers/services/edit/worker-devfund-campaign-withconf/production)) that worked around this and it seems like it should be trivial to add to the current survey. We have: ``` export default { async fetch(request) { const originalResponse = await fetch(request); return await appendJavascript(originalResponse); }, }; ``` And the patched one has something like: ``` export default { async fetch(request) { const originalResponse = await fetch(request); const contentType = originalResponse && originalResponse.headers.get('Content-type'); if (contentType && contentType.startsWith('text/html')) { const url = new URL(request.url); return await appendJavascript(originalResponse, url.hostname); } else { return originalResponse; } }, }; ``` Note how it returns the `originalResponse` if it's anything other than `text/html`.
Member

I updated the code to use the new method and pushed it live.

My tests in an incognito page (ie: cache purged) seem fine, but I was still getting the 42.5 MB corrupted file in normal browser, even if I flushed the 2 urls in Cloudflare.

I am not sure why it is doing that or if it just needs more time, but it should in theory be fixed for new users. Can someone else verify?

I updated the code to use the new method and pushed it live. My tests in an incognito page (ie: cache purged) seem fine, but I was still getting the 42.5 MB corrupted file in normal browser, even if I flushed the 2 urls in Cloudflare. I am not sure why it is doing that or if it just needs more time, but it should in theory be fixed for new users. Can someone else verify?
Author
Owner

@dmcgrath it seems to be working now. Thanks!

@dmcgrath it seems to be working now. Thanks!
Blender Bot added
Status
Archived
and removed
Status
Needs Triage
labels 2024-10-21 18:15:49 +02:00
Contributor

If it is working, maybe close blender/blender-manual#104977.

If it is working, maybe close blender/blender-manual#104977.
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-manual#104986
No description provided.