baker icon indicating copy to clipboard operation
baker copied to clipboard

NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array — Believe Hpub is correct

Open methodradio opened this issue 13 years ago • 10 comments

I believe the hpub is formatted correctly. Copied all the files from within book and compressed.

One concern I have is I created my book through iWeb and just let it do the file organization.

I had this working at one point but cant seem to get positive results doing the same tactics suggested on Baker's page.

here are some SS of my files and JSONs, below is the code coming back when I select READ after my book has downloaded. files book shelf

I have been struggling with this specific issue fo nearly a month and cant seem to shake the error.

Happy to provide files if needed, looking for a solution and a reason why so I can avoid it.

Cheers to all.

2013-03-12 17:53:32.276 aspectsofentertainment[1707:c07] Error: param "title" is required but it's missing
2013-03-12 17:53:32.277 aspectsofentertainment[1707:c07] • INIT
2013-03-12 17:53:32.277 aspectsofentertainment[1707:c07]     Device Width: 768.000000
2013-03-12 17:53:32.277 aspectsofentertainment[1707:c07]     Device Height: 1024.000000
2013-03-12 17:53:32.322 aspectsofentertainment[1707:c07] Error when loading book status: Error Domain=NSCocoaErrorDomain Code=260 "The operation couldn’t be completed. (Cocoa error 260.)" UserInfo=0x9566970 {NSFilePath=/Users/administrator/Library/Application Support/iPhone Simulator/6.1/Applications/FDBCA630-0428-4F82-B2BA-B571C0FC31BA/Library/Caches/statuses.json, NSUnderlyingError=0x95c8160 "The operation couldn’t be completed. No such file or directory"}
2013-03-12 17:53:32.322 aspectsofentertainment[1707:c07] STATUS: page: (null)
2013-03-12 17:53:32.322 aspectsofentertainment[1707:c07] STATUS: scrollIndex: (null)
2013-03-12 17:53:32.323 aspectsofentertainment[1707:c07] • LOAD BOOK WITH PATH: (null)
2013-03-12 17:53:32.323 aspectsofentertainment[1707:c07] • Reset leftover page slot
2013-03-12 17:53:32.323 aspectsofentertainment[1707:c07] • Reset page details array and empty screenshot directory
2013-03-12 17:53:32.323 aspectsofentertainment[1707:c07]     Pages in this book: 0
2013-03-12 17:53:32.324 aspectsofentertainment[1707:c07] Screenshots are stored in /Users/administrator/Library/Application Support/iPhone Simulator/6.1/Applications/FDBCA630-0428-4F82-B2BA-B571C0FC31BA/Library/Caches/screenshots
2013-03-12 17:53:32.324 aspectsofentertainment[1707:c07] NSScanner: nil string argument
2013-03-12 17:53:32.680 aspectsofentertainment[1707:c07] • Set size for orientation: portrait
2013-03-12 17:53:32.680 aspectsofentertainment[1707:c07] • Set tappable area size
2013-03-12 17:53:32.680 aspectsofentertainment[1707:c07]     Prevent page from changing until layout is updated
2013-03-12 17:53:32.681 aspectsofentertainment[1707:c07] • Show page details for the book pages
2013-03-12 17:53:32.681 aspectsofentertainment[1707:c07]     Unlock page changing
2013-03-12 17:53:32.681 aspectsofentertainment[1707:c07] • Init page details for the book pages
2013-03-12 17:53:32.682 aspectsofentertainment[1707:c07] Set IndexView size to 768x1024, with pageY set to -20
2013-03-12 17:53:32.692 aspectsofentertainment[1707:c07] Path to index view is (null)
2013-03-12 17:53:32.692 aspectsofentertainment[1707:c07] Could not find index view at that path
2013-03-12 17:53:32.692 aspectsofentertainment[1707:c07] Path to index view is (null)
2013-03-12 17:53:32.693 aspectsofentertainment[1707:c07] Could not find index view at that path
2013-03-12 17:53:32.693 aspectsofentertainment[1707:c07] • Add page to the loding queue
2013-03-12 17:53:32.693 aspectsofentertainment[1707:c07] • Handle loading of slot 0 with page 1
2013-03-12 17:53:32.693 aspectsofentertainment[1707:c07] • Setup new page for loading
2013-03-12 17:53:32.696 aspectsofentertainment[1707:c07] • Setup webView
2013-03-12 17:53:32.698 aspectsofentertainment[1707:c07] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array'
*** First throw call stack:
(0x1d03012 0x16b0e7e 0x1ca50b4 0x9b0e 0x9a94 0x9537 0x5159 0x3f72 0x3d9103 0x3d94df 0x3d9704 0x3ed5c3 0x574309 0x5745e1 0x574650 0x333d66 0x333f04 0x14a37d8 0x2db4014 0x2da47d5 0x1ca9af5 0x1ca8f44 0x1ca8e1b 0x29977e3 0x2997668 0x2f5ffc 0x2602 0x2535)
libc++abi.dylib: terminate called throwing an exception
(lldb) 

methodradio avatar Mar 12 '13 22:03 methodradio

maybe you compressed the book.hpub folder , not the contents of that folder!

On Wednesday, March 13, 2013, methodradio wrote:

I believe the hpub is formatted correctly. Copied all the files from within book and compressed.

One concern I have is I created my book through iWeb and just let it do the file organization.

I had this working at one point but cant seem to get positive results doing the same tactics suggested on Baker's page.

here are some SS of my files and JSONs, below is the code coming back when I select READ after my book has downloaded. [image: files]https://f.cloud.github.com/assets/2636088/251267/71edff26-8b60-11e2-8cf6-f1af2f23f71c.png [image: book]https://f.cloud.github.com/assets/2636088/251270/7b109e42-8b60-11e2-937a-a43b71c410ec.png [image: shelf]https://f.cloud.github.com/assets/2636088/251272/7db68e7c-8b60-11e2-97fa-ba51a8ecf198.png

I have been struggling with this specific issue fo nearly a month and cant seem to shake the error.

Happy to provide files if needed, looking for a solution and a reason why so I can avoid it.

Cheers to all.

2013-03-12 17:53:32.276 aspectsofentertainment[1707:c07] Error: param "title" is required but it's missing 2013-03-12 17:53:32.277 aspectsofentertainment[1707:c07] • INIT 2013-03-12 17:53:32.277 aspectsofentertainment[1707:c07] Device Width: 768.000000 2013-03-12 17:53:32.277 aspectsofentertainment[1707:c07] Device Height: 1024.000000 2013-03-12 17:53:32.322 aspectsofentertainment[1707:c07] Error when loading book status: Error Domain=NSCocoaErrorDomain Code=260 "The operation couldn’t be completed. (Cocoa error 260.)" UserInfo=0x9566970 {NSFilePath=/Users/administrator/Library/Application Support/iPhone Simulator/6.1/Applications/FDBCA630-0428-4F82-B2BA-B571C0FC31BA/Library/Caches/statuses.json, NSUnderlyingError=0x95c8160 "The operation couldn’t be completed. No such file or directory"} 2013-03-12 17:53:32.322 aspectsofentertainment[1707:c07] STATUS: page: (null) 2013-03-12 17:53:32.322 aspectsofentertainment[1707:c07] STATUS: scrollIndex: (null) 2013-03-12 17:53:32.323 aspectsofentertainment[1707:c07] • LOAD BOOK WITH PATH: (null) 2013-03-12 17:53:32.323 aspectsofentertainment[1707:c07] • Reset leftover page slot 2013-03-12 17:53:32.323 aspectsofentertainment[1707:c07] • Reset page details array and empty screenshot directory 2013-03-12 17:53:32.323 aspectsofentertainment[1707:c07] Pages in this book: 0 2013-03-12 17:53:32.324 aspectsofentertainment[1707:c07] Screenshots are stored in /Users/administrator/Library/Application Support/iPhone Simulator/6.1/Applications/FDBCA630-0428-4F82-B2BA-B571C0FC31BA/Library/Caches/screenshots 2013-03-12 17:53:32.324 aspectsofentertainment[1707:c07] NSScanner: nil string argument 2013-03-12 17:53:32.680 aspectsofentertainment[1707:c07] • Set size for orientation: portrait 2013-03-12 17:53:32.680 aspectsofentertainment[1707:c07] • Set tappable area size 2013-03-12 17:53:32.680 aspectsofentertainment[1707:c07] Prevent page from changing until layout is updated 2013-03-12 17:53:32.681 aspectsofentertainment[1707:c07] • Show page details for the book pages 2013-03-12 17:53:32.681 aspectsofentertainment[1707:c07] Unlock page changing 2013-03-12 17:53:32.681 aspectsofentertainment[1707:c07] • Init page details for the book pages 2013-03-12 17:53:32.682 aspectsofentertainment[1707:c07] Set IndexView size to 768x1024, with pageY set to -20 2013-03-12 17:53:32.692 aspectsofentertainment[1707:c07] Path to index view is (null) 2013-03-12 17:53:32.692 aspectsofentertainment[1707:c07] Could not find index view at that path 2013-03-12 17:53:32.692 aspectsofentertainment[1707:c07] Path to index view is (null) 2013-03-12 17:53:32.693 aspectsofentertainment[1707:c07] Could not find index view at that path 2013-03-12 17:53:32.693 aspectsofentertainment[1707:c07] • Add page to the loding queue 2013-03-12 17:53:32.693 aspectsofentertainment[1707:c07] • Handle loading of slot 0 with page 1 2013-03-12 17:53:32.693 aspectsofentertainment[1707:c07] • Setup new page for loading 2013-03-12 17:53:32.696 aspectsofentertainment[1707:c07] • Setup webView 2013-03-12 17:53:32.698 aspectsofentertainment[1707:c07] * Terminating app due to uncaught exception 'NSRangeException', reason: '* -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array' *** First throw call stack: (0x1d03012 0x16b0e7e 0x1ca50b4 0x9b0e 0x9a94 0x9537 0x5159 0x3f72 0x3d9103 0x3d94df 0x3d9704 0x3ed5c3 0x574309 0x5745e1 0x574650 0x333d66 0x333f04 0x14a37d8 0x2db4014 0x2da47d5 0x1ca9af5 0x1ca8f44 0x1ca8e1b 0x29977e3 0x2997668 0x2f5ffc 0x2602 0x2535) libc++abi.dylib: terminate called throwing an exception (lldb)

— Reply to this email directly or view it on GitHubhttps://github.com/Simbul/baker/issues/764 .

*Qusai O. Tabbal *Front-End Mobile Developer Cell: +962 7 85 898 459

Stay Connected: [image: Facebook] http://www.facebook.com/qusaitabbal [image: Twitter] http://twitter.com/qusaitabbal [image: LinkedIn]http://www.linkedin.com/pub/qusai-tabbal/a/320/a45 [image: Google Maps]http://maps.google.com/maps/place?q=vardot+amman,+jordan+&hl=en&cid=12308299484894352974

  • Skype : QusaiTabbal* * *

qutehoot007 avatar Mar 12 '13 22:03 qutehoot007

went over that in the first sentence of post. the first photo is the contents of my book. I highlighted all of them and compressed them to hpub. that's correct from my understanding?

methodradio avatar Mar 12 '13 22:03 methodradio

It seems there's a comma in the last line of the 'content' array ("Part1-07.html",). The last line of arrays must not have commas. Check the Jason you're generating with a validation tool, you can find a link to one in the tutorial on the wiki. :)

folletto avatar Mar 13 '13 01:03 folletto

If what @folletto mentioned doesn't help, then maybe it can be the same problem i ran into a few days ago.

I believe you need to enable newsstand for your app on the itunesconnect site.

On the guide for setting up baker with newsstand it tells you to add an in-app-purchase, but enabling newsstand is also needed but not mentioned on the guide, although it's logical if you want to use newsstand, then you need to enable it xD

marcheluis avatar Mar 13 '13 23:03 marcheluis

thanks @folletto for the advice, it did not do the trick, @marcheluis is there any way you could elaborate further on 'enabling newsstand for app on itunes connect' ——— are you describing a registration type process for this, or a line of code in something like the Constants?

I am simply trying to make this app full functional on xcode before i send it off, is all this needed just to finish my tests?

Im kinda lost if you cant tell, thanks to all

methodradio avatar Mar 15 '13 18:03 methodradio

@methodradio: to enable newsstand for your app it's a procedure you have to do on apple's itunesconnect site: https://itunesconnect.apple.com/ and choose the "Manage Your Applications" option.

There you should already have registered your app and added an in-app-purchase if you followed the tutorial to configure newsstand.

There you need to select your app you want to enable newsstand from a list of the apps you have registered (if this is the first one, then it should only display one)

You now should be seeing a page with the information you provided apple when you registered your app. On the right side there should be some buttons that range from pricing, in-app purchases, etc. Choose "Manage Newsstand".

Then you just need to give the info they ask you for and an image that will be used as default cover. It should be pretty easy.

Edit: After enabling newsstand, you can add Issues to the "Manage Newsstand" section, which seems to me has nothing to do with the actual Issues you have on your app, it's just Issues you add to the appstore page so anyone checking it can see the Issues you have released.

marcheluis avatar Mar 15 '13 19:03 marcheluis

thanks, let me see what I get. cheers for now…

methodradio avatar Mar 15 '13 23:03 methodradio

As an aside, it's always a good idea to validate your JSON with http://jsonlint.com/ ;)

Simbul avatar Mar 18 '13 23:03 Simbul

@methodradio any luck with this issue?

Simbul avatar Mar 25 '13 22:03 Simbul

not sure what issue could have needed up being. started with s fresh copy of baker main and the files seem to be taking. will post back if/anything happens. thanks to all

methodradio avatar Mar 26 '13 19:03 methodradio