crash when trying to download a spreadsheet
- 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
I tried to download an xlsx spreadsheet from the android app.
1. I opened it : no issue, usual warning that I can't edit from a mobile device with the community edition
2. Tried to download using the top right 3dots menu > download
3. Selected xlsx from the list of format available
4. Got the error message pasted below, and the app crashed
This is reproducible, I tried on a different xlsx file and got the same result.
I also tried a docx but no issue with this one.
Might be related to #16213 but there is not much detail in this other issue
### Expected behaviour
The file should be downloaded
### Actual behaviour
The app crashed
### Android version
12 G975FXXSGHWC1
### Device brand and model
samsung galaxy s10+
### Stock or custom OS?
Stock
### Nextcloud android app version
30350090
### Nextcloud server version
community but couldn't find details in the android app, I'll update when I do
### Using a reverse proxy?
I don't know
### Android logs
Here is error displayed by the app when it crashed
### Cause of error
```java
Exception in thread "main" java.lang.SecurityException: Unsupported path /storage/emulated/0/Download
at android.os.Parcel.createExceptionOrNull(Parcel.java:2438)
at android.os.Parcel.createException(Parcel.java:2422)
at android.os.Parcel.readException(Parcel.java:2405)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:190)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:142)
at android.content.ContentProviderProxy.insert(ContentProviderNative.java:557)
at android.content.ContentResolver.insert(ContentResolver.java:2200)
at android.content.ContentResolver.insert(ContentResolver.java:2162)
at android.app.DownloadManager.enqueue(DownloadManager.java:1574)
at com.owncloud.android.ui.activity.EditorWebView.downloadFile(EditorWebView.java:300)
at com.owncloud.android.ui.activity.TextEditorWebView.postOnCreate$lambda$0(TextEditorWebView.kt:64)
at com.owncloud.android.ui.activity.TextEditorWebView.$r8$lambda$phlIc7VqZe_d_BuVVulQT0BenBc(Unknown Source:0)
at com.owncloud.android.ui.activity.TextEditorWebView$$ExternalSyntheticLambda0.onDownloadStart(D8$$SyntheticClass:0)
at WV.gh.handleMessage(chromium-TrichromeWebViewGoogle6432.aab-stable-749919233:463)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8751)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
```
### App information
* ID: `com.nextcloud.client`
* Version: `30350090`
* Build flavor: `gplay`
### Device information
* Brand: `samsung`
* Device: `beyond2`
* Model: `SM-G975F`
* Id: `SP1A.210812.016`
* Product: `beyond2lteeea`
### Firmware
* SDK: `31`
* Release: `12`
* Incremental: `G975FXXSGHWC1`
### Server error logs
```bash
```
### Additional information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.