Operating system
Windows
Joplin version
3.2.7
Sync target
Joplin Server
Editor
Rich Text Editor
What issue do you have?
Hi,
So I set up a self-hosted joplin server around end of August 2024 for migrating from Evernote, that I've used since 2011.
To import all of that data took a couple of weeks, which I did on my primary laptop.
The problem now, seems to be that the (currently 4) clients will not sync back any data newer than 3rd September, with the error "Unexpected end of JSON input".
And so any notes newer than that created (mostly) on my mobile are not making it back to the other devices.
What do I need to find out to troubleshoot this?
Basically:
laptop with initial import has 28000 notes,
mobile with newer notes has 35000 notes
additional desktop & tablet where I've tried a fresh sync, both have around 27400 notes.
any new notebooks/notes created on any device don't sync back to any of the clients.
I've added a screenshot of a table showing those note details, if it'll help.
The tablet did show me an error about a massive pdf that it claims "would crash the client so it hasn't synced it".
Could that be the problem/blockage? and how might I remove the entry from the self-hosted server?
I've added a fresh logfile that shows the sync error from the desktop machine.
Thanks,
Sean
Screenshots
Log file
log.txt (186 KB)
I think maybe a better question would be:
How do I delete an item from the database if that appears to be the thing that is preventing the clients from syncing further data?
This is the error that is logged:
2025-01-12 11:53:55: JoplinServerApi: [warn] curl -v -X GET -H "X-API-AUTH: ******" -H "X-API-MIN-VERSION: 2.6.0" 'https://joplin.myserver.com/api/items/root:/:/delta?cursor=tqDKo4M8VAwzhrTOlYMQfw'
2025-01-12 11:53:55: JoplinServerApi: [warn] Code: 500
2025-01-12 11:53:55: JoplinServerApi: [warn] Error: Unexpected end of JSON input
The self-hosted server runs in docker/portainer and has a postgres database.
The admin gui shows all items, but there's no option for searching for specific ones?
Thanks,
Sean
The solution was actually less complicated than it appeared to be...
I'd tried setting the history to 0 days to see if it was a revision issue, but that didn't change anything.
I managed to find API docs for how the delta sync worked, which (eventually) led me to the github issue about "orphaned resources".
So the answer turned out to be:
On the machine that did the original import from Evernote, make a backup export to a .jex file (because backups are good) just in case.
Then, in the sync options of that (Windows) desktop client - "Re-upload local data to sync target".
This then got rid of the broken delta, and now all my devices appear to be synchronising properly!
As in, notebooks that were stuck on a single device are now propagating to all of them, along with the notes contained therein.