Skip to content
EPUBCheck · Package document (OPF)

EPUBCheck OPF-030: unique-identifier not found

Updated:

EPUBCheck OPF-030 is an error message: “The unique-identifier "…" was not found.” The package element's unique-identifier attribute names an id that no dc:identifier element has. EPUB requires the book's main identifier to be marked this way, so the book has no valid identity until it is fixed.

The official message

The unique-identifier "%1$s" was not found.

Default severity
Error. The EPUB breaks a rule of the specification and is invalid. Stores and Send to Kindle may reject it, and EPUBCheck exits with status 1.
EPUBCheck version
5.4.0

%1$s, %2$s… are filled in with the file, value or element EPUBCheck found.

Typical causes

  • The id on dc:identifier was renamed or removed while editing the metadata by hand.
  • The dc:identifier itself was deleted, leaving the attribute pointing at nothing.
  • A typo or a difference in case between the two values.

How to fix it

  1. Read the value of unique-identifier on the package element.
  2. Give one dc:identifier the same id, for example <package unique-identifier="uid"> with <dc:identifier id="uid">urn:uuid:…</dc:identifier>.
  3. If the book has no identifier at all, add one (a UUID or an ISBN).

When it's not this

If the attribute is missing from the package element, that is OPF-048.

Terms used here

Other OPF messages

  • OPF-029 The file "…" does not appear to match the media type …, as specified in the OPF file.
  • OPF-031 File listed in reference element in guide was not declared in OPF manifest: ….
  • OPF-028 Undeclared prefix: "…".
  • OPF-032 Guide references "…" which is not a valid "OPS Content Document".
  • OPF-027 Undefined property: "…".
  • OPF-033 The spine contains no linear resources.

Sources

Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EpubCC.

FAQ

What does EPUBCheck OPF-030 mean?

EPUBCheck OPF-030 is an error message: “The unique-identifier "…" was not found.” The package element's unique-identifier attribute names an id that no dc:identifier element has. EPUB requires the book's main identifier to be marked this way, so the book has no valid identity until it is fixed.

Is OPF-030 an error?

OPF-030 is reported as error by default. The EPUB breaks a rule of the specification and is invalid. Stores and Send to Kindle may reject it, and EPUBCheck exits with status 1.

PDF to EPUB tools

Every tool uses the same engine and starts with a free 5-page sample.