Recently I ran into an error when trying to update Joplin (hooked up to WebDAV on NextCloud).
Last error: FetchError: request to https://nextcloud.rapternet.us/remote.php/dav/files/sbachhub/Documents/Joplin/info.json failed, reason: certificate has expired
I checked the SSL cert with FireFox and everything looked good there. Finally I decided to try updating the application, on a wild attempt to fix it in a simple way, and… it worked. It might have just needed a reboot, but the update worked in this case.
For a while my NextCloud server decided to stop allowing my phone or desktop to upload to it due to it being in “maintenance mode”, however I could log into the webui with no problems, and nothing in the logs showed it being in maintenance mode. This started to frustrate me as I could find nothing to signify why my clients thought the server couldn’t be used. I tried a number of things:
- Clearing out the file locks table (there were 600,000 entries in it, and I’m the only user on the server)
- occ db:add-missing-columns
- occ db:add-missing-indices
- occ db:add-missing-primary-keys
What finally worked:
- occ files:scan –all
Finally with the files:scan –all it started working again and my app was able to start uploading to the server. If you have a NextCloud server and have been running into “maintenance mode” errors when your server is not in maintenance mode, this is certainly worth trying.
Some GitHub Issues worth checking:
I encountered a problem recently on the Joplin desktop app where it couldn’t synchronize due to a file lock being stuck in NextCloud. It uses a file in the jopline data directories to determine sync status and lock status on files being edited, and this file was stuck locked in NextCloud with no way to delete it. I performed some searching, finding some blog posts on the subject and found this on how to solve it. I’ll be going through the manual solution to this problem and updating the process with my experience.
Continue reading “NextCloud File Lock Error in Joplin”
Joplin was relatively simple to setup on NextCloud. The only difficulty is setting the folder it should run out of. This is done via the webdav url that Joplin connects to. An example is shown below on how to get this going.
https://nextcloud.rapternet.us/remote.php/dav/files/<username>/<path to Joplin directory>
The webdav url just needs your username and the path it should utilize, in my case I just have Joplin setup to go to Documents/Joplin. This would go in the tag above, just add a username and it’s done. This does have to be setup the same way on all Joplin clients or you will end up with files missing from one or another, though they will all be in NextCloud.
Setup is easy enough IF http does not redirect to https. The authentication mechanism for the NextCloud desktop client for some reason doesn’t work when http is redirected to https (ex: in the way let’s encrypt sets it up). With the right server setup after that, everything is straight forward.