Book does not load (was: HPub Validator)
Hi,
Is there any hpub content validator like epub validator out there ?
thx
Not to my knowledge, but:
- The HPub's
book.jsonfile is ultimately JSON, so you can use tools like http://jsonlint.com/ to perform a first validation - Baker will validate the file when it loads it, and show you error messages in the Debug area to point out what's wrong
If you're being shown an error when you try to open a downloaded Issue (.hpub) it might be how your zipped the content.
Select all the files and archive, instead of archiving the containing folder – otherwise you'll get an error everytime you download.
@Simbul : I have tried to use jsonlint.com and there's no problem with my json, because jsonlint only check if json string is in the right json format or not (correct me if I'm wrong). I have tried to download issue from my server and open it, but error occured : 2013-05-08 12:11:39.793 Newsstand[408:c07] • INIT 2013-05-08 12:11:39.794 Newsstand[408:c07] Device Width: 768.000000 2013-05-08 12:11:39.794 Newsstand[408:c07] Device Height: 1024.000000 2013-05-08 12:11:39.873 Newsstand[408:c07] Error when loading book status: Error Domain=NSCocoaErrorDomain Code=260 "The operation couldn’t be completed. (Cocoa error 260.)" UserInfo=0xabdcdf0 {NSFilePath=/Users/zakki/Library/Application Support/iPhone Simulator/6.0/Applications/53936872-0B81-4E97-8D7A-1BF5FF51D3E0/Library/Caches/statuses.json, NSUnderlyingError=0xabdcd50 "The operation couldn’t be completed. No such file or directory"} 2013-05-08 12:11:39.873 Newsstand[408:c07] STATUS: page: (null) 2013-05-08 12:11:39.874 Newsstand[408:c07] STATUS: scrollIndex: (null) 2013-05-08 12:11:39.922 Newsstand[408:c07] • LOAD BOOK WITH PATH: (null) 2013-05-08 12:11:39.922 Newsstand[408:c07] • Reset leftover page slot 2013-05-08 12:11:39.922 Newsstand[408:c07] • Reset page details array and empty screenshot directory 2013-05-08 12:11:39.923 Newsstand[408:c07] Pages in this book: 0 2013-05-08 12:11:39.923 Newsstand[408:c07] Screenshots are stored in /Users/zakki/Library/Application Support/iPhone Simulator/6.0/Applications/53936872-0B81-4E97-8D7A-1BF5FF51D3E0/Library/Caches/screenshots 2013-05-08 12:11:39.924 Newsstand[408:c07] NSScanner: nil string argument 2013-05-08 12:11:39.926 Newsstand[408:c07] • Set size for orientation: portrait 2013-05-08 12:11:39.926 Newsstand[408:c07] • Set tappable area size 2013-05-08 12:11:39.926 Newsstand[408:c07] • Init page details for the book pages 2013-05-08 12:11:39.926 Newsstand[408:c07] Prevent page from changing until layout is updated 2013-05-08 12:11:39.957 Newsstand[408:c07] • Show page details for the book pages 2013-05-08 12:11:39.958 Newsstand[408:c07] Unlock page changing 2013-05-08 12:11:39.958 Newsstand[408:c07] Set IndexView size to 768x1024, with pageY set to -20 2013-05-08 12:11:40.587 Newsstand[408:c07] Path to index view is (null) 2013-05-08 12:11:40.588 Newsstand[408:c07] Could not find index view at that path 2013-05-08 12:11:40.588 Newsstand[408:c07] Path to index view is (null) 2013-05-08 12:11:40.588 Newsstand[408:c07] Could not find index view at that path 2013-05-08 12:11:40.589 Newsstand[408:c07] • Add page to the loding queue 2013-05-08 12:11:40.589 Newsstand[408:c07] • Handle loading of slot 0 with page 1 2013-05-08 12:11:40.589 Newsstand[408:c07] • Setup new page for loading 2013-05-08 12:11:40.592 Newsstand[408:c07] • Setup webView 2013-05-08 12:11:40.628 Newsstand[408:c07] GoogleAnalytics 2.0b3 void GAIUncaughtExceptionHandler(NSException ) (GAIUncaughtExceptionHandler.m:41): Uncaught exception: ** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array 2013-05-08 12:11:45.854 Newsstand[408:c07] * Terminating app due to uncaught exception 'NSRangeException', reason: '* -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array' *** First throw call stack: (0x282b012 0x2650e7e 0x27cd0b4 0xa32e 0xa2b4 0x9d57 0x597d 0x45fe 0x1390753 0x1390a7b 0x139e590 0x13a65bd 0x13a6eab 0x13a74a3 0x13a7098 0x5c4be 0x5c390 0x5c414 0x1e26dc9 0x28850c5 0x27dfefa 0x1d5b482 0x1d6e73b 0x68233 0x680e7 0x2664705 0x12b0920 0x12b08b8 0x1371671 0x1371bcf 0x1370d38 0x12e033f 0x12e0552 0x1342e 0x12be3aa 0x12afcf8 0x31e1df9 0x31e1ad0 0x27a0bf5 0x27a0962 0x27d1bb6 0x27d0f44 0x27d0e1b 0x31e07e3 0x31e0668 0x12ad65c 0x2c22 0x2b55) libc++abi.dylib: terminate called throwing an exception
My file tree inside 15.hpub file is like this : 15 book -book.json -index.html -0001.html . . . -0040.html -assets -css -pages.css -images -item_0.png . . . -item_40.png -js
I also tried to change the folder inside hpub file without folder name 15 or put 15 inside book folder, but still, the error occured Btw, I used in5 to generate the files
Two quick things:
- Download the latest version, Baker 4.1, released yesterday. ;)
- Try what was suggested above: zip the files, not the folder. If you read the log, it says:
Pages in this book: 0, it means it can't find them, so it's likely a problem of the zip file.
@zakkiman is this still an issue?
I'm closing this due to the absence of follow-up. Reopen as needed. :)