widget crashes when not logged in

Aperta Adatta ai principianti
#16,516 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
android, java, kotlin
Ambito
mobile-dev

Direzione di ricerca

Inizia da DashboardWidgetConfigurationActivity.kt alla riga 139, poi esamina ClientFactoryImpl.java alla riga 51 e AccountUtils.getBaseUrlForAccount alla riga 72. Riproduci l’aggiunta del widget 3x4 mentre hai effettuato il logout e verifica che il flusso non vada più in crash e corrisponda al comportamento previsto del widget nella homepage.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

0. Needs triage bug feature: dashboard and widgets performance: ISE/IAE :confused:
⚠️ 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

Attempt to add the 3x4 widget to the homepage.

Expected behaviour

Widget on homepage

Actual behaviour

Crash with code dump

Cause of error
Exception in thread "DefaultDispatcher-worker-1" com.nextcloud.client.network.ClientFactory$CreationException: com.owncloud.android.lib.common.accounts.AccountUtils$AccountNotFoundException: Account not found
    at com.nextcloud.client.network.ClientFactoryImpl.createNextcloudClient(ClientFactoryImpl.java:51)
    at com.nextcloud.client.widget.DashboardWidgetConfigurationActivity$loadWidgets$1.invokeSuspend(DashboardWidgetConfigurationActivity.kt:139)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:101)
    at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:113)
    at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:589)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:823)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:720)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:707)
Caused by: Exception in thread "DefaultDispatcher-worker-1" com.owncloud.android.lib.common.accounts.AccountUtils$AccountNotFoundException: Account not found
    at com.owncloud.android.lib.common.accounts.AccountUtils.getBaseUrlForAccount(AccountUtils.java:72)
    at com.owncloud.android.lib.common.OwnCloudClientFactory.createNextcloudClient(OwnCloudClientFactory.java:198)
    at com.owncloud.android.lib.common.OwnCloudClientFactory.createNextcloudClient(OwnCloudClientFactory.java:182)
    at com.nextcloud.client.network.ClientFactoryImpl.createNextcloudClient(ClientFactoryImpl.java:49)
    at com.nextcloud.client.widget.DashboardWidgetConfigurationActivity$loadWidgets$1.invokeSuspend(DashboardWidgetConfigurationActivity.kt:139)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:101)
    at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:113)
    at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:589)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:823)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:720)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:707)

App information
  • ID: com.nextcloud.client
  • Version: 30350290
  • Build flavor: generic
Device information
  • Brand: google
  • Device: akita
  • Model: Pixel 8a
  • Id: BP4A.260205.001
  • Product: akita
Firmware
  • SDK: 36
  • Release: 16
  • Incremental: 14624666
Android version

16

Device brand and model

pixel 8a

Stock or custom OS?

Stock

Nextcloud android app version

3.25.2

Nextcloud server version

latest

Using a reverse proxy?

I don't know

Android logs
Cause of error
Exception in thread "DefaultDispatcher-worker-1" com.nextcloud.client.network.ClientFactory$CreationException: com.owncloud.android.lib.common.accounts.AccountUtils$AccountNotFoundException: Account not found
    at com.nextcloud.client.network.ClientFactoryImpl.createNextcloudClient(ClientFactoryImpl.java:51)
    at com.nextcloud.client.widget.DashboardWidgetConfigurationActivity$loadWidgets$1.invokeSuspend(DashboardWidgetConfigurationActivity.kt:139)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:101)
    at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:113)
    at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:589)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:823)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:720)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:707)
Caused by: Exception in thread "DefaultDispatcher-worker-1" com.owncloud.android.lib.common.accounts.AccountUtils$AccountNotFoundException: Account not found
    at com.owncloud.android.lib.common.accounts.AccountUtils.getBaseUrlForAccount(AccountUtils.java:72)
    at com.owncloud.android.lib.common.OwnCloudClientFactory.createNextcloudClient(OwnCloudClientFactory.java:198)
    at com.owncloud.android.lib.common.OwnCloudClientFactory.createNextcloudClient(OwnCloudClientFactory.java:182)
    at com.nextcloud.client.network.ClientFactoryImpl.createNextcloudClient(ClientFactoryImpl.java:49)
    at com.nextcloud.client.widget.DashboardWidgetConfigurationActivity$loadWidgets$1.invokeSuspend(DashboardWidgetConfigurationActivity.kt:139)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:101)
    at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:113)
    at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:589)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:823)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:720)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:707)

App information
  • ID: com.nextcloud.client
  • Version: 30350290
  • Build flavor: generic
Device information
  • Brand: google
  • Device: akita
  • Model: Pixel 8a
  • Id: BP4A.260205.001
  • Product: akita
Firmware
  • SDK: 36
  • Release: 16
  • Incremental: 14624666
Server error logs

Additional information

I am not logged into my server. I just wanted to see the widget appearance.

Lingua principale
Kotlin
Stelle
5.6k
Fork
2k
Merge medio
1g 21h
PR unite (30g)
101

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nextcloud/android

Tutte le issue di nextcloud/android

Issue simili

Altre issue su Kotlin

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.