nextcloud / notes-android

✎ Android client for Nextcloud Notes app.
https://play.google.com/store/apps/details?id=it.niedermann.owncloud.notes
GNU General Public License v3.0
921 stars 134 forks source link

Unable to open notes - accounts no longer available #1612

Closed nybhtw closed 1 year ago

nybhtw commented 1 year ago

Please use GitHub reactions 👍 to show that you are affected by the same issue. Please don't comment if you have no relevant information to add!

Describe the bug

My notes do not appear. Neither of my two accounts appear either. Nextcloud app is installed and working fine, and has two Nextcloud accounts in the app linked using DavX.

I would just uninstall and reinstall, however I have a handful of notes that have yet to sync, and I don't want to lose these. If I could access the sqlite db, I would grab them then reinstall.

Error message when opening the App:

App Version: 3.6.0
App Version Code: 3006000
App Flavor: play

Files App Version Code: 30220390

---

OS Version: 4.9.193-perf(8450100201101)
OS API Level: 29
Device: judyln
Manufacturer: LGE
Model (and Product): LM-G710 (judyln_lao_com)

---

com.nextcloud.android.sso.exceptions.NoCurrentAccountSelectedException: No account selected yet
    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$$ExternalSyntheticLambda24.run(Unknown Source:2)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at java.lang.Thread.run(Thread.java:919)

To Reproduce Steps to reproduce the behavior:

  1. Open the application
  2. Error message appears immediately. If I click on Close, it shows a circle animation and continues to spin non stop.

No account is selected or available. Clicking on the 3 line menu shows an empty menu.

Expected behavior

It used to open up and show all of my notes.

Screenshots

image image image

Smartphone (please complete the following information):

Files App Version Code: 30220390

Server

Stacktrace

stefan-niedermann commented 1 year ago

Hello there 👋

first of all: Sorry for the inconceniences. Let's start finding out what we can rescue here:

If I could access the sqlite db, I would grab them then reinstall.

Did you already connect your device using ADB to get the database? You should indeed be able to extract the Notes from it.

By

Steps to reproduce the behavior

I did not mean how to display the error again, but how you managed to get in this weird state at all. What did you do?

stefan-niedermann commented 1 year ago

Closing due to missing feedback. Feel free to reopen providing the requested information.

Faexa commented 1 year ago

Hello, I'm reopening this issue as I have the exact same problem

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 you 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

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

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"

New android makes it totaly impossible to access data (I'm not rooted). I can not adb run-as because the app is not debuggable.

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 !