Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck on Loading Database after adding urls #1

Open
stuffed18 opened this issue Aug 24, 2024 · 7 comments
Open

Stuck on Loading Database after adding urls #1

stuffed18 opened this issue Aug 24, 2024 · 7 comments

Comments

@stuffed18
Copy link

I forked this repo and followed the instructions on adding urls, and I added a large archive.org ipa page. However, after pushing and trying to open in github pages, the page just gets stuck on loading database.
image
Any solution to this?

@relikd
Copy link
Owner

relikd commented Aug 24, 2024

How did you insert the url? Urls must be appended at the end and not in the middle. You added one at index 111, which shifts all other indices and thus invalidates their links. Maybe there is your problem already. Also, you dont need to push it github if you want to test it locally, just run php -S 0.0.0.0:80 (or a python simple server) inside the root dir of this project. Then you can access the same website via http://localhost

@relikd
Copy link
Owner

relikd commented Aug 24, 2024

Tip: try it with a very small archive first. Then you wont wait so long until it finishes. ... And you probably need to delete your changes and start again from my branch

@relikd
Copy link
Owner

relikd commented Aug 24, 2024

ok, nevermind my last two comments. The structure is as intended, I just run it myself and it ran without errors on the first url

./ipa_archive.py add https://archive.org/download/geometry-dash-ios-archive
./ipa_archive.py run
./tools/image_optim.sh
./ipa_archive.py export json

Which produced 48 changes. So I guess the second url produced errors.

Can you reset ipa_archive.py err reset and run again ipa_archive.py run to see if any errors show up?

@stuffed18
Copy link
Author

Well when I ran the commands it outputted this

$ python ipa_archive.py run
[2|4 queued]: load[51278] iphone-4s-64gb-black-ios-7.1.2-apps-.ipa-collection_0/Uncracked/2%20101-200/Cooking%202.0.1.ipa
[5|1 queued]: load[51298] iphone-4s-64gb-black-ios-7.1.2-apps-.ipa-collection_0/Uncracked/2%20101-200/Day%20One%201.14.2.ipa
[3|3 queued]: load[51281] iphone-4s-64gb-black-ios-7.1.2-apps-.ipa-collection_0/Uncracked/2%20101-200/Coupons%203.0.ipa
[4|2 queued]: load[51290] iphone-4s-64gb-black-ios-7.1.2-apps-.ipa-collection_0/Uncracked/2%20101-200/CrushTheCastle%201.5.ipa
[6|0 queued]: load[51303] iphone-4s-64gb-black-ios-7.1.2-apps-.ipa-collection_0/Uncracked/2%20101-200/Deluxe%206.3.ipa
[1|5 queued]: load[51275] iphone-4s-64gb-black-ios-7.1.2-apps-.ipa-collection_0/Uncracked/2%20101-200/Convertbot%201.6.1.ipa
Queue empty. done.

Ok after that as I was looking into it I found the solution to the issue, and I don't know why it happened. In the ipa.json file, on the last row it ends with ],] and after deleting the , and making it end with ]] it started working.

Also, the image_optim.sh script doesn't seem to work, basically repeats:
./tools/image_optim.sh: line 25: sips: command not found
./tools/image_optim.sh: line 26: [: : integer expression expected
./tools/image_optim.sh: line 27: sips: command not found
with an additional one at the end:
./tools/image_optim.sh: line 11: open: command not found
I could probably just make a python script that does the same thing as it but I thought you would want to know

@stuffed18
Copy link
Author

stuffed18 commented Aug 25, 2024

By the way, the issue with the comma seems to be reintroduced every time the json is updated

@relikd
Copy link
Owner

relikd commented Aug 25, 2024

What system you are using? The ipa.json is constructed semi-manually:

fp.write(json.dumps(entry, separators=(',', ':')) + ',\n')
fp.seek(max(fp.tell(), 3) - 2)
fp.write(']')

I assume on your system the tell() - 2 does not remove the last comma but only the newline (probably some automatic \r\n is added). I can probably fix that, but it would be easier to know what is happening on your machine.

Regarding the image_optim.sh issues, yeah, the script isnt optimized for other systems than macOS and makes assumptions that sips and the open command exists. If you can make it work with python that would be great. Though you can also just open ImageOptim and drag&drop the new image files in there. Thats the only thing the script does anyway.

@relikd
Copy link
Owner

relikd commented Aug 28, 2024

By the way, the issue with the comma seems to be reintroduced every time the json is updated

fixed with 34fa43a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants