-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sync fails on Android mobile with error [object Object] #11571
Comments
Looks like at upstream issue: I can see from the log that the error is happening when selecting the note history. It seems that the error was triggered by the presence of a large note, then making a change to a large amount of the content in a short space of time. Possibly you can rid of the error for you if you delete all the note history, but probably the only way you can successfully do that in your case is to export all your notes as jex, delete the profile on all devices and joplin server, then reimport the backup and resync to joplin server and your devices. If you have a lot of notes then that's probably not what you want to hear, and I can't guarantee that will fix the issue, as it may not require a revision to be created to cause the problem |
Thank you for the quick response. I don't think i understand some of
the terms used. What exactly is meant by "note history"? WELL, never
mind. i went and looked it up and i think i understand.
Will the save to JEX file essentially remove all note history and just
give me a set of "clean" notes?
Also since i've got some notes on phone and some on laptop if i save
both to JEX is there any automated way that i can combine them without
creating many duplicates, but thus saving all the actual notes i have on
both phone and laptop?
The error in the log may be from "note history", but the problem i
reported was not with note history but with SYNC.
The "then making a change to a large amount of the content in a short
space of time" doesn't quite seem relevant. I'm not making any changes
to a note. I'm just trying to do a straight sync. yes i understand
that when i make a change to a note that also triggers a SYNC operation
and yes that same error occurs. But i have made no changes to a "large
amount of the content" of any note.
I've got about 589-600 notes so i don't think its a huge deal, but seems
like some of the comments of others who tried it in some of the other
forums say it didn't work.
On 2025-01-02 04:49 PM, mrjo118 wrote:
Looks like at upstream issue:
andpor/react-native-sqlite-storage#364 [1]
I can see from the log that the error is happening when selecting the
note history. It seems that the error was triggered by the presence of
a large note, then making a change to a large amount of the content in
a short space of time. Possibly you can rid of the error for you if you
delete all the note history, but probably the only way you can
successfully do that in your case is to export all your notes as jex,
delete the profile on all devices and joplin server, then reimport the
backup and resync to joplin server and your devices. If you have a lot
of notes then that's probably not what you want to hear, and I can't
guarantee that will fix the issue, as it may not require a revision to
be created to cause the problem
--
Reply to this email directly, view it on GitHub [2], or unsubscribe
[3].
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
I have an alternative proposal which may be able to fix your sync on Android. I can see from the error log that the sync is failing on a particular part which compares to items which exist on remote, and one of the matching remote revision items causes the error (Synchronizer.ts call to BaseItem.loadItemsByIds). The sync is working correctly on desktop right? There is a way that you can delete all note history older than 1 day, if you have a Joplin client where the sync is currently working. To do this, do the following: If it still does not work, then please come back and post an updated log file for Android and I'll take a look. EDIT: "Try sync again on Android. Hopefully it will then work" - for other users reading this, it doesn't look like this step works. However, if you instead uninstall Joplin on the problem Android device, then reinstall it and resync your notes, this will solve the issue, providing that the issue is with note history only. Unfortunately this does mean resyncing all your notes from scratch on the problem device, but at least it doesn't require replacing the sync target and full resync on ALL devices |
Hi,
I'm on a MAC so perhaps the menu is a bit different. I had to go to
JOPLIN, Preferences, and then NOTE HISTORY is there. I changed it to 1
and will leave closed till tomorrow and see how this works. Thanks!
and yes sync is working just fine on the desktop and on my iPad. Only
the Pixel phone is erroring. My note history was set to max 730 days or
so.
bob
On 2025-01-03 03:33 AM, mrjo118 wrote:
I have an alternative proposal which may be able to fix your sync on
Android. I can see from the error log that the sync is failing on a
particular part which compares to items which exist on remote, and one
of the matching remote revision items causes the error (Synchronizer.ts
call to BaseItem.loadItemsByIds).
The sync is working correctly on desktop right? There is a way that you
can delete all note history older than 1 day, if you have a Joplin
client where the sync is currently working. To do this, do the
following:
On desktop, if you go to Tools > Options > Note History, change the
value of 'Keep note history for' to 1, then click Apply. Then come back
the next day, no earlier than 24 hours later. Restart Joplin desktop
and do a sync. You should see in the sync status that it is deleting
lots of remote items. Once the sync has completed successfully, try
sync again on Android. Hopefully it will then work.
If it still does not work, then please come back and post an updated
log file for Android and I'll take a look.
--
Reply to this email directly, view it on GitHub [1], or unsubscribe
[2].
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
OK here comes the long reply & details. But first I'm fixed, at least
fixed enough. I don't think there is a fundamental problem with Pixel
phones. &but no, the last process below i did, but it didn't work.
I followed this last process because it seemed easiest and had a good
chance of working.
Having failed to carefully read all the steps, i only missed one and
didn't make a before screen shot of sync status. so i don't have that
data.
Sync was working on the desktop and on my iPad, just not on Pixel phone.
I was on latest version (
3.1.24 (prod, darwin)), but do note that this problem had existed at
least 2 versions back.
i moved note history to 1 day on the desktop. shut down Joplin on phone
and iPad and desktop, waited 24 hours (6:30 AM to about 7 AM next day).
On first desktop sync it deleted 64 remote items. on second desktop sync
it deleted 137 remote items. on third desktop sync it just completed,
no more remote items.
I then opened the iPad (which i had not changed the history days on so
it was still at max 730). it created 16 local items, updated 5 local
items, deleted 166 local items and fetched items 188/188.
I attempted sync on Pixel phone. It errored out with [object Object]
error just like always. I am quite certain from note searches that new
items on the desktop were not downloaded to the Pixel.
So the pixel phone has two users. so i went over to the other user,
downloaded Joplin fresh new start. Never on the partition before. It
synched normally (and surprisingly quickly). the only discrepancy was
that it said in sync status it had SYNC STATUS, total 825/825. The note
count matched the desktop at 552.
So all this lead me to believe there was some "hung error" in the notes
or in the program that wasn't going to be clearable. so i did a JEX
backup of that file (pixel phone, error side file) and have saved it
just in case i ever figure out that i'm missing something that i put
into the phone that never got to the desktop.
Deleted and re-loaded the whole program to main side phone and it
synched (again quite fast) and now seems to be working fine, which is
what i wanted all along. The note count on phone is now 565 on both
partitions, desktop 565, the iPad is 567 which is at least consistent
and not worth me trying to get it exactly in sync with the rest.
I believe a donation to the coffee fund is in order. thank you so very
much!!
On 2025-01-03 03:49 AM, mrjo118 wrote:
I have an alternative proposal which may be able to fix your sync on
Android. I can see from the error log that the sync is failing on a
particular part which compares to items which exist on remote, and one
of the matching remote revision items causes the error (Synchronizer.ts
call to BaseItem.loadItemsByIds).
The sync is working correctly on desktop right? There is a way that you
can delete all note history older than 1 day, if you have a Joplin
client where the sync is currently working. To do this, do the
following:
-Make sure you are using a recent version of Joplin desktop
-Go to Tools > Options > Note History, change the value of 'Keep note
history for' to 1, then click Apply
-Go to Help > Synchronisation status, take a screenshot of this screen
for reference
-Come back the next day, no earlier than 24 hours later. Start Joplin
desktop and do a sync. You should see in the sync status that it is
deleting lots of remote items (unless you already had Joplin desktop
open when the note history expired, and an auto sync has already
deleted the note history)
-Once the sync has completed successfully, click the sync button 1 more
time and let it complete
-Go to Help > Synchronisation status. You should see that the number of
revisions has dropped significantly since the first time
-Try sync again on Android. Hopefully it will then work
-Revert the 'Keep note history for' value on Joplin desktop to the
previous value, if you so wish
If it still does not work, then please come back and post an updated
log file for Android and I'll take a look.
--
Reply to this email directly, view it on GitHub [1], or unsubscribe
[2].
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
@bob7vogel You didn't read the instructions wrong, you just read an outdated comment. If possible it helps to reply on GitHub directly so you will see any edits (as I see you replied via email). I'm glad you could resolve the issue, and thank you for confirming your steps. It sounds like it's not currently possible to delete note history on Android via the revision service or downloading deletions from the sync target when you have been hitting the "Row too big to fit into CursorWindow" error. So the only way to fix currently is deleting Joplin data on the Android device and resyncing notes from scratch. Ideally if a delete all note history feature would be added to Joplin which avoids selecting the data into memory before deleting, it would allow deleting note history without requiring starting a new profile on Android. |
I have had a read through all the issue reports relating to the CursorWindow errors and done some code analysis. Here are the facts: The "Row too big to fit into CursorWindow" error will occur when the size of a single record returned in a select query is greater than the cursor window size which is defined for Android devices specifically. The default size set by Android is around 2mb for most platforms. There is a workaround implemented in the Joplin code to override this value and set it to 50mb. I have created a note in Joplin desktop which is approx 4.8mb in size and exported it as a jex file (big.jex). Using Android emulator on Android 15, I am unable to reproduce the error by importing big.jex. However, if I remove the workaround implemented in MainApplication.kt and build the code locally, I am able to reproduce the error by simply importing big.jex (no sync setup is required). This proves that the workaround implemented in MainApplication.kt does work, which is why the Joplin team have not been able to reproduce the error. Looking at the user feedback, in one example it was reported (in a version of Joplin which had this workaround implemented) that the error occurred selecting from revisions, despite not having any individual note which is 50mb or greater in size that could create a revision so large. I think the most likely cause of the error is due to the logic to override the window size to 50mb not working on some devices. It does not appear to be related to the version of Android, or how powerful the phone is, as it has been reported on old and new phones including high end ones. Therefore I am guessing producing the issue is dependent on the bundled version of sqlite which comes with the Android device. This is supposed to be dependent on the version of Android, however the link here android.database.sqlite | Android Developers says "Some device manufacturers include different versions of SQLite on their devices". In the issue reports regarding the error, users have experienced this issue when selecting from 1 of 3 tables: notes, resources and revisions. Therefore, in the event that the user had a device where the workaround does not work correctly, for each of these tables, it would be possible to produce the error in the following scenarios: Therefore, if you are someone who has an affected device, you will have to bear in mind these limitations if using an Android device as a client, as this issue probably can't be fixed. For all other users who are not affected by this issue, the 50mb limit instead will apply for each of the above scenarios. |
Operating system
Android
Joplin version
Joplin Mobile 3.2.3 (prod, android)
Desktop version info
No response
Current behaviour
Expected behaviour
app syncs without error. the files on the mobile device match the files on the server (Joplin cloud, which i use) and match the files on the desktop
For me this is a critical fault. It means i can't use Joplin as i need to, syncing across all platforms i use.
The issue has been reported (and not fixed) on several other forums (it's hard for the uninitiated user to figure out where support comes from and where these issues need to be raised). All we get back is "can't duplicate issue". Well it seems to be duplicable on every Android device, at least Pixels.
Please, please ask me for any other information you need to resolve this issue.
It seems from error log to be running into entries that are "Row too big to fit into CursorWindow", yet i don't see how to find what entry that is so i might fix that.
I'm running Android version 15. Graphene OS version 15, version code 35.
Phone is a Pixel Pro 7.
Logs
mobile-log.log
The text was updated successfully, but these errors were encountered: