nextcloud / nextcloud/android

Android Client Auto Upload fails to create new subdirectories.

Open
#14,465 21 comments 0 reactions 1 assignee Claimed by @alperozturk96 View on GitHub
bug feature: auto upload
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

In the Android Nexcloud app

1. Select `Settings > Auto upload > hamburger button upper right > Set up a custom folder`.
2. In the modal that appears, set the `Local folder` option to `/storage/emulated/0`
3. set the `Remote folder` option to `InstantUpload`
4. set `Only upload on unmetered Wi-Fi` to `true`
5. set `Only upload when charging` to `false`
6. set Also upload existing files` to `true`
7. set `Use subfolders: Store in subfolders based on date` to `false`
8. set `Exclude hidden` to `false`
9. set `What to do if the file already exists?` to `Ask me every time`
10. Click `Save`

### Expected behaviour

I expect that all files and folders in the tree of folders starting at `/storage/emulated/0/` be uploaded to Nextcloud with the same folder structure.

### Actual behaviour

Observe that the app will successfully sync files and folders located in `/storage/emulated/0` and also files stored in directories of `/storage/emulated/0/*/`
Observe that the app will fail to sync files and folders located in `/storage/emulated/0/*/*/`, i.e. any second-order or deeper sub-directory of `/storage/emulated/0/` (the directory configured in the custom folder settings described above). The notification will will show the error `Upload failed File not found`.
Navigating to `hamburger button upper left > uploads` and scrolling to `Failed/pending restart` will show a bunch of files with the message `Folder error`. All of the files are located in second-order sub-directories of the custom directory configured (`/storage/emulated/0/`)

### Android version

12, Build SP1A.210812.016.C2

### Device brand and model

Google Pixel 3

### Stock or custom OS?

Stock

### Nextcloud android app version

3.30.8

### Nextcloud server version

Nextcloud Hub 8 (29.0.9)

### Using a reverse proxy?

I don't know

### Android logs

_No response_

### Server error logs

```bash
I'm using hetzner as a provider for the server. It seems they don't enable file-based logging and so I've filed a support ticket to try to get the error logs from them. Will update once I receive them.
```

### Additional information

There does not exist the folder `storage/emulated/0/data/` when looking through the internal storage of my phone. My phone is not rooted so I can't use `logcat` to obtain logs. As such, I can't provide logs unless there's further instruction on how I might be able to do so.

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.