nextcloud / nextcloud/android

OfflineSyncJob pings server unnecessarily even though there's nothing to sync

Open
#8,898 2 comments 3 reactions 0 assignees View on GitHub
approved bug feature: power management feature: sync needs review
Dominant language
Kotlin
Stars
5.6k
Forks
2k
Avg merge
2d 18h
Merged PRs (30d)
92

Description

### Steps to reproduce
1. Install Nextcloud Android
2. Add server and user Credentials
3. Keep app in background
4. Wait up to 15 minutes

### Expected behaviour
- That the android app does not call out to the server when there's no reason to do so.

### Actual behaviour
- Every 15 minutes (when the OfflineSyncJob runs), the app makes a PROPFIND request to /remote.php/webdav/

### Environment data
Android version: 11

Device model: Galaxy S20 FE 5G

Stock or customized system:Stock

Nextcloud app version: 3.17.0

Nextcloud server version: 22.1

Reverse proxy: nginx-proxy

### Logs
#### Android App Debug Logs
```
08-24 21:20:09.133 4071 3543 D OfflineSyncJob: /: enter
08-24 21:20:09.151 4071 3543 D OfflineSyncJob: /: currentEtag: 612438bbb5b8b
08-24 21:20:09.158 4071 3543 D OwnCloudClient #0: REQUEST PROPFIND /remote.php/webdav/
08-24 21:20:09.160 4071 3543 V NativeCrypto: SSL shutdown failed: ssl=0x701d3608c8: I/O error during system call, Broken pipe
08-24 21:20:09.162 4071 3543 D AdvancedSslSocketFactory: Creating SSL Socket with remote ***my.server.location***:443, local null:0, params: org.apache.commons.httpclient.params.HttpConnectionParams@2745e80
08-24 21:20:09.162 4071 3543 D AdvancedSslSocketFactory: ... with connection timeout 5000 and socket timeout 40000
08-24 21:20:09.163 4071 3543 I ServerNameIndicator: SSLSocket implementation: com.google.android.gms.org.conscrypt.Java8FileDescriptorSocket
08-24 21:20:09.163 4071 3543 I ServerNameIndicator: SNI done, hostname: ***my.server.location***
08-24 21:20:18.979 1231 1613 D FastTrack: setFastTrackState: pid = 4071 ;tid= 4071 ;value= 0
08-24 21:20:18.981 1231 1613 D FastTrack: setFastTrackState: pid = 4071 ;tid= 3513 ;value= 0
08-24 21:20:18.989 1231 1613 D FastTrack: setFastTrackState: pid = 4071 ;tid= 4071 ;value= 1
08-24 21:20:18.990 1231 1613 D FastTrack: setFastTrackState: pid = 4071 ;tid= 3513 ;value= 1
08-24 21:20:27.859 4071 3543 D OfflineSyncJob: /: eTag unchanged
08-24 21:20:27.862 4071 3522 I WM-WorkerWrapper: Worker result SUCCESS for Work [ id=42d9dce1-bbec-454d-abbd-7943d396e661, tags={ timestamp:1629738398124, com.nextcloud.client.jobs.OfflineSyncWork, *, name:periodic_offline_sync } ]
08-24 21:20:27.870 1231 1613 D FastTrack: setFastTrackState: pid = 4071 ;tid= 4071 ;value= 0
08-24 21:20:27.871 1231 1613 D FastTrack: setFastTrackState: pid = 4071 ;tid= 3513 ;value= 0
08-24 21:20:27.892 1231 1613 D FastTrack: setFastTrackState: pid = 4071 ;tid= 4071 ;value= 1
08-24 21:20:27.893 1231 1613 D FastTrack: setFastTrackState: pid = 4071 ;tid= 3513 ;value= 1
```

I had initially commented on #7663 with the log message, but figured I should file a new bug report. I think the two are related. I think this could be a significant contributor to battery draining issues.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.