ePub Files Created with Scrivener Fail Validation

NOTE: This article refers to an issue which has been resolved in updates to Scrivener. If you are encountering this problem, you should first make sure that you have the latest release of Scrivener before following the directions below.

In recent versions of ePubCheck, detection has been added to verify that the unique identifier for the ePub file is matching in the two different locations of the file where it is stored. Scrivener 2.4.1 (Mac OS X) contains a bug whereby the identifier is not described identically in both of these locations, and this will cause the following error to appear when attempting to validate the ePub file via anything that uses this new version of ePubCheck:

WARNING | OPS/toc.ncx | meta@dtb:uid content '<SOMETHING>'
should conform to unique-identifier in content.opf:

(<SOMETHING> will differ depending upon the actual unique identifier for your e-book.)

If you see this warning, you can take two routes:

  • Just ignore it: if the service you are publishing to does not recognise this as an error (given that it is classified as a warning, this is likely), or just doesn't use ePubCheck for it's upload checking, then you can most likely safely ignore the problem. No e-book reader is going to refuse to open a book over this. We consider this to be a very low impact warning. You can ignore the rest of this article.
  • Fix it with Sigil: if you are concerned about publishing an e-book with any warnings at all, or are using a service which denies upload of the book to their catalogue, then you will need to fix the problem. Fortunately this is easy enough to do, and the rest of this article will describe how to do so.

The Workaround

First, you will need to have a copy of Sigil installed. Sigil is a popular and easy to use cross-platform ePub editing program. Sigil makes it easy to open the ePub file and examine all of the components within it. You will be interested in fixing one file.


  1. Open your compiled .epub file in Sigil.
  2. In the Book Browser pane that appears along the left edge of the Sigil window, double-click on the toc.ncx file. You will likely receive a warning about editing advanced files, dismiss the error to continue.
  3. Somewhere near the top of this file, you should find the unique identifier for your book. If you did not specifically add a unique identifier in the Meta-Data compile option pane, then this will likely be a long string of letters and numbers grouped together with hyphens.
  4. In this line, add the phrase, urn:uuid: before the the unique identifier. It is important that this follow the double-quote so that it is included within the quoted phrase (that also includes the unique identifier). Consequently you should end up with something that looks like:

    <meta content="urn:uuid:<SOMETHING>" name="dtb:uid"/>

  5. Use File/Save from the Sigil menu, and quit to close your e-book. Now try submitting the book again and see if it uploads correctly to the vendor.

If you cannot get the e-book file fixed, we will be happy to take a look at it for you. Just send us a copy of the .epub file to our support e-mail address, with a reference to the nature of this problem so that our tech support folks can help you out.


This bug has been fixed in our current in-house build, and will no longer be a problem in the next free update of Scrivener. If you would like to keep up to date with advance-copy fixes, you can take advantage of our public beta. There is no need to sign up or register, anyone can download the beta and start using it immediately.