nextcloud / nextcloud/android

Login crash after logout

Open
#16,076 4 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

Logged out of an offline account. Logged into a new existing account. App crash post-browser authentication. Relaunch confirmed client logged in successfully

### Expected behaviour

Ehhh... to not crash?

### Actual behaviour

App crash. relauch will be logged in fine

### Android version

11

### Device brand and model

Samsung

### Stock or custom OS?

Custom (explain in "additional information")

### Nextcloud android app version

3.34.1 (F-Droid)

### Nextcloud server version

32.0.2

### Using a reverse proxy?

I don't know

### Android logs

### 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:1510)
at android.app.Activity.performStart(Activity.java:8616)
at android.app.ActivityThread.handleStartActivity(ActivityThread.java:4204)
at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221)
at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:183)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:132)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2574)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8762)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

```

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

### Device information
* Brand: `samsung`
* Device: `a12s`
* Model: `SM-A127F`
* Id: `TP1A.220624.014`
* Product: `a12snnxx`

### Firmware
* SDK: `33`
* Release: `13`
* Incremental: `A127FXXSDDXJ2`[](url)

### Server error logs

```bash

```

### Additional information

Rooted Samsung

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.