cannot save epub
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 34
- Joined: Fri Dec 02, 2016 9:55 pm
cannot save epub
Post by IsleofGough »
I have an epub generated from MadCap Flare which has several errors, making it impossible to upload to Amazon Kindle. I can open this in Oxygen XML editor and make the edits, but it does not allow these edits to be saved. I get the error message: Cannot save the file: null
Caused by: mimetype: bad entry CRC-32 '2cab616f expected a23b96c2. How can I fix this to allow saves? Thank you in advance.
Caused by: mimetype: bad entry CRC-32 '2cab616f expected a23b96c2. How can I fix this to allow saves? Thank you in advance.
-
- Posts: 9470
- Joined: Fri Jul 09, 2004 5:18 pm
Re: cannot save epub
Hi,
Oxygen uses a third party library to open and save EPUB archives. I'm not sure what the problem is, somehow the archive is probably corrupt in some way.
If you open the EPUB in a free ZIP utility like 7-ZIP, there is a toolbar "Test" button, it might report problems with the EPUB.
Regards,
Radu
Oxygen uses a third party library to open and save EPUB archives. I'm not sure what the problem is, somehow the archive is probably corrupt in some way.
If you open the EPUB in a free ZIP utility like 7-ZIP, there is a toolbar "Test" button, it might report problems with the EPUB.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 34
- Joined: Fri Dec 02, 2016 9:55 pm
Re: cannot save epub
Post by IsleofGough »
Unfortunately 7-Zip is Windows only. The issue is with the OSX version of Oxygen XML Author. The epub can be extracted if renamed "*.zip" and can be opened, edited, and saved in Calibre, Sigil, Jutoh, etc. I can save individual elements with "save as" in Oxygen, so I would agree that there is something about Oxygen's zip utility that is strange. I don't think it is the Flare output via Parallels itself, as no other program seems to have issues with the decompression/compression part. There is more than there should be of code errors in Flare, and I was hoping to fix these in Oxygen. I can fix them pretty well in Jutoh - but that is an epub only program (without the structured authoring features of Oxygen).
-
- Posts: 2881
- Joined: Tue May 17, 2005 4:01 pm
Re: cannot save epub
Hi,
It was discussed in private and the issue is with the specific EPUB file. I'm mentioning this here in case anyone else encounters this with v18.1 or earlier.
The issue that Oxygen cannot overcome with the EPUB archive in question is that the "mimetype" file/entry is compressed/deflated, when it should be uncompressed/stored (as per the EPUB specification). Oxygen expects the "mimetype" file to always be uncompressed/stored and if it isn't (like in this case), it treats it as if it were corrupted, hence the unhelpful "bad entry CRC-32" error message.
This situation will be handled more gracefully in a future version, maybe raise a warning (or a non-fatal error).
In the long term, it would be preferable to correct the EPUB (as per the specs). A quick fix for an EPUB with this issue would be to Extract the "mimetype" file to a local folder, or simply create a new text file with the name "mimetype" (no file extension) with the content, of exactly 20 characters, "application/epub+zip" (without quotes or line break). Then in the Archive Browser remove the old "mimetype" file/entry from the EPUB and add it back (Add Files...) from the local folder.
If, for whatever reason, you don't want to fix the EPUB, to work around this issue in Oxygen, you can configure it to treat EPUB archives as plain ZIP archives and it will no longer complain about the EPUB "mimetype" being corrupt. You can do this in Options > Preferences, Archive. Delete the "epub" entry. Add a new entry for the "epub" extension with the type "zip". This will allow you to modify and save the file to the "tricky EPUB".
However, I would like to mention that I do not recommend keeping this setting in the long term (treating EPUB as ZIP). When you're done with this EPUB (or after fixing the mimetype), use the "Restore Defaults" button from the Archive preferences section to restore the epub association.
Regards,
Adrian
It was discussed in private and the issue is with the specific EPUB file. I'm mentioning this here in case anyone else encounters this with v18.1 or earlier.
The issue that Oxygen cannot overcome with the EPUB archive in question is that the "mimetype" file/entry is compressed/deflated, when it should be uncompressed/stored (as per the EPUB specification). Oxygen expects the "mimetype" file to always be uncompressed/stored and if it isn't (like in this case), it treats it as if it were corrupted, hence the unhelpful "bad entry CRC-32" error message.
This situation will be handled more gracefully in a future version, maybe raise a warning (or a non-fatal error).
In the long term, it would be preferable to correct the EPUB (as per the specs). A quick fix for an EPUB with this issue would be to Extract the "mimetype" file to a local folder, or simply create a new text file with the name "mimetype" (no file extension) with the content, of exactly 20 characters, "application/epub+zip" (without quotes or line break). Then in the Archive Browser remove the old "mimetype" file/entry from the EPUB and add it back (Add Files...) from the local folder.
If, for whatever reason, you don't want to fix the EPUB, to work around this issue in Oxygen, you can configure it to treat EPUB archives as plain ZIP archives and it will no longer complain about the EPUB "mimetype" being corrupt. You can do this in Options > Preferences, Archive. Delete the "epub" entry. Add a new entry for the "epub" extension with the type "zip". This will allow you to modify and save the file to the "tricky EPUB".
However, I would like to mention that I do not recommend keeping this setting in the long term (treating EPUB as ZIP). When you're done with this EPUB (or after fixing the mimetype), use the "Restore Defaults" button from the Archive preferences section to restore the epub association.
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 34
- Joined: Fri Dec 02, 2016 9:55 pm
Re: cannot save epub
Post by IsleofGough »
I cannot thank the support team from Oxygen enough. The solution above works perfectly.
The compression of the mimetype appears to be a bug in Madcap Flare 2016R2 and can be replicated with even a blank file created from one of their templates. (Jutoh fixes this automatically when one imports and resaves the file, so it took awhile to figure out which ePubs could not be saved in Oxygen).
Oxygen XML editor works great with the file, so long as one follows the steps in the above post.
The compression of the mimetype appears to be a bug in Madcap Flare 2016R2 and can be replicated with even a blank file created from one of their templates. (Jutoh fixes this automatically when one imports and resaves the file, so it took awhile to figure out which ePubs could not be saved in Oxygen).
Oxygen XML editor works great with the file, so long as one follows the steps in the above post.
-
- Posts: 2
- Joined: Thu May 25, 2017 11:06 pm
Re: cannot save epub
I'm getting the same error, but it's just when I go to create a child topic in Author 18.0. Not sure why -- I can edit and save existing topics, but when I try to Append Child or Insert After, I get that error message. It's not a directory permission issue, because I can create/save some other kind of file (e.g., a Word document) in the same folder.... 

John Kafalas
Information Developer
Rocket Software
Waltham, MA
Information Developer
Rocket Software
Waltham, MA
-
- Posts: 9470
- Joined: Fri Jul 09, 2004 5:18 pm
Re: cannot save epub
Hi John,
So your particular problem is about using the Oxygen DITA Maps Manager right? But you obtain a similar Cannot save the file: null error message like the one discussed in this thread...
After you right click in the map and select "Append Child", do you use the "New" action to create a new topic on disk and append it to the DITA Map? Do you obtain that error after you choose the new file template? Does the error dialog have a "More details" link on it? Did this action ever work or does it work when saving in some folders but not in others?
If you are willing to investigate this further you can contact us via email (support@oxygenxml.com) and I can give you details about enabling logging in the application so that we can find out where the save operation breaks in our code (probably not related with file permissions though).
Regards,
Radu
So your particular problem is about using the Oxygen DITA Maps Manager right? But you obtain a similar Cannot save the file: null error message like the one discussed in this thread...
After you right click in the map and select "Append Child", do you use the "New" action to create a new topic on disk and append it to the DITA Map? Do you obtain that error after you choose the new file template? Does the error dialog have a "More details" link on it? Did this action ever work or does it work when saving in some folders but not in others?
If you are willing to investigate this further you can contact us via email (support@oxygenxml.com) and I can give you details about enabling logging in the application so that we can find out where the save operation breaks in our code (probably not related with file permissions though).
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service