owncloud / owncloud/android

[BUG] Creating/deleting file via DocumentProvider is not working as expected

Open
#4,638 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Type:bug
Dominant language
Kotlin
Stars
4.2k
Forks
3.1k
Avg merge
1d 12h
Merged PRs (30d)
7

Description

Actual behaviour
  • Create and save a file via DocumentProvider in another app, and it can't be accessed again, until opened again from SAF.
  • The failed entries has -1 as path while accessible entries has positive integers
  • Deleting a file with persistent uri in another app won't work.
Expected behaviour
  • Create and save a file, and it is created and saved
Steps to reproduce
  1. Setup an owncloud account
  2. Create a file in another app (e.g. Tiddloid) via DocumentProvider
  3. Close the file and try opening it from app's recent file list (for Tiddloid, it is the main activity)

Can this problem be reproduced with the official owncloud server?
(url: https://ocis.ocis.master.owncloud.works, user: einstein, password: relativity)
Unknown. I can't access this server at all.

Environment data

Android version: 13

Device model: Xiaomi 22041216C

Stock or customized system: MIUI14

ownCloud app version: 4.5.1 (43b85792e)

ownCloud server version: 7.1.3

Logs
Web server error log

None (my server is currently down)

ownCloud log (data/owncloud.log)

None (my server is currently down)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Android 13 flow through DocumentProvider: create and save a file from another app, reopen it from the recent-file list, and attempt deletion through a persistent URI. Trace the DocumentProvider URI and path handling, comparing entries with -1 paths to accessible entries. Done means created files reopen normally and persistent-URI deletion works; server and ownCloud logs are unavailable in the report.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.