nextcloud / nextcloud/android

Wrong username or password after temporary auth backend unavailability

Open
#10,761 1 comment 0 reactions 0 assignees View on GitHub
bug feature: authentication hotspot: auth failure mgmt
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. have `users_external` enabled with IMAP backend
2. have a user authenticated by this backend
3. have NC app with that user's creds logged in (via QR code)
4. turn off IMAP backend for a few minutes
5. app says "Wrong username or password"
6. turn the backend back on
7. app still says "Wrong username or password"

### Expected behaviour

App should stop nagging about wrong username and password and just work as it did before since nothing changed. Other apps not using the NC account provided by NC app don't have this issue (Talk, browser extensions, etc) but apps using the NC-provided account fail to connect, too.

### Actual behaviour

Instead of restoring to working condition transparently the app remains convinced that the stored credentials are wrong and forces a new login, i.e. the login screen is displayed no matter what I try to do, including force-close and phone reboot.

I have to find a computer, log in through a browser and generate a new app token/QR code unnecessarily.

### Android version

10

### Device brand and model

SM-G960F (Samsung S9)

### Stock or custom OS?

Custom (explain in "additional information")

### Nextcloud android app version

3.20.3

### Nextcloud server version

24.0.4

### Using a reverse proxy?

Yes

### Android logs
```
09-23 15:38:33.270 23315 867 V com.nextcloud.android.sso.api.AidlNetworkRequest: [waitForApi] - api not ready yet.. waiting [AsyncTask #102]
09-23 15:38:33.271 23315 868 D com.nextcloud.android.sso.api.NetworkRequest: [connectApiWithBackoff] connectApiWithBackoff() called from Thread: [Thread-434]
09-23 15:38:33.271 23315 23315 D com.nextcloud.android.sso.api.NetworkRequest: [connectApiWithBackoff] trying to connect..
09-23 15:38:33.271 23315 23315 D com.nextcloud.android.sso.api.AidlNetworkRequest: [connect] Binding to AccountManagerService for type [nextcloud]
09-23 15:38:33.271 23315 23315 D com.nextcloud.android.sso.api.NetworkRequest: [connect] connect() called [main] Account-Type: [nextcloud]
09-23 15:38:33.271 23315 23315 D com.nextcloud.android.sso.api.AidlNetworkRequest: [connect] Component name is: [com.nextcloud.client]
09-23 15:38:33.273 23315 23315 D com.nextcloud.android.sso.api.AidlNetworkRequest: [connect] Bound to AccountManagerService successfully
09-23 15:38:33.273 23315 23315 D com.nextcloud.android.sso.api.AidlNetworkRequest: [onServiceConnected] called from Thread: [main] with IBinder [ComponentInfo{com.nextcloud.client/com.owncloud.android.services.AccountManagerService}]: android.os.BinderProxy@940d217
09-23 15:38:33.274 23315 869 D com.nextcloud.android.sso.api.AidlNetworkRequest: copy data from service finished
09-23 15:38:33.300 28087 870 I com.nextcloud.android.sso.aidl.ParcelFileDescriptorUtil.TransferThread: releaseConnection
09-23 15:38:33.392 19958 879 D com.nextcloud.android.sso.api.AidlNetworkRequest: copy data from service finished
09-23 15:38:33.393 28087 28247 E InputStreamBinder: at com.nextcloud.android.sso.InputStreamBinder.validateToken(InputStreamBinder.java:471)
09-23 15:38:33.393 28087 28247 E InputStreamBinder: at com.nextcloud.android.sso.InputStreamBinder.isValid(InputStreamBinder.java:466)
09-23 15:38:33.393 28087 28247 E InputStreamBinder: at com.nextcloud.android.sso.InputStreamBinder.processRequestV2(InputStreamBinder.java:402)
09-23 15:38:33.393 28087 28247 E InputStreamBinder: at com.nextcloud.android.sso.InputStreamBinder.performNextcloudRequestAndBodyStreamV2(InputStreamBinder.java:128)
09-23 15:38:33.393 28087 28247 E InputStreamBinder: at com.nextcloud.android.sso.InputStreamBinder.performNextcloudRequestV2(InputStreamBinder.java:111)
09-23 15:38:33.393 28087 28247 E InputStreamBinder: at com.nextcloud.android.sso.aidl.IInputStreamService$Stub.onTransact(IInputStreamService.java:158)
09-23 15:38:33.400 28087 895 E com.nextcloud.android.sso.aidl.ParcelFileDescriptorUtil.TransferThread: writing failed: write failed: EPIPE (Broken pipe)
09-23 15:38:33.411 19958 902 D com.nextcloud.android.sso.api.AidlNetworkRequest: copy data from service finished
09-23 15:38:33.412 28087 28247 E InputStreamBinder: at com.nextcloud.android.sso.InputStreamBinder.validateToken(InputStreamBinder.java:471)
09-23 15:38:33.412 28087 28247 E InputStreamBinder: at com.nextcloud.android.sso.InputStreamBinder.isValid(InputStreamBinder.java:466)
09-23 15:38:33.412 28087 28247 E InputStreamBinder: at com.nextcloud.android.sso.InputStreamBinder.processRequestV2(InputStreamBinder.java:402)
09-23 15:38:33.412 28087 28247 E InputStreamBinder: at com.nextcloud.android.sso.InputStreamBinder.performNextcloudRequestAndBodyStreamV2(InputStreamBinder.java:128)
09-23 15:38:33.412 28087 28247 E InputStreamBinder: at com.nextcloud.android.sso.InputStreamBinder.performNextcloudRequestV2(InputStreamBinder.java:111)
09-23 15:38:33.412 28087 28247 E InputStreamBinder: at com.nextcloud.android.sso.aidl.IInputStreamService$Stub.onTransact(IInputStreamService.java:158)
09-23 15:38:33.416 28087 904 E com.nextcloud.android.sso.aidl.ParcelFileDescriptorUtil.TransferThread: writing failed: write failed: EPIPE (Broken pipe)
09-23 15:38:33.428 19958 912 D com.nextcloud.android.sso.api.AidlNetworkRequest: copy data from service finished
09-23 15:38:33.429 28087 28247 E InputStreamBinder: at com.nextcloud.android.sso.InputStreamBinder.validateToken(InputStreamBinder.java:471)
09-23 15:38:33.429 28087 28247 E InputStreamBinder: at com.nextcloud.android.sso.InputStreamBinder.isValid(InputStreamBinder.java:466)
09-23 15:38:33.429 28087 28247 E InputStreamBinder: at com.nextcloud.android.sso.InputStreamBinder.processRequestV2(InputStreamBinder.java:402)
09-23 15:38:33.429 28087 28247 E InputStreamBinder: at com.nextcloud.android.sso.InputStreamBinder.performNextcloudRequestAndBodyStreamV2(InputStreamBinder.java:128)
09-23 15:38:33.429 28087 28247 E InputStreamBinder: at com.nextcloud.android.sso.InputStreamBinder.performNextcloudRequestV2(InputStreamBinder.java:111)
09-23 15:38:33.429 28087 28247 E InputStreamBinder: at com.nextcloud.android.sso.aidl.IInputStreamService$Stub.onTransact(IInputStreamService.java:158)
09-23 15:38:33.433 28087 915 E com.nextcloud.android.sso.aidl.ParcelFileDescriptorUtil.TransferThread: writing failed: write failed: EPIPE (Broken pipe)
09-23 15:38:33.442 19958 921 D com.nextcloud.android.sso.api.AidlNetworkRequest: copy data from service finished
09-23 15:38:33.444 28087 28247 E InputStreamBinder: at com.nextcloud.android.sso.InputStreamBinder.validateToken(InputStreamBinder.java:471)
09-23 15:38:33.444 28087 28247 E InputStreamBinder: at com.nextcloud.android.sso.InputStreamBinder.isValid(InputStreamBinder.java:466)
09-23 15:38:33.444 28087 28247 E InputStreamBinder: at com.nextcloud.android.sso.InputStreamBinder.processRequestV2(InputStreamBinder.java:402)
09-23 15:38:33.444 28087 28247 E InputStreamBinder: at com.nextcloud.android.sso.InputStreamBinder.performNextcloudRequestAndBodyStreamV2(InputStreamBinder.java:128)
09-23 15:38:33.444 28087 28247 E InputStreamBinder: at com.nextcloud.android.sso.InputStreamBinder.performNextcloudRequestV2(InputStreamBinder.java:111)
09-23 15:38:33.444 28087 28247 E InputStreamBinder: at com.nextcloud.android.sso.aidl.IInputStreamService$Stub.onTransact(IInputStreamService.java:158)
09-23 15:38:33.457 28087 926 I com.nextcloud.android.sso.aidl.ParcelFileDescriptorUtil.TransferThread: releaseConnection
09-23 15:38:33.460 28087 922 E com.nextcloud.android.sso.aidl.ParcelFileDescriptorUtil.TransferThread: writing failed: write failed: EPIPE (Broken pipe)
09-23 15:38:33.461 23315 28859 V com.nextcloud.android.sso.api.AidlNetworkRequest: [waitForApi] - api not ready yet.. waiting [AsyncTask #96]
09-23 15:38:33.464 23315 927 D com.nextcloud.android.sso.api.NetworkRequest: [connectApiWithBackoff] connectApiWithBackoff() called from Thread: [Thread-435]
09-23 15:38:33.464 23315 23315 D com.nextcloud.android.sso.api.NetworkRequest: [connectApiWithBackoff] trying to connect..
09-23 15:38:33.464 23315 23315 D com.nextcloud.android.sso.api.AidlNetworkRequest: [connect] Binding to AccountManagerService for type [nextcloud]
09-23 15:38:33.464 23315 23315 D com.nextcloud.android.sso.api.NetworkRequest: [connect] connect() called [main] Account-Type: [nextcloud]
09-23 15:38:33.464 23315 23315 D com.nextcloud.android.sso.api.AidlNetworkRequest: [connect] Component name is: [com.nextcloud.client]
09-23 15:38:33.470 23315 23315 D com.nextcloud.android.sso.api.AidlNetworkRequest: [connect] Bound to AccountManagerService successfully
09-23 15:38:33.470 23315 23315 D com.nextcloud.android.sso.api.AidlNetworkRequest: [onServiceConnected] called from Thread: [main] with IBinder [ComponentInfo{com.nextcloud.client/com.owncloud.android.services.AccountManagerService}]: android.os.BinderProxy@940d217
09-23 15:38:33.477 23315 935 D com.nextcloud.android.sso.api.AidlNetworkRequest: copy data from service finished
09-23 15:38:33.735 28087 1007 I com.nextcloud.android.sso.aidl.ParcelFileDescriptorUtil.TransferThread: releaseConnection
09-23 15:38:38.180 23315 1049 V com.nextcloud.android.sso.api.AidlNetworkRequest: [waitForApi] - api not ready yet.. waiting [IntentService[WebTrackService]]
09-23 15:38:38.180 23315 1050 D com.nextcloud.android.sso.api.NetworkRequest: [connectApiWithBackoff] connectApiWithBackoff() called from Thread: [Thread-436]
09-23 15:38:38.180 23315 23315 D com.nextcloud.android.sso.api.NetworkRequest: [connectApiWithBackoff] trying to connect..
09-23 15:38:38.180 23315 23315 D com.nextcloud.android.sso.api.AidlNetworkRequest: [connect] Binding to AccountManagerService for type [nextcloud]
09-23 15:38:38.180 23315 23315 D com.nextcloud.android.sso.api.NetworkRequest: [connect] connect() called [main] Account-Type: [nextcloud]
09-23 15:38:38.180 23315 23315 D com.nextcloud.android.sso.api.AidlNetworkRequest: [connect] Component name is: [com.nextcloud.client]
09-23 15:38:38.182 23315 23315 D com.nextcloud.android.sso.api.AidlNetworkRequest: [connect] Bound to AccountManagerService successfully
09-23 15:38:38.182 23315 23315 D com.nextcloud.android.sso.api.AidlNetworkRequest: [onServiceConnected] called from Thread: [main] with IBinder [ComponentInfo{com.nextcloud.client/com.owncloud.android.services.AccountManagerService}]: android.os.BinderProxy@940d217
09-23 15:38:38.184 23315 1051 D com.nextcloud.android.sso.api.AidlNetworkRequest: copy data from service finished
09-23 15:38:38.822 28087 28248 E InputStreamBinder: at com.nextcloud.android.sso.InputStreamBinder.processRequest(InputStreamBinder.java:387)
09-23 15:38:38.822 28087 28248 E InputStreamBinder: at com.nextcloud.android.sso.InputStreamBinder.performNextcloudRequestAndBodyStream(InputStreamBinder.java:172)
09-23 15:38:38.822 28087 28248 E InputStreamBinder: at com.nextcloud.android.sso.InputStreamBinder.performNextcloudRequest(InputStreamBinder.java:149)
09-23 15:38:38.822 28087 28248 E InputStreamBinder: at com.nextcloud.android.sso.aidl.IInputStreamService$Stub.onTransact(IInputStreamService.java:109)
```

### Server error logs

```bash
n/a
```

### Additional information

LineageOS, custom built

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.