-
-
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
Fail to upload using Android clients over WiFi #8549
Comments
Hi, Thanks for your report! |
Hi [: |
I can confirm this issue wasn't fixed in the 3.16.1 Android release (Nextcloud is 21.0.2). It does appear this is a result of TLS 1.3 as I had it forced in Caddy and upon removing that and thus allowing TLS 1.2, this issue went away. |
3.16.1 both f-droid and gplay; one phone yesterday could upload only 10/250 images over mobile data; today an another phone couldn't sign in to the app on WiFi, (but could on mobile data). |
So this is not about TLS, but about Wifi? |
Thank you for these hints! Can confirm this behaviour: |
Confirming that TLS 1.3 seems to be problematic. Changed to TLS 1.2 in Cloudflare and I could upload files from my phone via WIFI. Tested with Oneplus 8 Pro on Oxygen OS 11 app: 3.16.1 |
FWIW this is what is shown via adb logcat on the latest stable release from G-Play, when trying to upload a (random) file while connected through Wi-Fi. After switching to mobile data, the upload got rescheduled and completed successfully. The troublesome part is the RemoteOperationResult that returns NO_NETWORK_CONNECTION, although the Wi-Fi connection works fine for everything else, including downloading files from the nextcloud app itself (as mentioned by OP). |
Building & debugging the app (from master) on Android Studio, I can see that
The issue only happens on WiFi since the check is performed only when on Wi-Fi (why?) and is most likely in the usage of PlainClient, which (I can only guess) isn't able to handle TLS1.3. |
this is where PlainClient gets initialized, using "TLSv1" as protocol string, mapping to values in https://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html#SSLContext |
Ok, went further into the rabbit hole. I'm not into security protocols as much as I'd like to, so forgive me if the following suggestion makes no sense, but could the initiailzation in PlainClient.kt be made API dependant, targeting the highest available protocol for each API? Furthermore: does the issue lie in the initialization of PlainClient (meaning it should be filed under the android-library project) or is it in the usage of PlainClient wrt isInternetWalled() method in ConnectivityServiceImpl (meaning this is the right place)? |
@tobiasKaminsky I see you already made a pull request for centralizing TLS definition ( nextcloud/android-library#645 ). When the pull request is merged, this issue will be fixed too! |
This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you! |
unstale, pending |
Almost reached stale status, so I am here to unstale it. I migrated to Nextcloud 21.0.3 (even though the bug is in the Android Client if I got it right). |
This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you! |
Bug seems to be solved in latest stable (and published) release after the upstream fix in the android-library (nextcloud/android-library#645). Sometimes I still see a notification of a failed upload, however it appears to be random and difficult to trace. |
Tried the (f-droid) 3.17 release and seems to work just fine. @hrk Do you think the failed uploads are related to the same bug? |
FWIW I think this bug could be closed and the remaining random issues I get could be related to sudden network loss or switching from wifi to mobile when the upload is supposed to happen. |
This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you! |
Steps to reproduce
Expected behaviour
The file should be uploaded
Actual behaviour
The Android Client fails the upload with "Connection Error"
Notes
I don't know where to write additional notes, I am just leaving them here.
I am not using cloud flare, and I already read the issue nextcloud/server#17226.
After some troubleshooting I could solve the issue and address the problem to the cipher suites I was using in apache2.
In particular, I solved the issue using this configuration instead of this one.
During the troubleshooting I excluded that the issue was given by the reverse proxy and that using
trusted_proxies
as stated here didn't help.As I said, I already solved the prolem, but I am not really satisfied because I could not address what the real problem is.
So I am just leaving my little experience here, hoping it could help someone (dev and users).
Server configuration
Operating system: Debian 10
Web server: Apache2
Database: PostgreSQL
PHP version: 7.3.27
Nextcloud version: 20.0.10
Updated from an older Nextcloud/ownCloud or fresh install: Fresh Install
Where did you install Nextcloud from: Manual installation, downloaded from here
Signing status:
Signing status
List of activated apps:
App list
Nextcloud configuration:
Config report
Are you using external storage, if yes which one: Local storage
Are you using encryption: yes, server side
Are you using an external user-backend, if yes which one: No
Client configuration
Browser: Android Client 3.16.1 (latest from f-droid)
Operating system: Android 10, Android 11
Logs
Web server error log
Web server error log
Nextcloud log (data/nextcloud.log)
Nextcloud log
Browser log
Note: I didn't use dev-client
Browser log
The text was updated successfully, but these errors were encountered: