nextcloud / nextcloud/android

App crashes while removing account + let app remove local data

Open
#16,279 0 comments 0 reactions 0 assignees View on GitHub
0. Needs triage bug
Dominant language
Kotlin
Stars
5.6k
Forks
2k
Avg merge
2d 18h
Merged PRs (30d)
92

Description

### ⚠️ Before posting ⚠️

- [x] This is a **bug**, not a question or an enhancement.
- [x] I've [searched for similar issues](https://github.com/nextcloud/android/issues) and didn't find a duplicate.
- [x] I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
- [x] I agree to follow Nextcloud's [Code of Conduct](https://nextcloud.com/contribute/code-of-conduct/).

### Steps to reproduce

1. Removing an Account including removing all local data

### Expected behaviour

Account and local data would be deleted

### Actual behaviour

Waiting for a few second, then an error occurred.
### Cause of error
```java
Exception in thread "main" java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.String com.nextcloud.client.account.User.getAccountName()' on a null object reference
at com.owncloud.android.ui.activity.FileDisplayActivity.onStart(FileDisplayActivity.kt:2810)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1706)
at android.app.Activity.performStart(Activity.java:9122)
at android.app.ActivityThread.handleStartActivity(ActivityThread.java:4231)
at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:214)
at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:194)
at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:176)
at android.app.servertransaction.TransactionExecutor.executeNonLifecycleItem(TransactionExecutor.java:129)
at android.app.servertransaction.TransactionExecutor.executeTransactionItems(TransactionExecutor.java:103)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:80)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2773)
at android.os.Handler.dispatchMessage(Handler.java:109)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.app.ActivityThread.main(ActivityThread.java:8934)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:591)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911)

```

### App information
* ID: `com.nextcloud.client`
* Version: `30340190`
* Build flavor: `generic`

### Device information
* Brand: `SHIFT`
* Device: `otter`
* Model: `SHIFTphone 8`
* Id: `SOS.7.0.20250916`
* Product: `otter`

### Firmware
* SDK: `35`
* Release: `15`
* Incremental: `20250916`

### Android version

15

### Device brand and model

Shift Shiftphone 8

### Stock or custom OS?

Custom (explain in "additional information")

### Nextcloud android app version

3.34.1

### Nextcloud server version

Nextcloud Hub 25 Autumn (32.0.3)

### Using a reverse proxy?

I don't know

### Android logs

_No response_

### Server error logs

```bash

```

### Additional information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.