08-19-2024, 02:39 PM | #1 |
Connoisseur
Posts: 92
Karma: 10
Join Date: Jan 2020
Device: kindle
|
sigil error invalid CEN header (bad signature)
I have suddenly developed this error when checking with epubcheck validator using sigil 2.3
Col: -1: FATAL(PKG-008): Unable to read file ""invalid CEN header (bad signature)"". |
08-19-2024, 03:00 PM | #2 |
Sigil Developer
Posts: 8,156
Karma: 5450818
Join Date: Nov 2009
Device: many
|
What platform? Which epubcheck version? Have you properly installed installed java (via jre or jdk)?
|
Advert | |
|
08-19-2024, 03:05 PM | #3 |
Sigil Developer
Posts: 8,156
Karma: 5450818
Join Date: Nov 2009
Device: many
|
Based on a google search ...
Invalid CEN header usually shows up when you have a corrupted zip/jar file. So probably you have corrupted the epubcheck java jar file. You might want to try replacing it with a freshly downloaded copy. |
08-19-2024, 03:07 PM | #4 | |
Connoisseur
Posts: 92
Karma: 10
Join Date: Jan 2020
Device: kindle
|
Quote:
Everything was working fine until I made some edits then the error appeared, I have not seen this error before and cannot find any info related to Sigil I re installed the epubcheck zip and ran the check and it upgraded the epubcheck to 5.1 and re installed the jar file, but the error is still the same message Last edited by increase; 08-19-2024 at 03:26 PM. |
|
08-19-2024, 03:23 PM | #5 |
Grand Sorcerer
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
|
It's also possible that the epub file (which is a zip file) was corrupted and epubcheck failed to read it. Or are you getting this error message for every epub that you're checking?
What's your operating system? Last edited by Doitsu; 08-19-2024 at 03:27 PM. |
Advert | |
|
08-19-2024, 03:31 PM | #6 |
Connoisseur
Posts: 92
Karma: 10
Join Date: Jan 2020
Device: kindle
|
My backup copies of the same epub file are ok no errors, only this one I am on windows 10
|
08-19-2024, 05:21 PM | #7 |
Sigil Developer
Posts: 8,156
Karma: 5450818
Join Date: Nov 2009
Device: many
|
I found the following similar bug report:
Spoiler:
So it appears that some Java Virtual Machines releases do not support unpacking zip files that are greater than 2GB, which is overly massive for a epub. Would your epub size be greater than 2GB? If so, you probably need a java jdk version that can read and write Zip64 format. There was a recent regression in released java versions that impacted this as many zip creators set the extra data field to be 0 which also causes an exception to be thrown which ends up with this same error message. So the java version you have does not like the zip that is created by python3 in the epubcheck python plugin code. Last edited by KevinH; 08-19-2024 at 05:37 PM. |
08-19-2024, 05:53 PM | #8 |
Connoisseur
Posts: 92
Karma: 10
Join Date: Jan 2020
Device: kindle
|
Yes my epub is rather large, but I think I have narrowed down the error to an image that I copied and pasted, I am working on that now, thanks for your help
|
08-20-2024, 03:55 AM | #9 |
Connoisseur
Posts: 92
Karma: 10
Join Date: Jan 2020
Device: kindle
|
still not having any success removing the error, I found this post
Error: Invalid CEN header (bad signature) Here is the fix, You need to specify your binary media types for your gw api otherwise it will get treated as utf-8 text which in this case manifested itself by losing the signature data. binaryMediaTypes: ["multipart/form-data", "application/zip"] does this have any bearing re sigil files |
08-20-2024, 08:59 AM | #10 |
Sigil Developer
Posts: 8,156
Karma: 5450818
Join Date: Nov 2009
Device: many
|
You do not have mulitipart form data. You are not uploading anything. There is no form.
Is your epub truly bigger than 2 GB in size? Have you tried updating to an older or newer java version on your machine since as I pointed out some recent java jdk/jre versions are broken in relation to handling zip files created by other tools. See: https://bugs.openjdk.org/browse/JDK-8315828 https://bugs.openjdk.org/browse/JDK-8313765 Last edited by KevinH; 08-20-2024 at 10:43 AM. |
08-20-2024, 12:26 PM | #11 | |
Grand Sorcerer
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
Unless the zipfile.ZipFile parameters have changed in the new Python version that comes with Sigil, there shouldn't be any problems. No, all the plugin does is zip up all epub files and run epubcheck with the temp .zip file as the input file. Whatever your problem is, it's not caused by Sigil. I just tested the plugin with a 50MB epub file and didn't get any error messages. BTW, the Java version on my machine is: Code:
java version "1.8.0_421" Java(TM) SE Runtime Environment (build 1.8.0_421-b09) Java HotSpot(TM) 64-Bit Server VM (build 25.421-b09, mixed mode) |
|
08-20-2024, 05:06 PM | #12 | |
Connoisseur
Posts: 92
Karma: 10
Join Date: Jan 2020
Device: kindle
|
Quote:
|
|
08-20-2024, 09:12 PM | #13 |
Sigil Developer
Posts: 8,156
Karma: 5450818
Join Date: Nov 2009
Device: many
|
Then Java was it. Thanks for letting us know. Glad you got it working.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ZipImportError:bad local file header ..\pylib.zip | luerman | Calibre | 2 | 09-19-2019 06:06 PM |
ZipImportError: bad local file header:C:\Program Files (x86)\Calibre2\aap\pylip.zip | Anders Gutmann | Calibre | 2 | 05-27-2018 06:46 PM |
Invalid Zip file - local header is damaged | Francois Driesen | Conversion | 3 | 09-18-2014 06:07 AM |
Bad magic number for file header error | RedCanyoneer | Devices | 8 | 03-13-2013 11:29 AM |
error message: ERROR ITMS-4099: "Invalid ISBN: [#] at Book (MZItmspBookPac | NewDay | ePub | 3 | 10-07-2010 01:47 PM |