nextcloud / android

📱 Nextcloud Android app
https://play.google.com/store/apps/details?id=com.nextcloud.client
GNU General Public License v2.0
4.26k stars 1.77k forks source link

Uploads fail with "Connection error" even though connection works (TLS1.3 broken for uploads, TLS1.2 OK) #8197

Closed moviuro closed 1 year ago

moviuro commented 3 years ago

Steps to reproduce

  1. Open Nextcloud
  2. Head to "Uploads"
  3. Tap a file with "Connection" error

Expected behaviour

Actual behaviour

Can you reproduce this problem on https://try.nextcloud.com?

Environment data

Android version: 11

Device model: Pixel 4a 5G

Stock or customized system: Stock

Nextcloud app version: 3.16.0 RC2

Nextcloud server version: 21.0.0 (PHP8)

Reverse proxy: haproxy+nginx

NB: my server only serves TLS 1.3 and requires SNI (the joys of having only IPv4 in this day and age)

Logs

Web server error log

No errors in log

Nextcloud log (data/nextcloud.log) (Android app log)

2021-03-21T20:02:28.924+0100;V;UploadsStorageManager;getUploads() got 0 rows from page 1, 9 rows total so far, last ID 1
2021-03-21T20:02:28.924+0100;V;UploadsStorageManager;getUploads() returning 9 (9) rows after reading 2 pages
2021-03-21T20:02:30.062+0100;E;UploadFileOperation;Upload of /storage/emulated/0/DCIM/Camera/PXL_20210319_092551675.jpg to /InstantUpload/Camera/PXL_20210319_092551675.jpg: No network connection
2021-03-21T20:02:30.062+0100;D;UploadsStorageManager;updateDatabaseUploadResult uploadResult: RemoteOperationResult(mSuccess=false, mHttpCode=-1, mHttpPhrase=null, mException=null, mCode=NO_NETWORK_CONNECTION, message=null, getLogMessage=No network connection) upload: com.owncloud.android.operations.UploadFileOperation@92c9df
2021-03-21T20:02:30.069+0100;V;UploadsStorageManager;Updating /storage/emulated/0/DCIM/Camera/PXL_20210319_092551675.jpg with status:UPLOAD_FAILED and result:NETWORK_CONNECTION (old:/storage/emulated/0/DCIM/Camera/PXL_20210319_092551675.jpg status:UPLOAD_IN_PROGRESS result:-1)
2021-03-21T20:02:30.070+0100;V;UploadsStorageManager;Updating /storage/emulated/0/DCIM/Camera/PXL_20210319_092551675.jpg with status=UPLOAD_FAILED
2021-03-21T20:02:30.075+0100;D;UploadsStorageManager;updateUpload returns with: 1 for file: /storage/emulated/0/DCIM/Camera/PXL_20210319_092551675.jpg
2021-03-21T20:02:30.075+0100;D;UploadsStorageManager;notifyObserversNow
2021-03-21T20:02:30.076+0100;D;FileUploader;NotifyUploadResult with resultCode: NO_NETWORK_CONNECTION
2021-03-21T20:02:30.081+0100;D;FileUploader;Stopping command after id 4
2021-03-21T20:02:30.081+0100;D;UploadListAdapter;loadUploadItemsFromDb
2021-03-21T20:02:30.083+0100;D;UploadsStorageManager;QUERY: status==0 OR last_result==9 OR last_result==13 OR last_result==11 OR last_result==14 AND account_name== ? ROWID: -1
2021-03-21T20:02:30.086+0100;V;UploadsStorageManager;getUploads() got 0 rows from page 0, 0 rows total so far, last ID -1
2021-03-21T20:02:30.086+0100;V;UploadsStorageManager;getUploads() returning 0 (0) rows after reading 1 pages
2021-03-21T20:02:30.088+0100;D;UploadsStorageManager;QUERY: status==1 AND last_result<>9 AND last_result<>13 AND last_result<>11 AND last_result<>14 AND account_name== ? ROWID: -1
2021-03-21T20:02:30.090+0100;V;UploadsStorageManager;getUploads() got 3 rows from page 0, 3 rows total so far, last ID 9
2021-03-21T20:02:30.090+0100;D;UploadsStorageManager;QUERY: (status==1 AND last_result<>9 AND last_result<>13 AND last_result<>11 AND last_result<>14 AND account_name== ?) AND _id < ? ROWID: 9
2021-03-21T20:02:30.093+0100;V;UploadsStorageManager;getUploads() got 0 rows from page 1, 3 rows total so far, last ID 9
2021-03-21T20:02:30.093+0100;V;UploadsStorageManager;getUploads() returning 3 (3) rows after reading 2 pages
2021-03-21T20:02:30.094+0100;D;UploadsStorageManager;QUERY: status==2 AND account_name== ? ROWID: -1
2021-03-21T20:02:30.097+0100;V;UploadsStorageManager;getUploads() got 9 rows from page 0, 9 rows total so far, last ID 1
2021-03-21T20:02:30.097+0100;D;UploadsStorageManager;QUERY: (status==2 AND account_name== ?) AND _id < ? ROWID: 1
2021-03-21T20:02:30.099+0100;V;UploadsStorageManager;getUploads() got 0 rows from page 1, 9 rows total so far, last ID 1
2021-03-21T20:02:30.099+0100;V;UploadsStorageManager;getUploads() returning 9 (9) rows after reading 2 pages

NOTE: Be super sure to remove sensitive data like passwords, note that everybody can look here! You can use the Issue Template application to prefill some of the required information: https://apps.nextcloud.com/apps/issuetemplate

Network trace

# tcpdump -tttnei bge0 port https
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on bge0, link-type EN10MB (Ethernet), capture size 262144 bytes
 00:00:00.000000 78:81:02:2e:5c:d4 > 98:f2:b3:e6:4d:54, ethertype IPv4 (0x0800), length 74: 151.80.43.167.64842 > 192.168.1.100.443: Flags [S], seq 3460956079, win 65535, options [mss 1240,sackOK,TS val 58825446 ecr 0,nop,wscale 8], length 0
 00:00:00.000091 98:f2:b3:e6:4d:54 > 78:81:02:2e:5c:d4, ethertype IPv4 (0x0800), length 74: 192.168.1.100.443 > 151.80.43.167.64842: Flags [S.], seq 1199358745, ack 3460956080, win 65535, options [mss 1460,nop,wscale 6,sackOK,TS val 3924191486 ecr 58825446], length 0
 00:00:00.030865 78:81:02:2e:5c:d4 > 98:f2:b3:e6:4d:54, ethertype IPv4 (0x0800), length 66: 151.80.43.167.64842 > 192.168.1.100.443: Flags [.], ack 1, win 256, options [nop,nop,TS val 58825492 ecr 3924191486], length 0
 00:00:00.001818 78:81:02:2e:5c:d4 > 98:f2:b3:e6:4d:54, ethertype IPv4 (0x0800), length 243: 151.80.43.167.64842 > 192.168.1.100.443: Flags [P.], seq 1:178, ack 1, win 256, options [nop,nop,TS val 58825494 ecr 3924191486], length 177
 00:00:00.000771 98:f2:b3:e6:4d:54 > 78:81:02:2e:5c:d4, ethertype IPv4 (0x0800), length 73: 192.168.1.100.443 > 151.80.43.167.64842: Flags [P.], seq 1:8, ack 178, win 1027, options [nop,nop,TS val 3924191518 ecr 58825494], length 7
 00:00:00.000015 98:f2:b3:e6:4d:54 > 78:81:02:2e:5c:d4, ethertype IPv4 (0x0800), length 66: 192.168.1.100.443 > 151.80.43.167.64842: Flags [F.], seq 8, ack 178, win 1027, options [nop,nop,TS val 3924191519 ecr 58825494], length 0
 00:00:00.029404 78:81:02:2e:5c:d4 > 98:f2:b3:e6:4d:54, ethertype IPv4 (0x0800), length 66: 151.80.43.167.64842 > 192.168.1.100.443: Flags [.], ack 8, win 256, options [nop,nop,TS val 58825524 ecr 3924191518], length 0
 00:00:00.003012 78:81:02:2e:5c:d4 > 98:f2:b3:e6:4d:54, ethertype IPv4 (0x0800), length 66: 151.80.43.167.64842 > 192.168.1.100.443: Flags [F.], seq 178, ack 9, win 256, options [nop,nop,TS val 58825527 ecr 3924191519], length 0
 00:00:00.000082 98:f2:b3:e6:4d:54 > 78:81:02:2e:5c:d4, ethertype IPv4 (0x0800), length 66: 192.168.1.100.443 > 151.80.43.167.64842: Flags [.], ack 179, win 1026, options [nop,nop,TS val 3924191552 ecr 58825527], length 0
 00:00:05.222193 98:f2:b3:e6:4d:54 > 78:81:02:2e:5c:d4, ethertype IPv4 (0x0800), length 129: 192.168.1.100.443 > 151.80.43.167.52761: Flags [P.], seq 3743102473:3743102536, ack 2447182969, win 1035, options [nop,nop,TS val 1426787209 ecr 1365080257], length 63
 00:00:00.000038 98:f2:b3:e6:4d:54 > 78:81:02:2e:5c:d4, ethertype IPv4 (0x0800), length 66: 192.168.1.100.443 > 151.80.43.167.52761: Flags [F.], seq 63, ack 1, win 1035, options [nop,nop,TS val 1426787209 ecr 1365080257], length 0
 00:00:00.025787 78:81:02:2e:5c:d4 > 98:f2:b3:e6:4d:54, ethertype IPv4 (0x0800), length 66: 151.80.43.167.52761 > 192.168.1.100.443: Flags [.], ack 63, win 502, options [nop,nop,TS val 1365260264 ecr 1426787209], length 0
 00:00:00.000058 78:81:02:2e:5c:d4 > 98:f2:b3:e6:4d:54, ethertype IPv4 (0x0800), length 66: 151.80.43.167.52761 > 192.168.1.100.443: Flags [F.], seq 1, ack 64, win 502, options [nop,nop,TS val 1365260265 ecr 1426787209], length 0
 00:00:00.000042 98:f2:b3:e6:4d:54 > 78:81:02:2e:5c:d4, ethertype IPv4 (0x0800), length 66: 192.168.1.100.443 > 151.80.43.167.52761: Flags [.], ack 2, win 1035, options [nop,nop,TS val 1426787235 ecr 1365260265], length 0
tobiasKaminsky commented 3 years ago

Is this happening for all uploads, also manual ones? What kind of wifi/mobile data/server/proxy setup do you have?

moviuro commented 3 years ago

It happens for all uploads: auto-backup, addressbook uploads, and manual uploads.

I use a WiFi connection with a 0.0.0.0/0 Wireguard VPN through my dedicated server. (https://play.google.com/store/apps/details?id=com.wireguard.android)

It used to work though, so that's weird (but I can't tell if it was a Nextcloud beta update that broke it or an Android 11 update).

moviuro commented 3 years ago

My networking setup looks like this:

network

My phone can successfully browse the Nextcloud instance but it can't upload files. I have even confirmed that I can browse to newly created files & folders (1. don't touch phone 2. use browser to create a dummy file on the server 3. use the phone to browse to that file 4. use the phone to remove that file). I can't see any reason for the uploads failing.

haproxy is used to do SNI redirection (because I only have one IPv4), see this article. Bypassing haproxy did not change the behavior (using a direct PAT: rdr pass on $ext_if inet proto tcp from any to $ext_if port https -> $nextcloud_s4 port https).

digraph network {
  bgcolor=transparent
  subgraph cluster_castle {
    label="NAS @ home";
    haproxy [shape=rectangle];
    "nextcloud on nginx" [shape=rectangle];
    postgresql [shape=rectangle];
  }

  "wg server" [shape=rectangle];
  phone -> "wg server" [label="encapsulated"]
  "wg server" -> haproxy -> "nextcloud on nginx" [label="https"]
  "nextcloud on nginx" -> postgresql [label="pgsql"]
}
hannibal218bc commented 3 years ago

I think I am experiencing the same issue. All of my automatic updates were in "waiting for free wifi", so I set my home wifi to "treat as free" and when tapping the waiting uploads they are moved to "failed". Any further tap displays a very short progress bar, then its back again to "Verbindungsfehler" (connection error). Browsing the server in the app as well as in Chrome works flawlessly. The uploads worked until mid-February, but i'm afraid I dont know which version was still working. Currently, it's 3.15.1 .

I'd be happy to troubleshoot, just give me a hint where to start or what to look for...?

moviuro commented 3 years ago

I downgraded from the beta client to the default version (3.16.0), the same issue started happening today :disappointed:

codemonkey1988 commented 3 years ago

I had the same issue till today with

In my case, it was because I only allowed TLS version 1.3 in my server nginx config. See https://github.com/nextcloud/android/issues/8355 Adding version 1.2, as described, fixed the problem for me.

moviuro commented 3 years ago

@codemonkey1988 this is weird. My Nextcloud app can actually navigate inside the server. Only uploads are broken.

codemonkey1988 commented 3 years ago

@moviuro same for me. I was able to browse my server using the app but uploads were failing with the message "connection error" The android app log gave me the hint, that the SSL handshake was failing for the upload, so I tried adding TLS 1.2 (and because I saw that issue in the list before)

chrpinedo commented 3 years ago

@codemonkey1988 I had the same issue. I allowed TLS1.2 also again and now uploads are working again. Thanks!

oakey-dev commented 3 years ago

Same issue here, Pixel 4 XL (stock, Android 11) TLS 1.3 only server Last upload worked on the 06.05. getting "connection error" when trying to upload a file Browsing the existing files, creating folders works without problems

benroscoe commented 3 years ago

So the TLS issue hit me twice recently. First I was failing to upload from my old android phone, as described above. So did a manual download to PC and uploaded from there. Then I lost several hours of my life fighting the dreaded login loop on my new phone. Even tried it on a random android tablet. Kept giving auth errors and not much else going wrong. Downgraded to TLS1.2. Login works. Uploads work.

stefanthoss commented 3 years ago

Same here. I have a HAProxy (version 1.8.27 with OpenSSL 1.1.1i) in front of my Nextcloud instance. I have the reverse proxy configured so that it only accepts TLS 1.3 and this used to work without issues. As reported by others in this thread, the photo auto uploads in Android suddenly stopped working. The browsing and downloading of files still worked. Other Android apps that use Nextcloud like Deck or Joplin also continued to work.

I removed no-tlsv12 from the advanced SSL options in HAproxy and the auto upload started working again.

AndyScherzinger commented 3 years ago

@stefanthoss are you running the latest patch release of the Android app: 3.16.1 released 1st June?

moviuro commented 3 years ago

Nextcloud Android 3.16.1 on Pixel 4a 5G running Android S (beta); TLS 1.3 only 21.0.2 Nextcloud server running on FreeBSD 12.x with PHP 8.0, the issue is still here.

@AndyScherzinger please re-open that issue. Using TLS 1.3 or 1.2 shouldn't matter, and nothing makes me believe it's been fixed.

hannibal218bc commented 3 years ago

Nextcloud Android 3.16.1 on Pixel 4a 5G running Android S (beta); TLS 1.3 only 21.0.2 Nextcloud server running on FreeBSD 12.x with PHP 8.0, the issue is still here.

@AndyScherzinger please re-open that issue. Using TLS 1.3 or 1.2 shouldn't matter, and nothing makes me believe it's been fixed.

Second that. Verified Google Store Version (updated just now), re-trying uploads immediately show "connection error".

AndyScherzinger commented 3 years ago

re-opened and pinging @tobiasKaminsky

forestEagle commented 3 years ago

I've been seeing the odd image auto upload not working for a while now - but tonight my SO was uploading some videos manually at home and noticed the same issue.

Been scratching my head over this one all evening. I also use Wireguard on my Samsung S10 - but in my case the problem seem to stem from using Wifi. 3/4G with or without WG works fine.

The Dev app with its Log feature shows me "No network connection" for the "E UploadFileOperation". Going down from TLS1.3 to 1.2 doesn't seem to make any difference. No hits (HEADs, PUTs) on the nginx access.log

I should add that browsing and downloading works fine. PCs works too.

moviuro commented 3 years ago

On my end though, I can confirm that:

Enabling/disabling WireGuard did not change the behavior.

forestEagle commented 3 years ago

After some more careful grepping through my reverse proxies' spaghetti of configs I've found I missed one 'ssl_protocols' line. In other words, yeah - TLS1.2 works :o) my bad.

AndyScherzinger commented 3 years ago

Using TLS 1.3 or 1.2 shouldn't matter, and nothing makes me believe it's been fixed.

@moviuro see https://github.com/nextcloud/android-library/pull/621/files that is what has changed with 3.16.1 and what should actually work and fallback 1.3->1.2->... So you second post means the client always falls back to 1.2

moviuro commented 3 years ago

what should actually work and fallback 1.3->1.2->...

Yes, I can confirm that if nginx only exposes TLS1.3 (ssl_protocols TLSv1.3;), the client (3.16.1) fails uploading. (Just tested it again this morning)

If needed, I can create an account on my Nextcloud instance for testers. (@tobiasKaminsky ? @AndyScherzinger ?) I idle on libera.chat (RIP freenode) and my email is: nickname @ google's popular mail service.

AndyScherzinger commented 3 years ago

Probably rather @tobiasKaminsky but is is afk till next week and yes a test account might be helpful but he might be better answering that questions.

github-actions[bot] commented 3 years ago

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!

stefanthoss commented 3 years ago

@stefanthoss are you running the latest patch release of the Android app: 3.16.1 released 1st June?

I just confirmed that this issue still exists with the Nextcloud Android App 3.16.1. I also upgraded my server's OpenSSL library to 1.1.1k. As soon as I add no-tlsv12 to the HAProxy config, the Android App complains with a Connection Error for auto uploads.

si90 commented 3 years ago

I can confirm the behavior mentioned by forestEagle: Uploads on 4G running fine, but on wifi it says "Connection error"; Enabling TLS 1.2 also fixes the issue --> why is wifi more restricted, than mobile internet? Is wifi treated as metered connection or something?

Setup: NginX with TLS1.3 only; Android App 3.16.1; Xiaomi Smartphone; Wireguard doesn't seem to have any impact

stefanthoss commented 3 years ago

Seems like a fix is coming with https://github.com/nextcloud/android-library/pull/645, different parts of the Android codebase use different TLS implementations in the current version.

joepitt91 commented 3 years ago

Hopefully nextcloud/android-library#645, will do the trick, from my experience I'd agree seems to be an incompatibility with TLSv1.3.

Server: apache running Nextcloud 21.0.3.1 Client: Nextcloud for Android 3.16.1 TLS Config: TLSv1.3 only

Doing a packet capture I can see:

Instant Upload

Other Actions

e.g. refreshing a folder

Josua-SR commented 3 years ago

\o/ I just want to thank everyone who figured this out! After fighting with auto-upload for more than a day, I had almost given up on my plans to maybe start actually using NC after evaluation.

github-actions[bot] commented 3 years ago

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!

joepitt91 commented 3 years ago

Not stale, just waiting: fixed version not yet released

github-actions[bot] commented 3 years ago

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!

hannibal218bc commented 3 years ago

Still happening with 3.17.0.

joepitt91 commented 3 years ago

Fixed for me in 3.17.0

moviuro commented 3 years ago

Looks OK to me too on 3.17.0 (just tried one picture). However, I'm worried that the fix will be brittle. The current code will have to be reviewed (again) when TLS1.4 comes out (or however it's called).

jwilczek commented 3 years ago

Appears to still be broken for me in 3.17.10 on 21.0.5

monte-monte commented 3 years ago

In my case Nextcloud app refuses to connect even if I leave TLS1.2 but not force it. So in my haproxy settings I have TLS 1.2 and 1.3 enabled, but Nextcloud app can't connect and I see "SSL handshake failed" in haproxy log. If I force use of TLS 1.2 then it works. Spent 3 hours to figure out why I can't connect from an app, when it works perfectly in browser. UPDATE: Well, I've spoke to early...now after trying some other settings and changing back to force-tlsv12 I still can't connect. Also I tried to login with Nextcloud talk app and it gave me a warning about unknown sertificate, but allowed to proceed. UPDATE 2: Okay, so app is buggy. To login to my nextcloud even after I changed TLS to 1.2 I had to try first try.nextcloud.com, then it said that address is not found, and after that I entered my own address and it connected. By the way I tried to reinstall app/reboot the phone and it did nothing. It seems to me like some mystical behaviour. UPDATE 3: Aaand it stopped working again by itself after some brief time. No I have app athourized into account, but I can't upload nor open any existing file. Also I found the log in settings and it have a bunch of SSL exceptions, without specifying those. In case it might be any helpful here is a log of me trying to open a file in the app and failing:

2021-10-16T04:29:25.852+0300;D;SettingsActivity;onStart() starting
2021-10-16T04:29:25.855+0300;D;SettingsActivity;onResume() starting
2021-10-16T04:29:26.425+0300;D;LogsActivity;onStop() ending
2021-10-16T04:29:26.425+0300;D;LogsActivity;onDestroy() ending
2021-10-16T04:29:26.738+0300;D;SettingsActivity;onPause() ending
2021-10-16T04:29:26.751+0300;V;BaseActivity;onRestart() start
2021-10-16T04:29:26.753+0300;D;FileDisplayActivity;onStart() starting
2021-10-16T04:29:26.783+0300;D;ExternalLinks;links disabled
2021-10-16T04:29:26.814+0300;V;FileDisplayActivity;onResume() start
2021-10-16T04:29:26.816+0300;D;FileDisplayActivity;onResume() starting
2021-10-16T04:29:26.817+0300;D;Avatar;URI: https://***.***/index.php/avatar/###/352
2021-10-16T04:29:26.817+0300;D;OwnCloudClient #0;REQUEST GET /index.php/avatar/###/352
2021-10-16T04:29:26.817+0300;D;AdvancedSslSocketFactory;Creating SSL Socket with remote ***.***:443, local null:0, params: org.apache.commons.httpclient.params.HttpConnectionParams@40f82f0
2021-10-16T04:29:26.818+0300;D;AdvancedSslSocketFactory; ... with connection timeout 60000 and socket timeout 60000
2021-10-16T04:29:26.820+0300;I;ServerNameIndicator;SSLSocket implementation: org.conscrypt.Java8EngineSocket
2021-10-16T04:29:26.820+0300;I;ServerNameIndicator;SNI done, hostname: ***.***
2021-10-16T04:29:26.894+0300;E;GetUserInfoRemoteOperation;Failed response while getting user information
2021-10-16T04:29:26.894+0300;E;GetUserInfoRemoteOperation;*** status code: -1
2021-10-16T04:29:26.903+0300;V;FileDisplayActivity;onResume() end
2021-10-16T04:29:27.391+0300;D;OwnCloudClient #0;REQUEST GET /status.php
2021-10-16T04:29:27.392+0300;D;AdvancedSslSocketFactory;Creating SSL Socket with remote ***.***:443, local null:0, params: org.apache.commons.httpclient.params.HttpConnectionParams@40f82f0
2021-10-16T04:29:27.393+0300;D;AdvancedSslSocketFactory; ... with connection timeout 60000 and socket timeout 60000
2021-10-16T04:29:27.394+0300;I;ServerNameIndicator;SSLSocket implementation: org.conscrypt.Java8EngineSocket
2021-10-16T04:29:27.394+0300;I;ServerNameIndicator;SNI done, hostname: ***.***
2021-10-16T04:29:27.414+0300;E;UpdateOCVersionOperation;Check for update of Nextcloud server version at https://***.***/remote.php/webdav: SSL exception
2021-10-16T04:29:27.450+0300;E;GetUserInfoRemoteOperation;Failed response while getting user information
2021-10-16T04:29:27.450+0300;E;GetUserInfoRemoteOperation;*** status code: -1
2021-10-16T04:29:27.450+0300;W;RefreshFolderOperation;Couldn't update user profile from server
2021-10-16T04:29:27.450+0300;D;RefreshFolderOperation;Checking changes in ###@***.***/
2021-10-16T04:29:27.452+0300;D;OwnCloudClient #0;REQUEST PROPFIND /remote.php/webdav/
2021-10-16T04:29:27.454+0300;D;AdvancedSslSocketFactory;Creating SSL Socket with remote ***.***:443, local null:0, params: org.apache.commons.httpclient.params.HttpConnectionParams@40f82f0
2021-10-16T04:29:27.455+0300;D;AdvancedSslSocketFactory; ... with connection timeout 5000 and socket timeout 40000
2021-10-16T04:29:27.456+0300;I;ServerNameIndicator;SNI done, hostname: ***.***
2021-10-16T04:29:27.474+0300;E;ReadFileRemoteOperation;Read file / failed: SSL exception
2021-10-16T04:29:27.474+0300;E;RefreshFolderOperation;Checked ###@***.***/ : SSL exception
2021-10-16T04:29:27.474+0300;D;RefreshFolderOperation;Send broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED
2021-10-16T04:29:27.475+0300;D;RefreshFolderOperation;Send broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED
2021-10-16T04:29:27.505+0300;D;FileDisplayActivity;Received broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED
2021-10-16T04:29:27.602+0300;D;FileDisplayActivity;Setting progress visibility to true
2021-10-16T04:29:27.602+0300;D;FileDisplayActivity;Received broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED
2021-10-16T04:29:27.681+0300;D;FileDisplayActivity;Setting progress visibility to false
2021-10-16T04:29:27.775+0300;D;SettingsActivity;onStop() ending
2021-10-16T04:29:27.776+0300;D;SettingsActivity;onDestroy() ending
2021-10-16T04:29:28.561+0300;V;FileDisplayActivity;onPause() start
2021-10-16T04:29:28.562+0300;D;FileDisplayActivity;onPause() ending
2021-10-16T04:29:28.562+0300;V;FileDisplayActivity;onPause() end
2021-10-16T04:29:28.580+0300;V;ExternalSiteWebView;onCreate() start
2021-10-16T04:29:28.581+0300;D;TextEditorWebView;onCreate(Bundle) starting
2021-10-16T04:29:28.676+0300;E;GetUserInfoRemoteOperation;Failed response while getting user information
2021-10-16T04:29:28.677+0300;E;GetUserInfoRemoteOperation;*** status code: -1
2021-10-16T04:29:28.694+0300;D;TextEditorWebView;onStart() starting
2021-10-16T04:29:28.705+0300;D;OwnCloudClient #0;REQUEST POST /ocs/v2.php/apps/files/api/v1/directEditing/open
2021-10-16T04:29:28.705+0300;D;AdvancedSslSocketFactory;Creating SSL Socket with remote ***.***:443, local null:0, params: org.apache.commons.httpclient.params.HttpConnectionParams@40f82f0
2021-10-16T04:29:28.705+0300;D;AdvancedSslSocketFactory; ... with connection timeout 5000 and socket timeout 40000
2021-10-16T04:29:28.706+0300;I;ServerNameIndicator;SSLSocket implementation: org.conscrypt.Java8EngineSocket
2021-10-16T04:29:28.706+0300;I;ServerNameIndicator;SNI done, hostname: ***.***
2021-10-16T04:29:28.714+0300;D;ExternalLinks;links disabled
2021-10-16T04:29:28.719+0300;D;TextEditorWebView;onResume() starting
2021-10-16T04:29:28.722+0300;E;DirectEditingOpenFileRemoteOperation;Get all direct editing informations failed: SSL exception
2021-10-16T04:29:28.771+0300;D;FileActivity;Operations service connected
2021-10-16T04:29:28.826+0300;D;TextEditorWebView;onPause() ending
2021-10-16T04:29:28.862+0300;V;FileDisplayActivity;onResume() start
2021-10-16T04:29:28.864+0300;D;FileDisplayActivity;onResume() starting
2021-10-16T04:29:28.953+0300;V;FileDisplayActivity;onResume() end
2021-10-16T04:29:29.122+0300;D;TextEditorWebView;onStop() ending
2021-10-16T04:29:29.126+0300;D;TextEditorWebView;onDestroy() ending
2021-10-16T04:29:29.425+0300;D;OwnCloudClient #0;REQUEST GET /status.php
2021-10-16T04:29:29.426+0300;D;AdvancedSslSocketFactory;Creating SSL Socket with remote ***.***:443, local null:0, params: org.apache.commons.httpclient.params.HttpConnectionParams@40f82f0
2021-10-16T04:29:29.426+0300;D;AdvancedSslSocketFactory; ... with connection timeout 60000 and socket timeout 60000
2021-10-16T04:29:29.428+0300;I;ServerNameIndicator;SNI done, hostname: ***.***
2021-10-16T04:29:29.445+0300;E;UpdateOCVersionOperation;Check for update of Nextcloud server version at https://***.***/remote.php/webdav: SSL exception
2021-10-16T04:29:29.475+0300;E;GetUserInfoRemoteOperation;Failed response while getting user information
2021-10-16T04:29:29.475+0300;E;GetUserInfoRemoteOperation;*** status code: -1
2021-10-16T04:29:29.475+0300;W;RefreshFolderOperation;Couldn't update user profile from server
2021-10-16T04:29:29.475+0300;D;RefreshFolderOperation;Checking changes in ###@***.***/
2021-10-16T04:29:29.477+0300;D;OwnCloudClient #0;REQUEST PROPFIND /remote.php/webdav/
2021-10-16T04:29:29.477+0300;D;AdvancedSslSocketFactory;Creating SSL Socket with remote ***.***:443, local null:0, params: org.apache.commons.httpclient.params.HttpConnectionParams@40f82f0
2021-10-16T04:29:29.477+0300;D;AdvancedSslSocketFactory; ... with connection timeout 5000 and socket timeout 40000
2021-10-16T04:29:29.478+0300;I;ServerNameIndicator;SNI done, hostname: ***.***
2021-10-16T04:29:29.492+0300;E;ReadFileRemoteOperation;Read file / failed: SSL exception
2021-10-16T04:29:29.492+0300;E;RefreshFolderOperation;Checked ###@***.***/ : SSL exception
2021-10-16T04:29:29.492+0300;D;RefreshFolderOperation;Send broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED
2021-10-16T04:29:29.492+0300;D;RefreshFolderOperation;Send broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED
2021-10-16T04:29:29.503+0300;D;FileDisplayActivity;Received broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED
2021-10-16T04:29:29.579+0300;D;FileDisplayActivity;Setting progress visibility to true
2021-10-16T04:29:29.579+0300;D;FileDisplayActivity;Received broadcast com.owncloud.android.operations.RefreshFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED
2021-10-16T04:29:29.661+0300;D;FileDisplayActivity;Setting progress visibility to false
2021-10-16T04:29:32.702+0300;V;FileDisplayActivity;onPause() start
2021-10-16T04:29:32.702+0300;D;FileDisplayActivity;onPause() ending
2021-10-16T04:29:32.703+0300;V;FileDisplayActivity;onPause() end
2021-10-16T04:29:32.722+0300;D;SettingsActivity;onCreate(Bundle) starting
2021-10-16T04:29:32.757+0300;D;SettingsActivity;onStart() starting
2021-10-16T04:29:32.759+0300;D;SettingsActivity;onResume() starting
2021-10-16T04:29:33.401+0300;D;FileDisplayActivity;onStop() ending
2021-10-16T04:29:33.403+0300;V;FileDisplayActivity;onSaveInstanceState() start
2021-10-16T04:29:33.403+0300;D;FileDisplayActivity;onSaveInstanceState(Bundle) starting
2021-10-16T04:29:33.403+0300;D;ExtendedListFragment;onSaveInstanceState()
2021-10-16T04:29:33.404+0300;V;FileDisplayActivity;onSaveInstanceState() end
2021-10-16T04:29:35.115+0300;D;SettingsActivity;onPause() ending
2021-10-16T04:29:35.132+0300;D;LogsActivity;onCreate(Bundle) starting
github-actions[bot] commented 2 years ago

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!

hannibal218bc commented 2 years ago

Still happening with 3.17.1 for me. I'd be happy to help, however I dont't know where to start (Server Settings? Experimental app build? ...)

daniel17903 commented 2 years ago

Still happening with 3.18.0 for me.

jerheij commented 2 years ago

Still happening for me with Nextcloud 22 and the newest Android version of the app. For me my first auto upload (picture) doesn't even finish but just stops half way. I feel like the upload gets "further" before it stops when I switch to TLS1.2 instead of 1.3.

When I use my wireguard VPN, even though I still access the service externally, it all works as expected. When I turn off wireguard I experience those symptoms.

My setup runs on a VPS on the internet, so the external IPs are assigned to the server directly so no need for NATing or port forwarding.

Nextcloud server: 22.0.0 Nextcloud android app: 3.18.1 Reverse proxy: nginx

eliasp commented 2 years ago

Happens here with:

olehj commented 2 years ago

I have this problem after I upgraded from Nextcloud 23 to 24.0.1 and to Ubuntu Server 22.04.

Android 12, April 5 Nextcloud app 3.20.1 Webserver NGINX Proxy Manager (from official docker) + Apache/MariaDB (Ubuntu Server) No wireguard

Auto-upload works without issue on iPhone 11..

Off-topic: some openssl issues with Ubuntu Server 22.04 had to be resolved too - but might be an indication that more stuff behind the scene happened.

jerheij commented 2 years ago

I have switched to Photosync and have had none of the above mentioned connection issues any more. Everything is working flawlessly and every upload seems to work first attempt so far.

This makes me think the issue is with the android app rather than anything else.

bencollinz commented 2 years ago

I have this problem after I upgraded from Nextcloud 23 to 24.0.1 and to Ubuntu Server 22.04.

Android 12, April 5 Nextcloud app 3.20.1 Webserver NGINX Proxy Manager (from official docker) + Apache/MariaDB (Ubuntu Server) No wireguard

Auto-upload works without issue on iPhone 11..

Off-topic: some openssl issues with Ubuntu Server 22.04 had to be resolved too - but might be an indication that more stuff behind the scene happened.

Did you resolve your issue, yet?

tobiasKaminsky commented 2 years ago

Can you create us a test account and send the credentials to tobias at nextcloud dot com with a reference to this issue?

olehj commented 2 years ago

I have this problem after I upgraded from Nextcloud 23 to 24.0.1 and to Ubuntu Server 22.04. Android 12, April 5 Nextcloud app 3.20.1 Webserver NGINX Proxy Manager (from official docker) + Apache/MariaDB (Ubuntu Server) No wireguard Auto-upload works without issue on iPhone 11.. Off-topic: some openssl issues with Ubuntu Server 22.04 had to be resolved too - but might be an indication that more stuff behind the scene happened.

Did you resolve your issue, yet?

Yes, it is resolved. If I remember correctly, I had, for whatever reason, pointed my cloud subdomain to wrong IPv6 address. Apple uses IPv4 by default as far as I know, Android does not and hence the problem. So not a problem on your side, sorry for the confusion and the late update.

tobiasKaminsky commented 2 years ago

App previously favored v6 over v4, but with latest change, we have a smarter way: https://en.wikipedia.org/wiki/Happy_Eyeballs

jerheij commented 2 years ago

Why is this bug now closed? What about the issues reported by other people? @moviuro didn't confirm it fixed either.

I am pretty sure the issue I reported has nothing to do with wrong DNS settings.

moviuro commented 2 years ago

@jerheij : I did say it was fixed though. https://github.com/nextcloud/android/issues/8197#issuecomment-921563834

I just tested again right now with Android app v3.20.3, and it worked on my TLS1.3-only server.

jerheij commented 2 years ago

@jerheij : I did say it was fixed though. #8197 (comment)

I just tested again right now with Android app v3.20.3, and it worked on my TLS1.3-only server.

Fair enough, I @ the wrong person, sorry! Regardless after you reported it as fixed there were other people (amongst myself) whom still reporting the bug as appearing.

Oh well, I guess I will keep using Photosync instead.