Joplin sync error under Linux (unexpected end of file for version.txt) but still works for iOS & Android

Hi,

I’m using Joplin with data on a nextcloud shared server.
Joplin is used under Linux Mint, Android app, iOs app.

Under Linux Mint (Joplin v 1.0.179), I’ve recently (for almost 2 weeks actually) had the following error message :
Terminé : 05/03/2020 22:42
Dernière erreur : FetchError: invalid response body at: https://nextcloud.MYWEBSITE.COM/remote.php/webdav/Joplin/.sync/version.txt reason: unexpected end of file

This bug is only on Joplin for Linux.
I’ve tried :

  • deleted the version.txt file, the bug is still there.
  • Uninstall / Reinstall the app but not the data, still this bug.
  • switching from nextcloud synchronization to webdav synchronization
  • Uninstall the app AND not the data, reinstall only , and reconfigure to webdav sync … the error is still there.

Under the nextcloud sync configuration, there is a more detailed error which starts as:

L’application Joplin pour Nextcloud n’est pas installée ou est configurée incorrectement. Voir le début du message d’erreur ci-dessous pour plus d’information :
> Cannot parse JSON:

<html class="ng-csp" data-placeholder-focus="false" lang="en" data-locale="en" >

I’m out of ideas.

Can you help ?

Would “reset” the version.txt file help ?
What would be its default value ?

I’ve done additional testing installing Joplin under Win8.
Same error message :

Last Error : FetchError: invalid response body at: https://nextcloud.MYWEBSITE.COM/remote.php/webdav/Joplin/.sync/version.txt reason: unexpected end of file

So, it appears to be working perfectly fine for iOS & Android (including sync), but got this message under Linux or Windows.

Hi all, any chance to have a feedback ?
That would be very helpful :pray:

Who do you host your nextcloud server through, what operating system does your server run on, and do you know if your ports are opened correctly?

Hi, I host my server through OVH, on a basic offer. The server runs on Linux (don’t know which distribution).
I believe my ports should be opened correctly. At least I didn’t change anything lately.

Do you have any idea of what causing the trouble ?

After changing my nextcloud client, I noticed this sync error for /Joplin/.sync/version.txt :
“le fichier reçu est vide bien que le serveur indique que sa taille devrait être de 1 octets.”
“received file is empty when server states the file size should be 1 byte”

Anyway you could move the version.txt file to either another directory or rename it? Also, if your Nextcloud instance has everything on it and it’s correct, I’d fully download your sync directory from there to your desktop so you have a backup of that just in case you accidentally delete it when trying to fix this issue.

If you’re not on Joplin 1.0.199 yet, make a Jex export backup (broken in latest release) and move your ~/.config/joplin-desktop to another location (to back up settings in case). If you have upgraded, you should be able to safely roll back to 1.0.197 to do this. Restart Joplin, put your Nextcloud credentials in, and try to sync again.

Thanks for your idea @bedwardly-down

So I’ve tried to move the “.sync” directory to a another directory (on both desktop & cloud)
I’ve backed-up the ~/.config/joplin-desktop
I’ve updated Joplin to latest version (Jex export backup does not seem useful, as I’ve continued using the app on an Android phone and typed manually all differences)
Exited Nextcloud client
Configured Joplin app with the webdav option, url provided by nextcloud (with the extra /Joplin at the end)
Running the app on Linux Mint, through webdav connection : I had the same error.

FetchError: invalid response body at: https://nextcloud.MYWEBSITE.COM/remote.php/dav/files/USER/Joplin/.sync/version.txt reason: unexpected end of file

Reopening the app on Android & syncing recreates the .sync directory.
Then, trying to sync Joplin app from desktop, the error message is still the same as above.

I’m sure the sync still works : I have an Android and an iPhone, and sync between both devices work great.

This message above earlier was unclear, sorry about that
The sync error message comes from Nextcloud client on Linux Mint, not from Joplin desktop app

Hi,

I’ve moved from OVH shared server to VPS.
Problem is still present on OVH shared servers with nextcloud but solved VPS.

Therefore… Problem solved !

thanks for your time @bedwardly-down !!

1 Like