orgnote icon indicating copy to clipboard operation
orgnote copied to clipboard

[Bug] Blank screen and no response on Android after an attempt to force-sync

Open SemyonSinchenko opened this issue 11 months ago • 5 comments

Thank you for the bug report

  • [x] I am using the latest version of the OrgNote app.
  • [x] I already checked other related issues
  • [x] I have read the WIKI

Bug description and steps to reproduce

I have an endless blank screen after an attempt to run force-sync on android.

Debug info

I cannot run anything because app is not responding.

Additional info:

  • Version: 0.22.8 (the latest from GitHub releases)
  • Android version: 15
  • Model: Pixel 8
  • Encryption: GPG Password

I'm running it on GrapheneOS with no access to Google Mobile Services, can it be an issue? Also, if you can say me where can I look for orgnote logs on the Android, I can try to extract them.

Additional context

Image

SemyonSinchenko avatar Mar 04 '25 08:03 SemyonSinchenko

I'm running it on GrapheneOS with no access to Google Mobile Services, can it be an issue?

It's unlikely

Also, if you can say me where can I look for orgnote logs on the Android, I can try to extract them.

They are not stored on disk, that's a good point, will probably add that in the future. However, in this situation it seems unlikely to help, it feels like the process is hanging due to excessive resource consumption

How many notes are we talking about? And how much memory do they take up?

Right now synchronization is not working optimally, unloading all notes into memory. I have plans to create a queue of tasks that will unload each note individually when it is received

Artawower avatar Mar 05 '25 18:03 Artawower

How many notes are we talking about? And how much memory do they take up?

About 2Mb. May be the problem that notes are encrypted?

SemyonSinchenko avatar Mar 06 '25 07:03 SemyonSinchenko

I don't think so, I've looked into this issue and it's quite fundamental. We still need an asynchronous queue. I plan to move to it after integrating SAF in the new application. After that I will try to make a cherry pick of this particular feature into the old version

Artawower avatar Mar 30 '25 11:03 Artawower

After some attempts to fix it on Android I realized the following:

  • Force Sync move the app to the state with a blank screen
  • If I do not use force-sync but log-in I see "note syncing in progress..." message but nothing happens
  • There is only row in logs on android and it is this row: [error] ["QPage needs to be child of QPageContainer"]

SemyonSinchenko avatar Jun 06 '25 13:06 SemyonSinchenko

Yes, that's right - there won't be any errors in the console, because the reason for the white screen is more likely a lack of resources. A complete solution requires rework of both server side and client side synchronization logic, including file system updates and persistent tasks queue (only a few notes can be unloaded and processed at a time).

Right now I'm focusing on a new implementation that will fix this and many other issues, including file system access (SAF was integrated for this issue not too long ago). You can follow the work in this pr: https://github.com/Artawower/orgnote-client/pull/36

I apologize that the progress is not very fast, I decided to lay down some aspects that will avoid a number of problems in the future and add a more convenient layer for writing extensions

Artawower avatar Jun 09 '25 04:06 Artawower