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

Error appears out of order in validation sequence #1025

Closed
wareid opened this issue Mar 26, 2019 · 1 comment
Closed

Error appears out of order in validation sequence #1025

wareid opened this issue Mar 26, 2019 · 1 comment
Assignees
Labels
status: has PR The issue is being processed in a pull request
Milestone

Comments

@wareid
Copy link

wareid commented Mar 26, 2019

ERROR(PKG-007): 2019_03_25T14_19_31_Z_9781091038721.epub/mimetype(-1,-1): Mimetype file should only contain the string 'application/epub+zip' and should not be compressed.
Validating using EPUB version 3.2 rules.
ERROR(NCX-001): 2019_03_25T14_19_31_Z_9781091038721.epub/EPUB/xhtml/raw/contents.ncx(-1,-1): NCX identifier ('8c4a714c-83d7-3683-e9bf-c704a38886af') does not match OPF identifier ('urn:uuid:8c4a714c-83d7-3683-e9bf-c704a38886af').
INFO(CSS-007): 2019_03_25T14_19_31_Z_9781091038721.epub/EPUB/xhtml/pdf9vtli/pages/pdf.css(2,28): Font-face reference EPUB/xhtml/pdf9vtli/pages/f1.woff refers to non-standard font type application-type/font-woff.
INFO(CSS-007): 2019_03_25T14_19_31_Z_9781091038721.epub/EPUB/xhtml/pdf9vtli/pages/pdf.css(3,28): Font-face reference EPUB/xhtml/pdf9vtli/pages/f2.woff refers to non-standard font type application-type/font-woff.
Check finished with errors
Messages: 0 fatals / 2 errors / 0 warnings / 2 infos
EPUBCheck completed

PKG-007 Errors seem to always appear before the "Validating" string when run in terminal. So far the only error I have seen that does this.

@rdeltour
Copy link
Member

Definitely looks like a bug. Good catch!

@rdeltour rdeltour self-assigned this Mar 26, 2019
@rdeltour rdeltour added the status: accepted Ready to be further processed label Mar 26, 2019
@rdeltour rdeltour added this to the 4.2.0 milestone Mar 26, 2019
rdeltour added a commit that referenced this issue Mar 27, 2019
Internal changes:

- move the zip header checks from the `EpubCheck` class to the
  `OCFChecker` class
- run the checks _after_ the "Validating using EPUB version…" message
- make sure the checks are run in any case even when the validation
  aborts before the "Validating using EPUB version…" message.

Test changes:

- add a CLI test case for the message ordering
- update the invalid mimetype test files to be based on the minimal EPUB
- remove a duplicate test case (`lorem-mimetype-2`)

Fix #1025
@rdeltour rdeltour added status: has PR The issue is being processed in a pull request and removed status: accepted Ready to be further processed labels Mar 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: has PR The issue is being processed in a pull request
Projects
None yet
Development

No branches or pull requests

2 participants