LivingWithHippos/unchained-android

Empty torrent list

LivingWithHippos opened this issue · 13 comments

  • the list is empty, but it works on real debrid
  • deleting some torrents fixes the issues
  • a user reported that the bug happens when going from 1027 to 1028 items (maybe it was 1024?)
  • unchained uses paging and retrieves 50 items at a time so it should not matter how items are in the list, seems like a bug on RD side

If anybody has this bug or has around 1000 items in the torrent list and wants to help with logs just write below here

Same on me https://gcdnb.pbrd.co/images/kEmJSLEc062N.png

If you or anyone else want to help me debug this:

Advanced users with linux

Run the command via curl to get the response info

curl -I --request GET \                                                                                                                     
  --url 'https://api.real-debrid.com/rest/1.0/torrents?page=1&limit=50' \
  --header 'Authorization: Bearer token_from_https://real-debrid.com/apitoken'

this should have no personal info so you should be able to paste it here

HTTP/2 200 
date: Sat, 04 Nov 2023 11:16:13 GMT
content-type: application/json
vary: Accept-Encoding
vary: Accept-Encoding
x-served-by: B3
x-total-count: 381
strict-transport-security: max-age=63072000
x-frame-options: SAMEORIGIN
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
referrer-policy: origin

Run the command again without the -I parameter, if the response code was 200 I want to know if its empty (or []) or not. If the status code was not 200 I want the whole response (if any)
Be careful to remove the api token or any other personal info.

Wget version:

wget --server-response \
  --header="Authorization: Bearer token_from_https://real-debrid.com/apitoken" \
  "https://api.real-debrid.com/rest/1.0/torrents?page=1&limit=50"

Easier way

  1. follow this link to hoppscotch, an online app to test REST APIs
  2. click on the get torrents tab (1), then the authorization subtab (2) and follow the link (3, https://real-debrid.com/apitoken) to get your api token, replace the link (3) with the code

real_debrid_hoppscotch

  1. Click send and wait a bit. If it fails without a response an option to change interceptor should appear, select proxy
select_proxy
  1. I want to know what kind of response you get when Unchained shows no results but they are still there in the real debrid website torrent section, the correct response should be a list of results like this

result_ok_01

result_ok_02
  1. Check the tests tab and see if any is failing (they wil fail if you don't have at least 100 items)

  2. Post the results here, either text or pictures, be careful to remove personal info in particular the api token. I want to know the status code and if it's not 200 the response body. If it's still 200 I want to know if the response body is empty or just different from the one in my picture (the structure, not the data)

Thanks @therealsbeve ! Can you confirm the torrent list does not work for you? There should be other tests below the ones in the screenshots, are those also ok (you don't need to do another screenshot unless some are failing)?

There's like 9 tests before the ones I sent you, but they all seem to be successful.

But is the list broken in the app for you? Or does it work? Because everything seems ok from your data

If you mean the 'Torrent' tab, then yes, it is blank and not working.
Screenshot_20231204_093146_Unchained

I ran the same api requests and I am getting the content from the response.

I may have solved the issue, can anyone test the latest built apk?

https://github.com/LivingWithHippos/unchained-android/actions/runs/7127889822

I may have solved the issue, can anyone test the latest built apk?

https://github.com/LivingWithHippos/unchained-android/actions/runs/7127889822

Where do you download it?
Screenshot_20231207-122940.png

I may have solved the issue, can anyone test the latest built apk?

https://github.com/LivingWithHippos/unchained-android/actions/runs/7127889822

I have downloaded the apk and can confirm it works. The standard apk doesn't run on my device but the apk-debug version does, and the torrents list are now showing.

I opened it on the browser instead and downloaded it. The normal build crashed when opening the app, but the debug app works and the list is now not empty.

Nice. The github app hides the exported stuff section in the action tab so you cannot download it from there, and the mobile version of the Github website shows them but does not allow them to be clicked, I have no idea why they don't fix it (it has been like this forever...). Anyway this always links to the latest action build (master only) https://nightly.link/LivingWithHippos/unchained-android/workflows/build.yaml/master