Skip to content

Android can't open encrypted folder #16882

Closed

Description

@kuggu

Cause of error

Exception in thread "Thread-22" java.lang.IllegalStateException: Metadata is corrupt!
    at com.owncloud.android.utils.EncryptionUtilsV2.decryptFolderMetadataFile(EncryptionUtilsV2.kt:254)
    at com.owncloud.android.utils.EncryptionUtilsV2.parseAnyMetadata(EncryptionUtilsV2.kt:619)
    at com.owncloud.android.utils.EncryptionUtils.downloadFolderMetadata(EncryptionUtils.java:421)
    at com.owncloud.android.operations.RefreshFolderOperation.getDecryptedFolderMetadata(RefreshFolderOperation.java:649)
    at com.owncloud.android.operations.RefreshFolderOperation.synchronizeData(RefreshFolderOperation.java:535)
    at com.owncloud.android.operations.RefreshFolderOperation.fetchAndSyncRemoteFolder(RefreshFolderOperation.java:464)
    at com.owncloud.android.operations.RefreshFolderOperation.run(RefreshFolderOperation.java:275)
    at com.owncloud.android.lib.common.operations.RemoteOperation.run(RemoteOperation.java:387)
    at java.lang.Thread.run(Thread.java:1564)

App information

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

Device information

  • Brand: google
  • Device: tokay
  • Model: Pixel 9
  • Id: CP1A.260405.005
  • Product: tokay

Firmware

  • SDK: 36
  • Release: 16
  • Incremental: 15001963

⚠️ 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

Add Nextcloud instance to Android app. Then try to open encrypted folder.

Expected behaviour

Opened encrypted folder.

Actual behaviour

Gives error.

Android version

Newest current Android.

Device brand and model

Google Pixel 9

Stock or custom OS?

Stock

Nextcloud android app version

Current

Nextcloud server version

Current

Using a reverse proxy?

I don't know

Android logs

No response

Server error logs

Additional information

No response

Activity

  1. alperozturk96 commented on Apr 20, 2026

    @alperozturk96
    Collaborator

    @kuggu Hello

    Was folder empty? And server version is v33?

  2. kuggu commented on Apr 20, 2026

    @kuggu
    Author

    @kuggu Hello

    Was folder empty? And server version is v33?

    Hi @alperozturk96

    Yes, the folder is empty and the server version is v33. In the browser the folder works. When I make an encrypted folder in de Android app itself, then it works fine. But not the other way around.

  3. Spitfireap commented on Apr 30, 2026

    @Spitfireap

    Same issue here. Though in a recent update of the app it shifted from Metadata is corrupt to an OpenSSL error.
    Running NC 33.0.2 for the server side.

    Cause of error

    Exception in thread "Thread-46" javax.crypto.BadPaddingException: error:04000085:RSA routines:OPENSSL_internal:OAEP_DECODING_ERROR
        at org.conscrypt.NativeCrypto.EVP_PKEY_decrypt(Native Method)
        at org.conscrypt.OpenSSLCipherRSA$OAEP.doCryptoOperation(OpenSSLCipherRSA.java:594)
        at org.conscrypt.OpenSSLCipherRSA.engineDoFinal(OpenSSLCipherRSA.java:312)
        at javax.crypto.Cipher.doFinal(Cipher.java:2074)
        at com.owncloud.android.utils.EncryptionUtils.decryptStringAsymmetricV2(EncryptionUtils.java:726)
        at com.owncloud.android.utils.EncryptionUtilsV2.decryptMetadataKey(EncryptionUtilsV2.kt:412)
        at com.owncloud.android.utils.EncryptionUtilsV2.decryptFolderMetadataFile(EncryptionUtilsV2.kt:214)
        at com.owncloud.android.utils.EncryptionUtilsV2.parseAnyMetadata(EncryptionUtilsV2.kt:619)
        at com.owncloud.android.utils.EncryptionUtils.downloadFolderMetadata(EncryptionUtils.java:421)
        at com.owncloud.android.operations.RefreshFolderOperation.getDecryptedFolderMetadata(RefreshFolderOperation.java:649)
        at com.owncloud.android.operations.RefreshFolderOperation.synchronizeData(RefreshFolderOperation.java:535)
        at com.owncloud.android.operations.RefreshFolderOperation.fetchAndSyncRemoteFolder(RefreshFolderOperation.java:464)
        at com.owncloud.android.operations.RefreshFolderOperation.run(RefreshFolderOperation.java:275)
        at com.owncloud.android.lib.common.operations.RemoteOperation.run(RemoteOperation.java:387)
        at java.lang.Thread.run(Thread.java:1564)

    App information

    • ID: com.nextcloud.client
    • Version: 330010090
    • Build flavor: generic

    Device information

    • Brand: samsung
    • Device: dm1q
    • Model: SM-S911B
    • Id: BP2A.250605.031.A3
    • Product: dm1qxeea

    Firmware

    • SDK: 36
    • Release: 16
    • Incremental: S911BXXS9EZCI
  4. maybeanerd commented on May 23, 2026

    @maybeanerd

    Same error here. also folder I created on another client and then tried opening in Android
    Opening in web works, folder is empty

    Server is v33.0.3, freshly set up last week using the kubernetes helmchart ( infrastructure definition although I don't think that would be related)

    Cause of error

    Exception in thread "Thread-316" java.lang.IllegalStateException: Metadata is corrupt!
        at com.owncloud.android.utils.EncryptionUtilsV2.decryptFolderMetadataFile(EncryptionUtilsV2.kt:254)
        at com.owncloud.android.utils.EncryptionUtilsV2.parseAnyMetadata(EncryptionUtilsV2.kt:619)
        at com.owncloud.android.utils.EncryptionUtils.downloadFolderMetadata(EncryptionUtils.java:421)
        at com.owncloud.android.operations.RefreshFolderOperation.getDecryptedFolderMetadata(RefreshFolderOperation.java:649)
        at com.owncloud.android.operations.RefreshFolderOperation.synchronizeData(RefreshFolderOperation.java:535)
        at com.owncloud.android.operations.RefreshFolderOperation.fetchAndSyncRemoteFolder(RefreshFolderOperation.java:464)
        at com.owncloud.android.operations.RefreshFolderOperation.run(RefreshFolderOperation.java:275)
        at com.owncloud.android.lib.common.operations.RemoteOperation.run(RemoteOperation.java:387)
        at java.lang.Thread.run(Thread.java:1564)

    App information

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

    Device information

    • Brand: OnePlus
    • Device: OP5D55L1
    • Model: CPH2653
    • Id: BP2A.250605.015
    • Product: CPH2653EEA

    Firmware

    • SDK: 36
    • Release: 16
    • Incremental: V.R4T3.535a14b-3024561-302455e
  5. maybeanerd commented on May 25, 2026

    @maybeanerd

    It seems that now it works for me. Didn't change anything myself, and I think the app is also the same version (33.1.1)

  6. alperozturk96 commented on May 26, 2026

    @alperozturk96
    Collaborator

    Fixed via:

    #16916

    #16944

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions