Skip to content

App crashes when uploading documents via Share functionality  #11361

Description

@intrusus-dev

⚠️ 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. Use an app where you can export / share a pdf document with the Nextcloud app.
  2. Select a .pdf document and click on share.
  3. Click on Nextcloud app.
  4. Now, in the Nextcloud app folder selector, try to go back and to browse for a different folder where you want to store the document in.
  5. The app crashes after going back in the folder hierarchy multiple times.

Expected behaviour

When you share a document with the Nextcloud app to save it there, while browsing the folder hierarchy to select the correct folder you want to store the document, the app should not crash.

Actual behaviour

While I go back in the folder hierarchy to select another folder, the app immediately crashes and I cannot save the document via the sharing functionality. I have to use the add file feature within the Nextcloud app to save a file successfully within my cloud. I cannot use the share Feature of my Android phone.

Screenshot_20230208-113003~2

Screenshot_20230208-113154~2

Screenshot_20230208-113157~2

Android version

13, Kernel 5.10.107-android13-4-00020-g02b5dfab573c-ab9358130 #1 Thu Dec 1 18:28:18 UTC 2022

Device brand and model

Google Pixel 7 Pro

Stock or custom OS?

Stock

Nextcloud android app version

3.23.1

Nextcloud server version

24.0.7

Using a reverse proxy?

Yes

Android logs

### Cause of error
```java
Exception in thread "Thread-11" java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.owncloud.android.datamodel.OCFile.getDecryptedRemotePath()' on a null object reference
    at com.owncloud.android.utils.FileStorageUtils.checkEncryptionStatus(FileStorageUtils.java:468)
    at com.owncloud.android.operations.RefreshFolderOperation.synchronizeData(RefreshFolderOperation.java:458)
    at com.owncloud.android.operations.RefreshFolderOperation.fetchAndSyncRemoteFolder(RefreshFolderOperation.java:408)
    at com.owncloud.android.operations.RefreshFolderOperation.run(RefreshFolderOperation.java:238)
    at com.owncloud.android.lib.common.operations.RemoteOperation.run(RemoteOperation.java:399)
    at java.lang.Thread.run(Thread.java:1012)

App information

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

Device information

  • Brand: google
  • Device: cheetah
  • Model: Pixel 7 Pro
  • Id: TQ1A.230205.002
  • Product: cheetah

Firmware

  • SDK: 33
  • Release: 13
  • Incremental: 9471150

### Server error logs

_No response_

### Additional information

_No response_

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions