-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Connection fails when server sends compressed responses #11212
Comments
Can you paste the result of
|
Hi sorry for the wait! This is using an internal ip:
while going through the external gives:
I did have to add the --compressed flag to the curl for this one, else it would return binary! |
Hm, I'm not entirely familiar with how curl deals with this kind of stuff. Is it possible that the response is compressed but doesn't contain compression headers? That could likely cause problems with the HTTP client in the app. Please post both Additionally, is there a possibility that you may give me a test account for your server? If so, please send the credentials to alvaro.brey AT nextcloud.com along with a link to this issue. |
Hi Alvaro, here's the header output:
I did some debugging with the app itself too the other night; it's definitely an issue based on if the server sends the From the call Since from what I can tell none of the other clients (either Win or ios/osx) actually do this request to |
So the headers are correct. Not sure why our HTTP lib is not picking this up or if it just doesn't support it... but if it was that case, I'm perplexed that this didn't come up earlier. Some technical context: the library uses two different HTTP clients: Apache HttpClient, which is the source of a lot of problems, and OkHttp. This operation still uses the old client, and switching it to OkHttp should fix it... but you'll probably end up with the same problem in a different operation. Since we don't have the time to completely port all operations to OkHttp now (although some progress is being made (nextcloud/android-library#881), I'd suggest for you as a workaround to disable compression in Tailscale if you can. I know it's not a good workaround, but it is a workaround anyway. I'll try to set up a local proxy with compression just to ensure that this is what's happening. |
Hey thanks again for taking a look at this! Very interesting.. I might bounce this thread over to the Tailscale guys and see if they have any thoughts -- the compressed response might be something to do with the way they forward the Wireguard connection. |
A thought: retry the
AFAIK HttpClient 3.1 doesn't support gzip content encoding. Though I too can't for the life of me fathom this not coming up before... Maybe there's a server in the path here that is very insistent about gzip... So for Also, question:
Does this test (which works) also bypass your reverse proxy too then or am I misunderstanding the topology? |
Hey all, with a fresh install of nextcloud 28, and the latest nextcloud/tailscale apps, I can confirm this no longer throws an error. |
Steps to reproduce
All devices are connected in the same Tailscale net.
Create a standard Nextcloud instance with docker.
Reverse-proxy this instance through a second docker Nginx container.
Generate a Tailscale HTTPS certificate, and apply to nginx proxy config.
Run the instance!
Connect to Nextcloud with another device on the tailscale network, ie: cloud.tailxxxxx.ts.net. Complete setup.
Connect Android device to Tailscale.
Try to connect with Android client through a Tailnet address (like cloud.tailxxxxx.ts.net). FAILS with "Server not found"
Expected behaviour
Android client should connect.
Actual behaviour
Client fails with "Server not found".
Note that this is very much an Android-client only issue! ON the exact same Android phone, without changing any connection, I can load the nextcloud page through firefox without any trouble. I also have tested this on a Macbook and the ipad app from the app store, all of which also work fine.
Android version
13
Device brand and model
Samsung S21+
Stock or custom OS?
Stock
Nextcloud android app version
Nextcloud-android/20221227 (dev)
Nextcloud server version
25.0.2
Using a reverse proxy?
Yes
Android logs
Abbreviated log; my tailnet info, etc. changed.
Server error logs
Additional information
The server is definitely seeing the Android request status.php, though I'm unsure why it's insisting the server isn't configured.
I can get the Android client to work IF I point it directly at the internal (not tailscale) dns name.
The text was updated successfully, but these errors were encountered: