⚠️ Before posting ⚠️
Steps to reproduce
Step 1: Open the Nextcloud app, go to Photos, tap a photo, tap the share icon.
Step 2: Choose "Reduced size" or "Original file" (not "Public link").
Step 3: In Android's native share sheet, choose Messages and select a contact/thread.
Step 4: Observe -- Messages opens, but no image attachment appears, no error shown to the user.
Expected behaviour
The image should attach, the same way it does when sharing the identical photo via Signal or Nextcloud Talk.
Actual behaviour
Messages opens, but no image attachment appears. No error is shown to the user.
Confirmed via adb logcat while reproducing -- Messages' own process logs:
E MessagingApp: Assert.fail() called: Cannot send private file content://org.nextcloud.imageCache.provider/Household/Photos/.../IMG_20260106_103619_161.jpg
at com.android.messaging.ui.conversationlist.ShareIntentActivity.addSharedPartToDraft(SourceFile:244)
This assertion fires before Messages attempts to actually read the file (no preceding SecurityException from opening it) -- it's Messages' own defensive check on the incoming shared Intent, deciding the URI/grant isn't trustworthy and refusing outright, not an OS-level permission wall being tripped mid-read. That points at something in how the share Intent is constructed for content://org.nextcloud.imageCache.provider/... (our DiskLruImageCacheFileProvider) not satisfying whatever Messages checks for (possibly related to ClipData/grant-flag handling, not confirmed at the code level on our side).
Isolation testing done:
| Source app |
Target app |
Result |
| Nextcloud |
Messages |
Fails silently -- no attachment |
| Nextcloud |
Nextcloud Talk |
Works |
| Nextcloud |
Signal |
Works |
| Default Gallery app |
Messages |
Works |
Reproduced identically on two separate GrapheneOS phones (Pixel 10 / Pixel 10 XL), ruling out a device-specific issue.
Related report: we hit the same Messages-side symptom (identical Assert.fail(): Cannot send private file) from the separate Memories Android app (pulsejet/memories) too, but via a different URI -- Memories routes its share through Android's DownloadManager (content://downloads/all_downloads/) rather than a FileProvider at all. Filed as a separate issue there: pulsejet/memories#1706 -- linking in case the two clients share relevant file-sharing code.
Suspected cause: whatever combination of Intent flags / ClipData construction Messages requires to accept a shared content:// URI as legitimate isn't being satisfied when serving files through DiskLruImageCacheFileProvider. Happy to help narrow this down further or test a patched build if useful.
Android version
17 (GrapheneOS)
Device brand and model
Google Pixel 10 Pro XL / Pixel 10
Stock or custom OS?
Custom (explain in "additional information")
Nextcloud android app version
34.1.0
Nextcloud server version
33.0.6
Using a reverse proxy?
Yes
Android logs
Relevant excerpt from adb logcat -v threadtime captured while reproducing (share icon -> Original file -> Messages -> select contact -> send):
ActivityTaskManager: START u0 {act=android.intent.action.SEND typ=image/jpeg ... cmp=com.android.messaging/.ui.conversationlist.ShareIntentActivity ...} from uid 10195 (com.nextcloud.client) (realCallingUid=10080)
ImageLoader: java.io.IOException: java.lang.SecurityException: Permission Denial: opening provider com.owncloud.android.providers.DiskLruImageCacheFileProvider from ProcessRecord{... com.android.intentresolver/u0a80} (pid=31835, uid=10080) requires that you obtain access using ACTION_OPEN_DOCUMENT or related APIs
MessagingApp: Assert.fail() called: Cannot send private file content://org.nextcloud.imageCache.provider/Household/Photos/.../IMG_20260106_103619_161.jpg
at com.android.messaging.ui.conversationlist.ShareIntentActivity.addSharedPartToDraft(SourceFile:244)
Note the first SecurityException is from the share sheet's own preview-thumbnail loader (com.android.intentresolver, uid 10080) trying to render a preview -- that happens for any target app, before one is chosen, so it's a separate cosmetic issue. The Assert.fail() from MessagingApp (Messages' own process) is the actual cause of the attach failure.
Server error logs
Additional information
Custom OS: GrapheneOS (a hardened, de-Googled Android fork). Messages app referenced above is com.android.messaging, the built-in AOSP Messaging app that GrapheneOS ships by default (not a Google Play app).
Steps to reproduce
Step 1: Open the Nextcloud app, go to Photos, tap a photo, tap the share icon.
Step 2: Choose "Reduced size" or "Original file" (not "Public link").
Step 3: In Android's native share sheet, choose Messages and select a contact/thread.
Step 4: Observe -- Messages opens, but no image attachment appears, no error shown to the user.
Expected behaviour
The image should attach, the same way it does when sharing the identical photo via Signal or Nextcloud Talk.
Actual behaviour
Messages opens, but no image attachment appears. No error is shown to the user.
Confirmed via
adb logcatwhile reproducing -- Messages' own process logs:This assertion fires before Messages attempts to actually read the file (no preceding SecurityException from opening it) -- it's Messages' own defensive check on the incoming shared Intent, deciding the URI/grant isn't trustworthy and refusing outright, not an OS-level permission wall being tripped mid-read. That points at something in how the share Intent is constructed for content://org.nextcloud.imageCache.provider/... (our DiskLruImageCacheFileProvider) not satisfying whatever Messages checks for (possibly related to ClipData/grant-flag handling, not confirmed at the code level on our side).
Isolation testing done:
Reproduced identically on two separate GrapheneOS phones (Pixel 10 / Pixel 10 XL), ruling out a device-specific issue.
Related report: we hit the same Messages-side symptom (identical Assert.fail(): Cannot send private file) from the separate Memories Android app (pulsejet/memories) too, but via a different URI -- Memories routes its share through Android's DownloadManager (content://downloads/all_downloads/) rather than a FileProvider at all. Filed as a separate issue there: pulsejet/memories#1706 -- linking in case the two clients share relevant file-sharing code.
Suspected cause: whatever combination of Intent flags / ClipData construction Messages requires to accept a shared content:// URI as legitimate isn't being satisfied when serving files through DiskLruImageCacheFileProvider. Happy to help narrow this down further or test a patched build if useful.
Android version
17 (GrapheneOS)
Device brand and model
Google Pixel 10 Pro XL / Pixel 10
Stock or custom OS?
Custom (explain in "additional information")
Nextcloud android app version
34.1.0
Nextcloud server version
33.0.6
Using a reverse proxy?
Yes
Android logs
Relevant excerpt from
adb logcat -v threadtimecaptured while reproducing (share icon -> Original file -> Messages -> select contact -> send):Note the first SecurityException is from the share sheet's own preview-thumbnail loader (com.android.intentresolver, uid 10080) trying to render a preview -- that happens for any target app, before one is chosen, so it's a separate cosmetic issue. The
Assert.fail()from MessagingApp (Messages' own process) is the actual cause of the attach failure.Server error logs
Additional information
Custom OS: GrapheneOS (a hardened, de-Googled Android fork). Messages app referenced above is
com.android.messaging, the built-in AOSP Messaging app that GrapheneOS ships by default (not a Google Play app).