nextcloud / nextcloud/notes-android

NoCurrentAccountSelectedException

Open
#1,772 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.1k
Forks
168
Avg merge
1d 17h
Merged PRs (30d)
31

Description

Hello,
I have this error preventing me to access old data.
You can fond below What i've done to get to this

Seems to be same error as #1612 and #1566

Trace

App Version: 3.7.1
App Version Code: 3007001
App Flavor: fdroid

Files App Version Code: 30240090

---

OS Version: 5.10.107-android13-4-ab23406000(23406000)
OS API Level: 33
Device: oriole
Manufacturer: Google
Model (and Product): Pixel 6 (oriole)

---

com.nextcloud.android.sso.exceptions.NoCurrentAccountSelectedException: Aucun compte sélectionné pour le moment
	at com.nextcloud.android.sso.helper.SingleAccountHelper.getCurrentAccountName(SingleAccountHelper.java:47)
	at com.nextcloud.android.sso.helper.SingleAccountHelper.getCurrentSingleSignOnAccount(SingleAccountHelper.java:54)
	at it.niedermann.owncloud.notes.main.MainActivity.lambda$onCreate$7$it-niedermann-owncloud-notes-main-MainActivity(MainActivity.java:174)
	at it.niedermann.owncloud.notes.main.MainActivity$$ExternalSyntheticLambda30.run(Unknown Source:2)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:463)
	at java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
	at java.lang.Thread.run(Thread.java:1012)

What I've done :

I had a nextcloud account temporarly set without any syncing, just to have the notes with your application (I planned to get a full nextcloud instance lately).
The account was nextcloud.alex.xxx.xxx

I finally got my instance running (at nextcloud.xxx.xxx).
I deleted the old account nextcloud.alex.xxx.xxx in android main nextcloud app

And notes android app does not want to know anything... Error message, cannot select an account, left menu is blank (as pictures shows in #1612).

Tried adding back the account in nextcloud app, no luck, still "no account is configured"

I had a widget with the notes listed, which always show the titles (even after reboot, so the data is still here), but clicking on a note goes back to the main problem (app does not open / says "no account is configured")

And i cannot select any account even if I have one configured in the nextcloud main app.

New android makes it totally impossible to access data (I'm not rooted). I can not adb run-as because the app is not debuggable, and abd backup gives my a 47bits file (which apparently is because of non backable app from manifest ?)

One solution would be to be able to access orphan notes / local notes without account, or give the possibility to export all database.

If you have an idea to correct this problem or to extract the note database (so I could wipe the note app data and start fresh).

Thank you very much for your good work !

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading MainActivity.java around line 174 and the SingleAccountHelper calls in the trace, then compare the behavior with related issues #1612 and #1566. Reproduce the account replacement scenario and determine whether the intended outcome is account selection, access to orphaned local notes, or database export; the issue needs one defined outcome before completion can be verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
authentication, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.