Skip to content

Random OPF-018” warning being reported #1335

Closed

Description

@siddoib

While using epubCheck version 4.2.6, I am getting the following warning randomly
WARNING(OPF-018): .\output\kit.epub:OEBPS/isbn-9780190064617-front-matter-part-4.xhtml (19,19): The "remote-resources" property was declared in the Package Document, but no reference to remote resources has been found.

Most of the lines (not all) where epubCheck is reporting the error usually has an HTML list (ul or ol) tag which I don’t believe has anything to do with remote-resources properties.

All the XHTML documents in the epub package has a javascript (<script src="scripts/analyticsCreator.js" type="text/javascript"></script>) which adds another external script to the page, therefore we declared the ‘remote-resources’ properties for all XHTML pages in the OPF file.

As I’ve said above, every page has the same scripts but only handful (most of the time with HTML list tag) are being flagged with the “OPF-018” warning which makes me wonder whether this is epubCheck bug rather than an issue with my epub package.

Activity

  1. mattgarrish commented on Jun 2, 2022

    @mattgarrish
    Member

    Epubcheck can't test what happens at runtime so as far as it can detect you don't have any remote resources references in the document. That's why it's warning you that applying the label appears to be incorrect.

    I can't answer why it would report the issue in the file when it's the declaration in the package document that's at issue. I'm sure @rdeltour can speak to that.

    But just note that what you're doing is technically invalid per the specification. You can't reference remote scripts for security reasons, so while writing the script tag dynamically might get you past epubcheck, it's still likely the script will be blocked by reading systems. They don't even all retrieve remote resources you're allowed to reference.

  2. siddoib commented on Jun 6, 2022

    @siddoib
    Author

    @mattgarrish, many thanks for you reply. I think what I can't get my head around is that the “OPF-018” warning only flags a handful XHTML files whilst every single one of them in my epub has the same script. “OPF-018” flags the file as many times as there are HTML list (ul or ol) tags in the documents.

    The invalidity around the remote script is a compromise we had to make because our final epub files are intended for specifically tested platforms that we know will allow the remotely hosted script.

  3. rdeltour commented on Jun 6, 2022

    @rdeltour
    Member

    I think what I can't get my head around is that the “OPF-018” warning only flags a handful XHTML files whilst every single one of them in my epub has the same script. “OPF-018” flags the file as many times as there are HTML list (ul or ol) tags in the documents.

    Could it be that theses files just happen to be the same files containing other remote resources that EPUBCheck does detect?

    If you can share a sample here (privately is possible too: email me at rdeltour, Gmail), I can have a closer look 😊

  4. siddoib commented on Jun 6, 2022

    @siddoib
    Author

    @rdeltour, thanks for your help in advance. I have just sent you a sample file via the email address you mentioned above. let me know if you don't received it.

  5. rdeltour commented on Jun 20, 2022

    @rdeltour
    Member

    Thanks @siddoib for the test case.

    Something is apparently wrong with EPUBCheck:

    • OPF-018 is reported even when the content document contains scripting (in which case, only the USAGE-level OPF-018b message should be reported)
    • the error location is unrelated to the actual error

    I'll need to dig deeper in the code to see why.

  6. added
    type: false-positiveThis issue is about valid content being incorrectly rejected
    and removed
    status: waiting for feedbackThe development team needs feedback from the issue’s creator
    type: unverifiedThe issue couldn't be reproduced
    on Jun 20, 2022
  7. siddoib commented on Jun 20, 2022

    @siddoib
    Author

    Thanks @siddoib for the test case.

    Something is apparently wrong with EPUBCheck:

    * `OPF-018` is reported even when the content document contains scripting (in which case, only the `USAGE`-level `OPF-018b` message should be reported)
    
    * the error location is unrelated to the actual error
    

    I'll need to dig deeper in the code to see why.

    @rdeltour, thanks for looking. All noted.

  8. siddoib commented on Nov 7, 2022

    @siddoib
    Author

    @rdeltour, any update on this issue? thanks again for your help.

  9. added this to the v5.0.0-beta milestone on Nov 28, 2022
  10. added
    status: in progressThe issue is being implemented by the development team
    and removed on Nov 28, 2022
  11. added a commit that references this issue on Nov 28, 2022
    c3d767c
  12. added and removed
    status: in progressThe issue is being implemented by the development team
    on Dec 1, 2022
  13. rdeltour commented on Dec 5, 2022

    @rdeltour
    Member

    @rdeltour, any update on this issue? thanks again for your help.

    This should be fixed in v5.0.0-beta-3! Thanks again for the report 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: completedWork completed, can be closedtype: false-positiveThis issue is about valid content being incorrectly rejected

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ 换网址