widget crashes when not logged in
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Domain
- mobile-dev
Research direction
Start in DashboardWidgetConfigurationActivity.kt at line 139, then inspect ClientFactoryImpl.java at line 51 and AccountUtils.getBaseUrlForAccount at line 72. Reproduce adding the 3x4 widget while logged out and verify the flow no longer crashes and matches the expected widget behavior on the homepage.
Written by the indexing model from the issue text.
Description
⚠️ 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.
- Dominant language
- Kotlin
- Stars
- 5.6k
- Forks
- 2k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 101
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nextcloud/android
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
0. Needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
-
0. Needs triage enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
All issues in nextcloud/android
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bitcoindevkit/bdk-ffi#1125 ·
-
Issue: Bug
Difficulty 1/5 Under an hour Newbie friendliness 91/100
OpenAPITools/openapi-generator#24978 ·
-
helsemelding-json-schema json-schema-core
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
contributor: external needs review
Difficulty 2/5 1-3 hours Newbie friendliness 82/100