playmaker icon indicating copy to clipboard operation
playmaker copied to clipboard

/fdroid returns 404

Open rrrnld opened this issue 7 years ago • 4 comments

I set up playmaker locally to give it a try and everything worked fine; now I tried to set it up on a server where I deployed it via dokku, set up https via letsencrypt (the container runs without certificates though because it's proxied by nginx), created an app password etc.

I can login just fine, I can also search for and download apps; I persisted /data/fdroid to /var/lib/dokku/data/storage/playmaker, created the folder but didn't change any permissions. When trying to access the /fdroid url I get an error 404. When I check /var/lib/dokku/data/storage/playmaker the repo directory is empty. Here's an excerpt from the logs:

2018-07-09T09:40:17.325403198Z app[web.1]: Uploading device configuration
2018-07-09T09:40:17.781691078Z app[web.1]: Updating cache
2018-07-09T09:40:17.812961866Z app[web.1]: Cache correctly initialized
2018-07-09T09:40:57.945044371Z app[web.1]: Downloading com.whatsapp
2018-07-09T09:41:00.153335389Z app[web.1]: Adding com.whatsapp into cache..
2018-07-09T09:41:05.844516408Z app[web.1]: Downloading org.leo.android.dict
2018-07-09T09:41:07.302145999Z app[web.1]: Adding org.leo.android.dict into cache..
2018-07-09T09:46:59.639072638Z app[web.1]: Fdroid repo updated successfully
2018-07-09T09:48:28.614540160Z app[web.1]: WARNING:tornado.access:404 HEAD /index-v1.jar (172.17.0.1) 5.46ms
2018-07-09T09:48:28.812171950Z app[web.1]: WARNING:tornado.access:404 HEAD /index.jar?client_version=1.2.2 (172.17.0.1) 1.16ms
2018-07-09T10:00:22.598039836Z app[web.1]: Checking com.whatsapp
2018-07-09T10:00:22.608123931Z app[web.1]: 452400 == 452400 ?
2018-07-09T10:00:22.893802996Z app[web.1]: Checking org.leo.android.dict
2018-07-09T10:00:22.894003695Z app[web.1]: 54 == 54 ?
2018-07-09T10:00:44.793558768Z app[web.1]: Fdroid repo updated successfully
2018-07-09T10:01:04.798792596Z app[web.1]: Downloading com.tinder
2018-07-09T10:01:07.556840926Z app[web.1]: Adding com.tinder into cache..
2018-07-09T10:09:51.894171109Z app[web.1]: WARNING:tornado.access:404 HEAD /index-v1.jar (172.17.0.1) 4.23ms
2018-07-09T10:09:52.116336595Z app[web.1]: WARNING:tornado.access:404 HEAD /index.jar?client_version=1.2.2 (172.17.0.1) 1.20ms
2018-07-09T10:10:23.906804386Z app[web.1]: WARNING:tornado.access:404 HEAD /index-v1.jar (172.17.0.1) 4.36ms
2018-07-09T10:10:24.129604587Z app[web.1]: WARNING:tornado.access:404 HEAD /index.jar?client_version=1.2.2 (172.17.0.1) 1.22ms
2018-07-09T10:29:01.024630392Z app[web.1]: Fdroid repo updated successfully
2018-07-09T10:29:32.723741881Z app[web.1]: WARNING:tornado.access:404 GET /fdroid (172.17.0.1) 1.24ms

As you can see, there's quite a couple of 404s, especially after adding Tinder. The last one is me manually requesting /fdroid. Any idea what went wrong?

rrrnld avatar Jul 09 '18 10:07 rrrnld

I could fix /var/lib/dokku/data/storage/playmaker/repo being empty by first setting up persistent storage and then setting up the app anew (instead of redeploying it). Still GET /fdroid returns 404. It's weird because from skimming the source files it appears that tornado listens to 0.0.0.0; plus the bootstrap interface shows up correctly. Even from within the container curl localhost:5000/fdroid returns the same response:

$ curl localhost:5000/fdroid
<html><title>404: Not Found</title><body>404: Not Found</body></html>

Any help would be very appreciated.

rrrnld avatar Jul 09 '18 10:07 rrrnld

... well, it should have been /fdroid/ (note the trailing slash). Maybe the path in the web ui should be updated? Or is it redirected normally? Leaving this issue open for now.

rrrnld avatar Jul 09 '18 11:07 rrrnld

AFAIK it's normal that /fdroid returns 404, because there is no Directory Listings functionality in Tornado (like Nginx or Apache that let you list contents inside a folder). So you need to access directly the files inside the repo, like:

  • http://127.0.0.1:5000/fdroid/index.xml
  • http://127.0.0.1:5000/fdroid/categories.txt

Another cool workaround suggested here is to serve the fdroid repo directory directly from Nginx.

NoMore201 avatar Dec 06 '18 13:12 NoMore201

@heyarne the answer from @NoMore201 is correct. Since you're using Nginx, you can direct /fdroid to somewhere or serve a default page if you wish.

dogabone avatar May 21 '19 21:05 dogabone