Skip to content

App crash while opening E2EE subfolder #17694

Open

Description

@matejc

⚠️ Before posting ⚠️

  • This is a bug, not a question or an enhancement.
  • I've searched for similar issues and didn't find a duplicate.
  • I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
  • I agree to follow Nextcloud's Code of Conduct.

Steps to reproduce

  1. Created Storage Share Hetzner instance
  2. Enable E2E app in browser
  3. Login and create an E2E folder in Linux desktop client: /Private
  4. Add files and folders inside ~/Nextcloud/Private/...
  5. Install and open Nextcloud Android app
  6. I can see Private folder with a key symbol, it says 0 B for some reason
  7. I open Private folder (I enter mnemonic when prompted)
  8. I see all folders and files inside Private (all folders say 0 B, except the files)
  9. I can open and see the content of files (Private -> image.png)
  10. When I press on any folder, the app crashes:

Cause of error

Exception in thread "main" java.lang.NullPointerException: Attempt to invoke interface method 'java.util.Iterator java.lang.Iterable.iterator()' on a null object reference
    at com.nextcloud.utils.e2ee.E2EEKeyInspector.decryptsMetadataV2(E2EEKeyInspector.kt:117)
    at com.nextcloud.utils.e2ee.E2EEKeyInspector.access$decryptsMetadataV2(E2EEKeyInspector.kt:33)
    at com.nextcloud.utils.e2ee.E2EEKeyInspector$canDecryptFolderMetadata$2.invokeSuspend(E2EEKeyInspector.kt:105)
    at com.nextcloud.utils.e2ee.E2EEKeyInspector$canDecryptFolderMetadata$2.invoke(E2EEKeyInspector.kt:8)
    at com.nextcloud.utils.e2ee.E2EEKeyInspector$canDecryptFolderMetadata$2.invoke(E2EEKeyInspector.kt:4)
    at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatched(Undispatched.kt:66)
    at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:43)
    at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:497)
    at kotlinx.coroutines.BuildersKt.withContext(dex-id-9e0b1687ed506aa331b8e1c93a1337b6b72f4b70:1)
    at com.nextcloud.utils.e2ee.E2EEKeyInspector.canDecryptFolderMetadata(E2EEKeyInspector.kt:86)
    at com.nextcloud.utils.e2ee.E2EEActionResolver$checkFolderMetadataKey$2.invokeSuspend(E2EEActionResolver.kt:44)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
    at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:124)
    at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:586)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:798)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:717)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:704)

App information

  • ID: com.nextcloud.client
  • Version: 350000090
  • Build flavor: gplay

Device information

  • Brand: Fairphone
  • Device: FP6
  • Model: Fairphone 6
  • Id: FP6.QREL.16.100.0
  • Product: FP6

Firmware

  • SDK: 36
  • Release: 16
  • Incremental: WS1M

Expected behaviour

To open the subfolder (of E2E enabled folder) as it does in browser (when I enter mnemonic)

Actual behaviour

It crashes instantly on trying to open a subfolder of E2E folder

Android version

16

Device brand and model

Fairphone 6

Stock or custom OS?

Stock

Nextcloud android app version

350000090

Nextcloud server version

Nextcloud Hub 26 Winter

Using a reverse proxy?

No

Android logs

No response

Server error logs

Not sure if I have access on Hetzner Storage Share

Additional information

No response

Activity

  1. changed the title [-]App crash while opening E2E subfolder[/-] [+]App crash while opening E2EE subfolder[/+] on Sep 22, 2026
  2. PhilLab commented on Sep 22, 2026

    @PhilLab
    Contributor
  3. daniele-verducci commented on Sep 23, 2026

    @daniele-verducci
    Contributor

    Hey thank you @PhilLab ! I did miss this one.
    @matejc this is fixed in PR #17608
    I'm waiting to merge it because I'm writing tests to be sure this will not happen again in the future, so I want them to fail first and then succeed after the PR is merged to be sure they are accurate.

  4. LeonhardKohn commented on Oct 1, 2026

    @LeonhardKohn

    I'm running into the same crash on my device.

    App: com.nextcloud.client, version code 350000090 (gplay)
    Device: Samsung Galaxy S25 (SM-S931B), Android 16 (SDK 36)

    The app crashes when opening an E2EE subfolder. It only happens with encrypted subfolders. Same stack trace as reported here:

    java.lang.NullPointerException: Attempt to invoke interface method 'java.util.Iterator java.lang.Iterable.iterator()' on a null object reference
        at com.nextcloud.utils.e2ee.E2EEKeyInspector.decryptsMetadataV2(E2EEKeyInspector.kt:117)
        at com.nextcloud.utils.e2ee.E2EEKeyInspector$canDecryptFolderMetadata$2.invokeSuspend(E2EEKeyInspector.kt:105)
        at com.nextcloud.utils.e2ee.E2EEKeyInspector.canDecryptFolderMetadata(E2EEKeyInspector.kt:86)
        at com.nextcloud.utils.e2ee.E2EEActionResolver$checkFolderMetadataKey$2.invokeSuspend(E2EEActionResolver.kt:44)
    
  5. matejc commented on Oct 2, 2026

    @matejc
    Author

    I'm running into the same crash on my device.

    App: com.nextcloud.client, version code 350000090 (gplay)
    Device: Samsung Galaxy S25 (SM-S931B), Android 16 (SDK 36)

    The app crashes when opening an E2EE subfolder. It only happens with encrypted subfolders. Same stack trace as reported here:

    java.lang.NullPointerException: Attempt to invoke interface method 'java.util.Iterator java.lang.Iterable.iterator()' on a null object reference
        at com.nextcloud.utils.e2ee.E2EEKeyInspector.decryptsMetadataV2(E2EEKeyInspector.kt:117)
        at com.nextcloud.utils.e2ee.E2EEKeyInspector$canDecryptFolderMetadata$2.invokeSuspend(E2EEKeyInspector.kt:105)
        at com.nextcloud.utils.e2ee.E2EEKeyInspector.canDecryptFolderMetadata(E2EEKeyInspector.kt:86)
        at com.nextcloud.utils.e2ee.E2EEActionResolver$checkFolderMetadataKey$2.invokeSuspend(E2EEActionResolver.kt:44)
    

    It seems that the fix was merged as well as backported to the current stable, but the release on google play or f-droid was not done yet.

  6. user45876 commented on Oct 3, 2026

    @user45876

    Thanks all - from what I can say and test, it is not working here: https://github.com/nextcloud/android/tree/rc-35.0.1-01

    Does it work for anybody?

  7. matejc commented on Oct 6, 2026

    @matejc
    Author

    On 35.0.1:

    Cause of error

    Exception in thread "main" java.lang.NullPointerException: Attempt to invoke interface method 'java.util.Iterator java.lang.Iterable.iterator()' on a null object reference
        at com.nextcloud.utils.e2ee.E2EEKeyInspector.decryptsMetadataV2(E2EEKeyInspector.kt:117)
        at com.nextcloud.utils.e2ee.E2EEKeyInspector.access$decryptsMetadataV2(E2EEKeyInspector.kt:33)
        at com.nextcloud.utils.e2ee.E2EEKeyInspector$canDecryptFolderMetadata$2.invokeSuspend(E2EEKeyInspector.kt:105)
        at com.nextcloud.utils.e2ee.E2EEKeyInspector$canDecryptFolderMetadata$2.invoke(E2EEKeyInspector.kt:8)
        at com.nextcloud.utils.e2ee.E2EEKeyInspector$canDecryptFolderMetadata$2.invoke(E2EEKeyInspector.kt:4)
        at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatched(Undispatched.kt:66)
        at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:43)
        at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:497)
        at kotlinx.coroutines.BuildersKt.withContext(dex-id-bdb35d2e785964d53f2cabab2604fe3dac296be5:1)
        at com.nextcloud.utils.e2ee.E2EEKeyInspector.canDecryptFolderMetadata(E2EEKeyInspector.kt:86)
        at com.nextcloud.utils.e2ee.E2EEActionResolver$checkFolderMetadataKey$2.invokeSuspend(E2EEActionResolver.kt:44)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
        at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:124)
        at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:586)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:798)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:717)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:704)

    App information

    • ID: com.nextcloud.client
    • Version: 350000190
    • Build flavor: gplay

    Device information

    • Brand: Fairphone
    • Device: FP6
    • Model: Fairphone 6
    • Id: FP6.QREL.16.111.0
    • Product: FP6

    Firmware

    • SDK: 36
    • Release: 16
    • Incremental: WS1Q
  8. friendlychemistry commented on Oct 7, 2026

    @friendlychemistry

    Hey there,

    The PR 17608 that supposedly fixes the issue has been merged into main for 2 weeks, yet the most recent release 35.0.1 still has the same crash.

    As far as I can tell the release was built from a commit that's more recent than the merge. Am I missing something here, or does the most recent release not contain the fix to this bug?

    Clarification would be appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions