Problem with Revision History Service - referring to non-existing note


I am using Joplin Mobile on Android Version 2.6.8
I am syncing against a self-hosted Nextcloud-Server

I have quite a number of notes (approx. 3.500) and had a problem with the app regularly crashing. I (maybe too late) then checked the protocol and found errors there with the RevisionService. The errors always were: "SyntaxError: Could not create revision for note: ... JSON Parse error: unterminated string ...". In a terminal I identified the file by the id and found out about the content, so I could find and edit the note on my android. The problem could be solved by just editing the note, deleting a space or something similar. When saving it and synchronising again, the error for that note disappeared, but unfortunately another error was found with a different note. So it must have been some mistakes editing the notes or maybe it was a bug in a previsous version and so I had a lot of those 'buggy' notes.

Step by step I went through the notes and could always make them sync (each time creating around 20-50 new notes on the remote Nextcloud server, so these notes obviously did not sync before due to those errors).

Now I got stuck because the note ID Joplin is pointing out in the error message in the protocol does not refer to an existing file on the server. So of course I cannot edit that note and fix the error.

Is there any way of having the revision service do a re-scan or a rebuild of the history so that Joplin sees, it is referring to an ID that does not correspond to a file? Did a file-rescan on Nextcloud but that did not help.

I guess this might be a bug but did not report to github because I cannot provide steps to reproduce. These errors just seem to have build up in my many notes and I cannot tell how, just found a way of how to fix them, Any help appreciated.


Hi Gerd, sorry to hear you're having troubles
Aside from mobile, do you use the desktop app?

I'm asking because there's probably not much you can do from mobile. From the desktop, you could preview the local database and see the note causing trouble.

As a general note, if you can use desktop, please keep a backup of your notes regardless of the sync target. Backup plugin may help automating the process.

Also would like to warn you that editing .md files in the sync target manually may cause serious problems with database (data loss). Hope you're not doing that (it's unclear from your post)


thank you for your reply. I have installed the desktop app as well but only use it from time to time. Most work is done with the mobile.

I do keep backups of the sync target as well as of the local folders with the desktop app (that's why I use it from time to time to sync and backup).

And: yes, because I did not see any other way I did edit the md-files from command line. I knew this was not intended but I just could not get rid of those errors. I only edited the part above the meta-data. And this seemed to help because even just adding a blank space and removing it made the error disappear. But if you say that is a no-go I will of course stop it.

But the main question remains: how do I solve those 'unterminated string' errors? Joplin does not seem to be able to do it. You mentioned previewing the database from the desktop version. Can you briefly tell me how to do this? And can I work on those errors by doing so?

Thank you very much for your help!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.