nextcloud / nextcloud/android

Upload via Share/Send feature fails with (incorrect) NO_NETWORK_CONNECTION

Open
#12,963 1 comment 1 reaction 0 assignees View on GitHub
bug connectivity feature: app-to-app sharing feature: transfers
Dominant language
Kotlin
Stars
5.6k
Forks
2k
Avg merge
2d 18h
Merged PRs (30d)
92

Description

### ⚠️ Before posting ⚠️

- [X] This is a **bug**, not a question or an enhancement.
- [X] I've [searched for similar issues](https://github.com/nextcloud/android/issues) and didn't find a duplicate.
- [X] I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
- [X] I agree to follow Nextcloud's [Code of Conduct](https://nextcloud.com/contribute/code-of-conduct/).

### Steps to reproduce

1. Select a picture from the gallery on a Samsung S21
2. Chose to share/send the picture, chose "nextcloud" for that
3. Navigate the folder structure on the server side inside the Android app.
Those network requests are logged on the server side.
4. Once you see the folder on the server side inside your android app chose the "Upload" button.
5. A popup appears for maybe 1/10th of a second and vanishes again, nothing else happens.
The picture is _not_ uploaded, no request for the upload is logged on the server side.
6. That can be reproduced in 100% of all attempts.

### Expected behaviour

The picture should get uploaded to the server.

### Actual behaviour

The picture is not uploaded, no network request is done for the upload, although other network requests to the nextcloud server are done and succeed.

### Android version

11

### Device brand and model

Samsung Galaxy S21

### Stock or custom OS?

Stock

### Nextcloud android app version

Current (3.29.0)

### Nextcloud server version

Current (28 and 29)

### Using a reverse proxy?

No

### Android logs

2024-05-01 16:31:40.273 18975-19599 UploadFileOperation com.nextcloud.client E Upload of /storage/emulated/0/Android/media/com.nextcloud.client/nextcloud/tmp/xxx@xxx/xxx/IMG-20240429-WA0002.jpg to /xxx/IMG-20240429-WA0002.jpg: No network connection
2024-05-01 16:31:40.273 18975-19599 UploadsStorageManager com.nextcloud.client D 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@c911752
2024-05-01 16:31:40.277 18975-19599 UploadsStorageManager com.nextcloud.client V Updating /storage/emulated/0/Android/media/com.nextcloud.client/nextcloud/tmp/xxx@xxx/xxx/IMG-20240429-WA0002.jpg with status:UPLOAD_FAILED and result:NETWORK_CONNECTION (old:/storage/emulated/0/Android/media/com.nextcloud.client/nextcloud/tmp/xxx@xxx/xxx/IMG-20240429-WA0002.jpg status:UPLOAD_IN_PROGRESS result:-1)
2024-05-01 16:31:40.277 18975-19599 UploadsStorageManager com.nextcloud.client V Updating /storage/emulated/0/Android/media/com.nextcloud.client/nextcloud/tmp/xxx@xxx/xxx/IMG-20240429-WA0002.jpg with status=UPLOAD_FAILED
2024-05-01 16:31:40.278 18975-19599 UploadsStorageManager com.nextcloud.client D updateUpload returns with: 1 for file: /storage/emulated/0/Android/media/com.nextcloud.client/nextcloud/tmp/xxx@xxx/xxx/IMG-20240429-WA0002.jpg
2024-05-01 16:31:40.278 18975-19599 UploadsStorageManager com.nextcloud.client D notifyObserversNow
2024-05-01 16:31:40.278 18975-19599 FileUploadWorker com.nextcloud.client D NotifyUploadResult with resultCode: NO_NETWORK_CONNECTION

### Server error logs

```bash
No logs are recorded for the expected upload request.
```

### Additional information

This is a client only issue. I observe no issues uploading from other devices.

The discrepancy: the app does indeed have a network connection, everything works, it can browse the server side folder structure, it can create folders on the server side.
Only when then trying to upload a file then above error suddenly occurs which does not make much sense.

This is not my device, if required I can perform additional tests, but that requires a bit of time to get hold of the device again.

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.