transdroid icon indicating copy to clipboard operation
transdroid copied to clipboard

Access denied on qBittorrent

Open hardwareadictos opened this issue 5 years ago • 22 comments

Hello 😊

Getting denied acces to my qBittorrent server. ¿Seems latest qbittorrent builds are breaking app compatibility? App was working great some time ago 🤷🏻‍♂️

Thanks in advance 😊

Screenshot_20210526-173644.png

hardwareadictos avatar May 26 '21 15:05 hardwareadictos

Is this happening consistently? I'm getting this occasionally due to https://github.com/erickok/transdroid/issues/567

bwitt avatar May 28 '21 01:05 bwitt

This happens consistently for me.

I'm running qbittorrent version v4.3.4.1, and Transdroid version 2.5.18 (latest available on F-Droid).

This started happening ever since I upgraded my qbittorrent server a few months ago. I can still partially use Transdroid, but it's very glitchy. Whenever I try to do something in the app, it might give me that access is denied message. I can try refreshing Transdroid, and it may or may not give me access to whatever I'm trying to do.

It's basically a constant battle of refreshing over and over while trying to use Transdroid, and it is 100% consistent, it always does this.

ubergeek77 avatar May 31 '21 13:05 ubergeek77

Could you try to disable csrf protection in web interface settings?

erickok avatar Jun 01 '21 06:06 erickok

This happens consistently for me.

I'm running qbittorrent version v4.3.4.1, and Transdroid version 2.5.18 (latest available on F-Droid).

This started happening ever since I upgraded my qbittorrent server a few months ago. I can still partially use Transdroid, but it's very glitchy. Whenever I try to do something in the app, it might give me that access is denied message. I can try refreshing Transdroid, and it may or may not give me access to whatever I'm trying to do.

It's basically a constant battle of refreshing over and over while trying to use Transdroid, and it is 100% consistent, it always does this.

Exactly the same situation here

hardwareadictos avatar Jun 01 '21 06:06 hardwareadictos

Could you try to disable csrf protection in web interface settings?

CSRF disabled. Will report back in a couple of hours 😊

hardwareadictos avatar Jun 01 '21 06:06 hardwareadictos

Okay, seems to work better now, still having some issues like: "Internal error building the request"

hardwareadictos avatar Jun 01 '21 13:06 hardwareadictos

Could you try to disable csrf protection in web interface settings?

I disabled CSRF protection in the web interface, but the issue still persists for me.

ubergeek77 avatar Jun 01 '21 14:06 ubergeek77

I'm having the same issue when trying to connect to seedboxes qbittorrent client using SSL. I tried the solutions above but still results with same problem. I'm subscribed to a few seedboxes providers with qBittorrent and I get the same access denied error. Sometimes, for a split second though, it will show connected but then instantly go to access denied. Now if I were to use my own created SSL Key and Cert files for qBittorrent, then Transdroid can make a connection. Most seedbox companies are using nginx for there client apps though. This issue is only with qBittorrent, all other torrent clients I can connect just fine with SSL. Not sure if its relevant, but using the windows app Electorrent, I can connect to all seedboxes qBittorrent client SSL without issues.

ancientvamp avatar Jun 24 '21 23:06 ancientvamp

I don't think it has anything to do with SSL. I was previously running my qBittorrent instance behind a reverse proxy which was providing the SSL encryption. I've now had Transdroid connect directly to my qBittorrent instance insecurely over HTTP, and it still does this. SSL in the web settings is disabled.

However, I noticed that on this HTTP connection, it's been pretty much perfect except after I manually click the refresh button on the main page. Then it starts acting weird, immediately and consistently, every time. It does not do this when I pull to refresh, only after I click this refresh button.

Maybe the root cause can be investigated by looking at what that button does? Or maybe this is a fluke.

In any case, I am confident this has nothing to do with SSL, as I am experiencing it over plain HTTP.

ubergeek77 avatar Jun 24 '21 23:06 ubergeek77

I tested again with CRSF on and off and it works as intended.

If you have issues: do you have multiple servers or only one? I'd love to fix this but I can't reproduce it.

erickok avatar Aug 16 '21 12:08 erickok

I have one seedbox and one dedicated server. I can connect with transdroid just fine on my dedicated server which is Debian os, nginx redirect. Now my seedbox [https://www.appbox.co] is the one I / we having issues. There qbittorrent-nox is a one click installer from that seedbox app store. Its a docker install [https://registry.hub.docker.com/r/linuxserver/qbittorrent#!] Just cant connect to that with transdroid. Its like for a split sec or two it says connected but then says access denied. Now if I were install on my own qbittorrent-nox and run a static qbittorrent-nox [https://github.com/userdocs/qbittorrent-nox-static] I can connect with transdroid just fine.

ancientvamp avatar Aug 19 '21 10:08 ancientvamp

@eldervamp Is that docket image using some reverse proxy setup? That is most likely the cause (for example because headers are not passed through or Transdroid is not setting cookies, stuff like that).

erickok avatar Aug 20 '21 12:08 erickok

@eldervamp Is that docket image using some reverse proxy setup? That is most likely the cause (for example because headers are not passed through or Transdroid is not setting cookies, stuff like that).

I'm using the same Docker image as the person you are responding to, and I can tell you this still happens to me despite not using a reverse proxy. I'm accessing qbittorrent from transdroid via direct port over HTTP. I have used a reverse proxy in the past, but the result is exactly the same.

I wouldn't rule out that other user's experience as being a coincidence, because this issue is intermittent. Sometimes it happens, sometimes it doesn't. But it happens pretty consistently whenever I add a torrent or sit there and refresh the torrent list over and over.

Also important to mention - this didn't happen until 4 months ago when I updated my qbittorrent version. I believe the most recent version requires a newer API. Before then, absolutely no problems like this.

ubergeek77 avatar Aug 20 '21 14:08 ubergeek77

if it's intermittent, it could be #567

bwitt avatar Aug 20 '21 20:08 bwitt

Agreed. I've been keeping an eye on that issue as well. I would say that this issue and that one are basically addressing the same root problem.

ubergeek77 avatar Aug 20 '21 21:08 ubergeek77

@eldervamp Is that docket image using some reverse proxy setup? That is most likely the cause (for example because headers are not passed through or Transdroid is not setting cookies, stuff like that).

That seedbox has the qBittorrent Docker image [up-to-date version] using a nginx reverse proxy but like ubergeek77 mentioned, it also happens when not on a ssl connection. I even tried on a straight connection with there vpn bypassing the port forwarding but I still get that access denied issue. Only have this issue on the Docker image. I have no issue connecting to a non-docker qbittorrent-nox installation.

ancientvamp avatar Aug 20 '21 22:08 ancientvamp

I don't want to turn this into a "this app vs that app" discussion, but I think it's worth mentioning I do not have any issue like this when using qBittorrent Controller, which is also open source (but for what it's worth, I very much prefer using Transdroid).

Perhaps that can be used as a point of reference - maybe there is an oversight in Transdroid's API implementation that will become obvious when compared side-by-side with an app that is confirmed to work.

@eldervamp, can you try this app on your same qBittorrent instance that is having issues with Transdroid? I think it would be useful to confirm.

In any case, let me provide some info on my own use case that might help get to the bottom of this:

  • I have always used qBittorent in a Docker container, and I have always used LinuxServer's images.
  • Up until 4 months ago, I had been using the image tag 4.1.8.99201909272102.
    • This used qBittorrent-nox version 4.1.8.
    • I had ZERO issues with Transdroid on this version.
  • 4 months ago, I upgraded to image tag 14.3.4.99202104090418.
    • This uses qBittorrent-nox version 4.3.4.
    • This is when my issues with Transdroid began.
    • Unless I'm mistaken, this jump from qBittorrent 4.1.8 -> 4.3.4 also made the v2 API mandatory on qBittorrent's side.

Considering:

  • Transdroid was working perfectly fine with qBittorent-nox 4.1.8 in Docker;
  • there was a jump to API v2 when I updated my server to 4.3.4;
  • Transdroid started having issues for me at the exact same time I updated my server;
  • qBittorrent-Controller is able to use my newly-updated 4.3.4 container, which uses API v2, without issue
  • Transdroid's v2 API is already documented to be unstable

...I am inclined to believe it is an API implementation issue, rather than an issue caused by Docker.

ubergeek77 avatar Aug 20 '21 23:08 ubergeek77

I don't want to turn this into a "this app vs that app" discussion, but I think it's worth mentioning I do not have any issue like this when using qBittorrent Controller, which is also open source (but for what it's worth, I very much prefer using Transdroid).

Perhaps that can be used as a point of reference - maybe there is an oversight in Transdroid's API implementation that will become obvious when compared side-by-side with an app that is confirmed to work.

@eldervamp, can you try this app on your same qBittorrent instance that is having issues with Transdroid? I think it would be useful to confirm.

In any case, let me provide some info on my own use case that might help get to the bottom of this:

* I have always used qBittorent in a Docker container, and I have always used LinuxServer's images.

* Up until 4 months ago, I had been using the image tag [4.1.8.99201909272102](https://github.com/linuxserver/docker-qbittorrent/releases/tag/4.1.8.99201909272102-6726-359b464ubuntu18.04.1-ls44).
  
  * This used qBittorrent-nox version 4.1.8.
  * I had ZERO issues with Transdroid on this version.

* 4 months ago, I upgraded to image tag [14.3.4.99202104090418](https://github.com/linuxserver/docker-qbittorrent/releases/tag/14.3.4.99202104090418-7349-789803700ubuntu20.04.1-ls126).
  
  * This uses qBittorrent-nox version 4.3.4.
  * This is when my issues with Transdroid began.
  * Unless I'm mistaken, this jump from qBittorrent 4.1.8 -> 4.3.4 also made the v2 API mandatory on qBittorrent's side.

Considering:

* Transdroid was working perfectly fine with qBittorent-nox 4.1.8 in Docker;

* there was a jump to API v2 when I updated my server to 4.3.4;

* Transdroid started having issues for me at the exact same time I updated my server;

* qBittorrent-Controller is able to use my newly-updated 4.3.4 container, which uses API v2, without issue

* Transdroid's v2 API is already documented to be unstable

...I am inclined to believe it is an API implementation issue, rather than an issue caused by Docker.

I was thinking the same thing. On my last message, I was going to mention other apps that do work but I too didn't want to turn this into a app vs this app either. I prefer to use Transdroid myself :).
That app you mentioned: qBittorrent Controller, I have no connection issues at all either. Even these apps work: qBittorrent Remote and nzb360

Looking back, The seedbox provider I'm with first made the qBittorrent-nox app [docker image] available in its app store starting with version 4.3.5.

ancientvamp avatar Aug 20 '21 23:08 ancientvamp

Another thing I just considered; maybe non-Docker qBittorrent "working" is a red herring. You said this before:

Only have this issue on the Docker image. I have no issue connecting to a non-docker qbittorrent-nox installation.

However, it sounded like that was just a brief test. Do you have the exact same list of torrents in that non-Docker qbittorrent-nox installation? Was it just a blank list of torrents, or maybe just one or two torrents?

Maybe the number of torrents has something to do with it, rather than Docker. Perhaps uptime as well. Honestly... it could be anything, but I would at least put those things under consideration until they have been ruled out.

ubergeek77 avatar Aug 20 '21 23:08 ubergeek77

I never tried to connect to a qBit instance with more than a dozen or so torrents, because I do not have access to such a server. But yes, it could be a problem if there are thousands.

erickok avatar Aug 23 '21 13:08 erickok