Sync issue: EPERM: operation not permitted, open

I am working with Joplin 1.7.11 (prod, win32)
Sync Version: 2
Profile Version: 34

I have it set up on a desktop, but I changed the laptop and the issue comes when syncing the new machine.

I have a Synology NAS, so I created a folder in their shared Drive system, and got Joplin to sync to that. It has been working with no issues with my previous laptop as well as the desktop and still does, but the new laptop won't sync. All machines are Windows 10.
I get this on the new one... Last error: Error: Error: Error: EPERM: operation not permitted, open

When I first installed it I had some issue having it import the notes from there, I think it didn't and then recognized the sync date was older than the notes there, so although it would place new notes, it would not import the older ones.
So I wiped the App and installed it again from scratch.
This time it imported fine but got this error later on.

I thought for some reason there was a permissions issue. I made sure the folder was not read-only and after some forth and back I got it syncing.

But now all of the sudden I get the error again, and I am sure the files are not read-only... so there is something else going on that I don't see.

Any advice?
I don't think "Joplin won't sync" is a reason for returning the laptop XD

Still can't get it to work.

Any ideas what is going on? On any other machine that I have tried (PC and Mac) it simply works. I don't understand what is going for it to not be able to update the contents of the sync folder.

So here is another update...

I made sure the sync failsafe was on and changed the sync folder to an empty folder.
As expected I got an error saying it stopped the syncing to avoid deleting the local data.

I pointed Joplin back to the original sync folder... and everything worked.
It even detected 3 conflicts since unfortunately those notes were modified before I realized the syncing issue.

BUT, in the 5 minutes that took me to search for the differences on those notes, and without changing anything on the setting or the system, I am getting again the same error and is not syncing anymore...

I feel like I am talking to myself.
Any help please?
At this point I am considering leaving Joplin behind if I can't rely on it if I ever need to install it on a new device, not to mention I need it on this one.

I don't have Windows 10, but I am not sure how anyone can help you. You stated yourself that it works on evey other machine except the one new laptop.

What does this tell you? Joplin syncs, just not on that machine. Logic dictates something is wrong with that machine. By "wrong" I also mean different. How can I know what it is? I don't have access to either of your machines. Noone in this forum does.

The proper course of action is to figure out what these differences are. Other than that there's nothing anyone can do. Especially without a proper log file, which btw was mentioned in the template when you created this topic.

I agree with you 100% Tessus, obviously, the problem is with this machine and obviously, no one of you guys has access to it.
What I was hoping for is somebody that had encountered a similar problem before, or that can have an idea of why the system is denying access to the files in general terms, to point me in a direction to different things to try out.

I did repeat selecting a different folder and going back to the original one, and so far this time the error is not coming back.
If it does I will do a proper log. Thanks.

I get that. I replied so that you know that I have read your topic. Unfortunately I can't really help you, since I haven't seen such an issue before.

Others might not answer, because they have not either.

Maybe there's something in the log that explains it. I don't know.

Well, it came back.

This is what I get in the log at start-up:

2021-04-18 20:37:59: App: "Profile directory: C:/Users/usera/.config/joplin-desktop" 2021-04-18 20:37:59: "Database was open successfully" 2021-04-18 20:37:59: "Checking for database schema update..." 2021-04-18 20:37:59: "Current database version", "{"version":34,"table_fields_version":34}" 2021-04-18 20:37:59: "Upgrading database from version 34" 2021-04-18 20:37:59: "New version: 34. Previously recorded version: 34" 2021-04-18 20:37:59: "KeychainService: checking if keychain supported" 2021-04-18 20:37:59: "KeychainService: check was already done - skipping. Supported:", "1" 2021-04-18 20:37:59: App: "Client ID: 867eab9d9c3847d5b633570d4d91407b" 2021-04-18 20:37:59: "Trying to load 0 master keys..." 2021-04-18 20:37:59: "Loaded master keys: 0" 2021-04-18 20:37:59: "ResourceFetcher: Auto-add resources: Mode: always" 2021-04-18 20:37:59: "ResourceFetcher: Auto-added resources: 0" 2021-04-18 20:37:59: "Trying to load 0 master keys..." 2021-04-18 20:37:59: "Loaded master keys: 0" 2021-04-18 20:37:59: "Scheduling sync operation...", "10000" 2021-04-18 20:37:59: "Setting up recurrent sync with interval 300" 2021-04-18 20:37:59: "Trying to load 0 master keys..." 2021-04-18 20:37:59: "Loaded master keys: 0" 2021-04-18 20:37:59: "Scheduling sync operation...", "10000" 2021-04-18 20:37:59: "Trying to load 0 master keys..." 2021-04-18 20:37:59: "Loaded master keys: 0" 2021-04-18 20:37:59: "Scheduling sync operation...", "10000" 2021-04-18 20:37:59: "app.start: doing regular boot" 2021-04-18 20:37:59: App: "Refreshing notes:", "null", "null" 2021-04-18 20:37:59: "Trying to load 0 master keys..." 2021-04-18 20:37:59: "Loaded master keys: 0" 2021-04-18 20:37:59: "Scheduling sync operation...", "10000" 2021-04-18 20:37:59: "Setting up recurrent sync with interval 300" 2021-04-18 20:37:59: "Trying to load 0 master keys..." 2021-04-18 20:37:59: "Loaded master keys: 0" 2021-04-18 20:37:59: "Scheduling sync operation...", "10000" 2021-04-18 20:37:59: "Trying to load 0 master keys..." 2021-04-18 20:37:59: "Loaded master keys: 0" 2021-04-18 20:37:59: "Scheduling sync operation...", "10000" 2021-04-18 20:37:59: App: "Refreshing notes:", "2", "cdd5c9371a66430eb54306db9487ad57" 2021-04-18 20:37:59: "Scheduling sync operation...", "1000" 2021-04-18 20:37:59: "RevisionService::runInBackground: Starting background service with revision collection interval 600000" 2021-04-18 20:37:59: SpellCheckerServiceDriverNative: "Set effective language from "en-GB" to "en-GB"" 2021-04-18 20:37:59: "Loading existing note", "5f78f6d740f740f494192160d0c4e22f" 2021-04-18 20:38:00: "DecryptionWorker: cannot start because no master key is currently loaded." 2021-04-18 20:38:00: "Loaded note:", "{"id":"5f78f6d740f740f494192160d0c4e22f","parent_id":"cdd5c9371a66430eb54306db9487ad57","title":"Reach","body":"# Por email\n![Screenshot 2020-08-10 at 20.29.20.png](:/e5042e9b15684521b2e120a06d039b15)\n\nhttp://www.juanjez.com/about/\nEn madrid\nMe ha dicho bastante sobre la imprenta\n\nwww.tallerlamaquina.com\nMe ha dicho algo sobre la imprenta\n\n\n# PACA\n- Monicacistellera\n- wearepixelarte\n- conbarro\n- https://www.instagram.com/juanjezlopez/\n\n\n# Awesome\n\n\n\n# DP","created_time":1593368588870,"updated_time":1609674873891,"is_conflict":0,"latitude":"0.00000000","longitude":"0.00000000","altitude":"0.0000","author":"","source_url":"","is_todo":0,"todo_due":0,"todo_completed":0,"source":"joplin-desktop","source_application":"net.cozic.joplin-desktop","application_data":"","order":1593368588868,"user_created_time":1593368588870,"user_updated_time":1609674873891,"encryption_cipher_text":"","encryption_applied":0,"markup_language":1,"is_shared":0,"type_":1}" 2021-04-18 20:38:00: "Preparing scheduled sync" 2021-04-18 20:38:00: "Starting scheduled sync" 2021-04-18 20:38:00: "Sync: starting: Starting synchronisation to target 2... [1618771080311]" 2021-04-18 20:38:00: FileApi: "get C:\Users\usera\SynologyDrive\.Joplin/info.json" 2021-04-18 20:38:00: "Sync target info:", "{"version":2}" 2021-04-18 20:38:00: FileApi: "list C:\Users\usera\SynologyDrive\.Joplin" 2021-04-18 20:38:00: FileApi: "list C:\Users\usera\SynologyDrive\.Joplin" 2021-04-18 20:38:00: FileApi: "put C:\Users\usera\SynologyDrive\.Joplin/temp/timeCheck561460.txt", "null" 2021-04-18 20:38:00: FileApi: "stat C:\Users\usera\SynologyDrive\.Joplin/temp/timeCheck561460.txt" 2021-04-18 20:38:00: FileApi: "delete C:\Users\usera\SynologyDrive\.Joplin/temp/timeCheck561460.txt" 2021-04-18 20:38:00: FileApi: "put C:\Users\usera\SynologyDrive\.Joplin/locks/sync_desktop_867eab9d9c3847d5b633570d4d91407b.json", "null" 2021-04-18 20:38:00: FileApi: "list C:\Users\usera\SynologyDrive\.Joplin" 2021-04-18 20:38:00: FileApi: "list C:\Users\usera\SynologyDrive\.Joplin" 2021-04-18 20:38:00: FileApi: "stat C:\Users\usera\SynologyDrive\.Joplin/096476f92d7a470e80dff4b065d1899d.md" 2021-04-18 20:38:00: FileApi: "get C:\Users\usera\SynologyDrive\.Joplin/096476f92d7a470e80dff4b065d1899d.md" 2021-04-18 20:38:00: "Sync: updateRemote: local has changes: Note: (Local 096476f92d7a470e80dff4b065d1899d): (Remote 096476f92d7a470e80dff4b065d1899d.md)" 2021-04-18 20:38:00: FileApi: "put C:\Users\usera\SynologyDrive\.Joplin/096476f92d7a470e80dff4b065d1899d.md", "null" 2021-04-18 20:38:00: FileApi: "list C:\Users\usera\SynologyDrive\.Joplin" 2021-04-18 20:38:00: FileApi: "list C:\Users\usera\SynologyDrive\.Joplin" 2021-04-18 20:38:00: "Error: Error: Error: EPERM: operation not permitted, open 'C:\Users\usera\SynologyDrive\.Joplin\096476f92d7a470e80dff4b065d1899d.md'. Path: C:\Users\usera\SynologyDrive\.Joplin/096476f92d7a470e80dff4b065d1899d.md. Path: C:\Users\usera\SynologyDrive\.Joplin/096476f92d7a470e80dff4b065d1899d.md Code: EPERM Error: Error: Error: EPERM: operation not permitted, open 'C:\Users\usera\SynologyDrive\.Joplin\096476f92d7a470e80dff4b065d1899d.md'. Path: C:\Users\usera\SynologyDrive\.Joplin/096476f92d7a470e80dff4b065d1899d.md. Path: C:\Users\usera\SynologyDrive\.Joplin/096476f92d7a470e80dff4b065d1899d.md at FileApiDriverLocal.fsErrorToJsError_ (C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules\@joplin\lib\file-api-driver-local.js:20:18) at FileApiDriverLocal.put (C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules\@joplin\lib\file-api-driver-local.js:152:15) at async tryAndRepeat (C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules\@joplin\lib\file-api.js:40:19)" 2021-04-18 20:38:00: FileApi: "delete C:\Users\usera\SynologyDrive\.Joplin/locks/sync_desktop_867eab9d9c3847d5b633570d4d91407b.json" 2021-04-18 20:38:00: "Sync: finished: Synchronisation finished [1618771080311]" 2021-04-18 20:38:00: "Operations completed: " 2021-04-18 20:38:00: "updateRemote: 1" 2021-04-18 20:38:00: "Total folders: 105" 2021-04-18 20:38:00: "Total notes: 319" 2021-04-18 20:38:00: "Total resources: 456" 2021-04-18 20:38:00: "There was some errors:" 2021-04-18 20:38:00: "Error: Error: Error: EPERM: operation not permitted, open 'C:\Users\usera\SynologyDrive\.Joplin\096476f92d7a470e80dff4b065d1899d.md'. Path: C:\Users\usera\SynologyDrive\.Joplin/096476f92d7a470e80dff4b065d1899d.md. Path: C:\Users\usera\SynologyDrive\.Joplin/096476f92d7a470e80dff4b065d1899d.md Code: EPERM Error: Error: Error: EPERM: operation not permitted, open 'C:\Users\usera\SynologyDrive\.Joplin\096476f92d7a470e80dff4b065d1899d.md'. Path: C:\Users\usera\SynologyDrive\.Joplin/096476f92d7a470e80dff4b065d1899d.md. Path: C:\Users\usera\SynologyDrive\.Joplin/096476f92d7a470e80dff4b065d1899d.md at FileApiDriverLocal.fsErrorToJsError_ (C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules\@joplin\lib\file-api-driver-local.js:20:18) at FileApiDriverLocal.put (C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules\@joplin\lib\file-api-driver-local.js:152:15) at async tryAndRepeat (C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules\@joplin\lib\file-api.js:40:19)" 2021-04-18 20:38:00: "Setting up recurrent sync with interval 300" 2021-04-18 20:38:00: "Updating all notifications..." 2021-04-18 20:38:00: "Garbage collecting alarms..." 2021-04-18 20:38:00: "Saving settings..." 2021-04-18 20:38:00: "Sync has finished and note has never been changed - reloading it" 2021-04-18 20:38:00: "Settings have been saved." 2021-04-18 20:38:01: "DecryptionWorker: cannot start because no master key is currently loaded." 2021-04-18 20:38:03: "RevisionService::maintenance: Starting..." 2021-04-18 20:38:03: "RevisionService::maintenance: Service is enabled" 2021-04-18 20:38:03: "RevisionService::collectRevisions: Created revisions for 0 notes" 2021-04-18 20:38:03: "RevisionService::maintenance: Done in 114ms" 2021-04-18 20:38:09: "SearchEngine: Updating FTS table..." 2021-04-18 20:38:09: "SearchEngine: Updated FTS table in 1ms. Inserted: 0. Deleted: 0"

And this is the error in the console:

20:38:00: Error: Error: Error: EPERM: operation not permitted, open 'C:\Users\usera\SynologyDrive.Joplin\096476f92d7a470e80dff4b065d1899d.md'. Path: C:\Users\usera\SynologyDrive.Joplin/096476f92d7a470e80dff4b065d1899d.md. Path: C:\Users\usera\SynologyDrive.Joplin/096476f92d7a470e80dff4b065d1899d.md
at FileApiDriverLocal.fsErrorToJsError_ (C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules@joplin\lib\file-api-driver-local.js:20)
at FileApiDriverLocal.put (C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules@joplin\lib\file-api-driver-local.js:152)
at async tryAndRepeat (C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules@joplin\lib\file-api.js:40)
log @ C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules@joplin\lib\Logger.js:181
error @ C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules@joplin\lib\Logger.js:57
(anonymous) @ C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules@joplin\lib\Synchronizer.js:827
rejected @ C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules@joplin\lib\Synchronizer.js:6
Promise.then (async)
step @ C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules@joplin\lib\Synchronizer.js:7
fulfilled @ C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules@joplin\lib\Synchronizer.js:5
Promise.then (async)
step @ C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules@joplin\lib\Synchronizer.js:7
fulfilled @ C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules@joplin\lib\Synchronizer.js:5
Promise.then (async)
step @ C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules@joplin\lib\Synchronizer.js:7
fulfilled @ C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules@joplin\lib\Synchronizer.js:5
Promise.then (async)
step @ C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules@joplin\lib\Synchronizer.js:7
fulfilled @ C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules@joplin\lib\Synchronizer.js:5
Promise.then (async)
step @ C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules@joplin\lib\Synchronizer.js:7
fulfilled @ C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules@joplin\lib\Synchronizer.js:5
Promise.then (async)
step @ C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules@joplin\lib\Synchronizer.js:7
fulfilled @ C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules@joplin\lib\Synchronizer.js:5
Promise.then (async)
step @ C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules@joplin\lib\Synchronizer.js:7
fulfilled @ C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules@joplin\lib\Synchronizer.js:5
Promise.then (async)
step @ C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules@joplin\lib\Synchronizer.js:7
fulfilled @ C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules@joplin\lib\Synchronizer.js:5
Promise.then (async)
step @ C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules@joplin\lib\Synchronizer.js:7
fulfilled @ C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules@joplin\lib\Synchronizer.js:5
Promise.then (async)
step @ C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules@joplin\lib\Synchronizer.js:7
(anonymous) @ C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules@joplin\lib\Synchronizer.js:8
__awaiter @ C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules@joplin\lib\Synchronizer.js:4
start @ C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules@joplin\lib\Synchronizer.js:283
timeoutCallback @ C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules@joplin\lib\registry.js:130
async function (async)
timeoutCallback @ C:\Users\usera\AppData\Local\Programs\Joplin\resources\app.asar\node_modules@joplin\lib\registry.js:100
listOnTimeout @ internal/timers.js:549
processTimers @ internal/timers.js:492

It looks like that the user cannot access the directory.

Another weird thing is that the logs say C:\Users\usera\SynologyDrive\.Joplin/ and the console C:\Users\usera\SynologyDrive.Joplin/.

I know, makes no sense.
The files are not read-only, that is the first thing I checked.
And it works until it doesn't... keeping and eye on it now, it seems the issue appears when there is an auto-sync while editing a note; which has never been an issue on other machines.

Regarding the path, it is C:\Users\usera\SynologyDrive.Joplin
No idea why the consoles says C:\Users\usera\SynologyDrive.Joplin

I can try to remove the dot from .Joplin and see if for some reason that is messing things up.

Can it be there's some other process accessing these files at the same time and this causes the error?
I don't think it should prevent reading but who knows.

Is use WebDav on my Syno, but have you set sync files and folders with . prefix?
grafik

Or if the sync on demand could be a problem.

It could be that the file is locked temporarily by some process (and that could be specific to this machine) but then it should be unlocked at some point and allow sync... but the error persists no matter what until I reset the sync folder path on Joplin

It sync the folders with the prefix, the issue is that Joplin can't access the file rather than the NAS not uploading the changes. I don't use sync on demand, is a regular two-way mirror folder

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