transdroid icon indicating copy to clipboard operation
transdroid copied to clipboard

Connecting to Transmission 2.84 results in "internal error building request" until refreshed

Open ghost opened this issue 8 years ago • 11 comments

I tried this with Transmission 2.84 for Linux, the Windows Qt build, and Daemon. All 3 have the same error upon connecting.

As of Transdroid 2.5.6 and several versions before that, whenever I connect to Transmission 2.84, I get the "internal building request" error. When I tap to refresh, it connects successfully. This happens every single time I connect to a Transmission server without error. Sure, I can use the app just fine even with that error, but it would be nice to not have that error before being able to connect.

Tested on a Moto X 2015 Pure Edition with latest stock firmware.

ghost avatar Feb 29 '16 07:02 ghost

Same here on 2.90.

Freethefire avatar Mar 07 '16 11:03 Freethefire

I second that.

iMezouar avatar Mar 17 '16 23:03 iMezouar

Transmission 2.92 + Transdrone 2.5.6 = "Internal error building request"

AjaxOdessa avatar May 05 '16 10:05 AjaxOdessa

Reported by Charles via email:

I cloned your source and dug into it a bit and I have a one line fix for:

org.transdroid.daemon.Transmission.TransmissionAdapter.java

I believe when you retry the request on a 409 you are actually sending 2 session id headers. So the fix is just to insert the "removeHeaders" line like below:

// Retry post, but this time with the new session token that was encapsulated in the 409 response log.d(LOG_NAME, "Receive HTTP 409 with new session code; now try again for the actual request"); sessionToken = response.getFirstHeader(sessionHeader).getValue(); httppost.removeHeaders(sessionHeader); httppost.addHeader(sessionHeader, sessionToken); log.d(LOG_NAME, "Retry to execute " + data.getString("method") + " request, now with " + sessionHeader + ": " + sessionToken); response = httpclient.execute(httppost);

erickok avatar May 22 '16 12:05 erickok

I also have this issue, Transdroid 2.5.7.

stanelie avatar Jul 22 '16 13:07 stanelie

This is something to look forward to when you rewrite the network code to use (presumably) OkHttp: it's a much more friendly API than crummy old Apache HTTP.

paour avatar Mar 24 '19 05:03 paour

Three years later... Transdroid 2.5.14 // Transmission 2.92 – the bug is still present 😞

posledov avatar Apr 01 '19 19:04 posledov

Posledov, you are not running the latest Transmission though. I haven't got this problem at all anymore running Transmission 2.94 and latest Transdroid.

Freethefire avatar Apr 02 '19 08:04 Freethefire

@Freethefire, is it really problem of the Transmission? :slightly_smiling_face: I run transmission-daemon (v2.92), which installed from EPEL repo, and I don't want use any third-party Centos repos.

P.S.: Transmission Remote works as expected with 2.92 version, so why this bug is related to Transmission app instead of Transdroid? :thinking:

P.P.S.:

Reported by Charles via email:

I cloned your source and dug into it a bit and I have a one line fix for: org.transdroid.daemon.Transmission.TransmissionAdapter.java ...

UPD: @Freethefire, thanks for the tip about 2.94 version :handshake:

posledov avatar Apr 02 '19 09:04 posledov

@Posledov, That's strange. Although I'm running it from transmissionbt's website download on Lubuntu 18.10 and I never have that problem anymore.

And unfortunately I have no clue as to why it's working for me and not you. I hope you figure it out soon(or that it's fixed here), it's a real pain that bug.

Freethefire avatar Apr 02 '19 09:04 Freethefire

I cannot speak for other apps such as Transmission Remote, but I follow the implementation documentation as provided by Transmission itself. For example, the TR app might not cache session tokens and always request a new one. Regardless, I believe this to be a non-reproducable issue in new Transmisison versions. It's mostly open to collect opinions, follow up on the issue and help each other.

Happy to change code if this is proven to fix any issue.

erickok avatar Apr 02 '19 11:04 erickok