Vault does not lock gracefully though no activity, so I removed and re-added but with this error

I made a vault under the OneDrive folder so that it would sync. After I’m done using the files in the vault I make sure all the files are stored on my computer (OneDrive “always keep on this device”) and then go to close vault but get the error “Graceful lock failed”, so I cancel and wait because I don’t want to force it. I check that no processes are running that would interfere with closing the vault then try again and receive the same message. So instead, I select OneDrive “free up space” so that all files will be in the cloud. Afterwards try to close the vault and get the same message. So I thought I was smart so I forgot the vault and re-added it, and now get a different error message when unlocking it (shown below). Should I just restart the PC? Is that the same as forcefully closing the vault or did forgetting the vault forcefully close it? One permanent solution I have is to stay away from automatic sync from now on e.g. OneDrive. Thanks.
Windows: 10 Home
Cryptomater: 1.5.13

java.nio.file.FileSystemAlreadyExistsException
	at org.cryptomator.cryptofs.CryptoFileSystems.lambda$create$0(CryptoFileSystems.java:49)
	at java.base/java.util.concurrent.ConcurrentHashMap.compute(Unknown Source)
	at org.cryptomator.cryptofs.CryptoFileSystems.create(CryptoFileSystems.java:40)
	at org.cryptomator.cryptofs.CryptoFileSystemProvider.newFileSystem(CryptoFileSystemProvider.java:301)
	at org.cryptomator.cryptofs.CryptoFileSystemProvider.newFileSystem(CryptoFileSystemProvider.java:93)
	at java.base/java.nio.file.FileSystems.newFileSystem(Unknown Source)
	at java.base/java.nio.file.FileSystems.newFileSystem(Unknown Source)
	at org.cryptomator.cryptofs.CryptoFileSystemProvider.newFileSystem(CryptoFileSystemProvider.java:134)
	at org.cryptomator.common.vaults.Vault.createCryptoFileSystem(Vault.java:121)
	at org.cryptomator.common.vaults.Vault.unlock(Vault.java:138)
	at org.cryptomator.ui.unlock.UnlockWorkflow.attemptUnlock(UnlockWorkflow.java:107)
	at org.cryptomator.ui.unlock.UnlockWorkflow.call(UnlockWorkflow.java:90)
	at org.cryptomator.ui.unlock.UnlockWorkflow.call(UnlockWorkflow.java:44)
	at javafx.concurrent.Task$TaskCallable.call(Task.java:1425)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)

I use Cryptomator with Google Drive via the Backup & Sync app. Google’s taskbar icon shows when the app is syncing changes between what’s on my computer and Drive. I’ve come across instances where neither the Cryptomator app nor Google Backup & Sync show any read or write activity and yet an attempt to close the vault still fails.

In these instances I just assume that it’s due to some component of Windows itself (probably Explorer) keeping a file’s state as open or locked that’s causing the graceful close to fail. In these instances, I just double-check to make sure that there is no read/write activity going on in Cryptomator or Backup & Sync and then just do a force close.

I haven’t encountered any problems doing this so far. But, I’m hopeful that the Cryptomator folks will also comment on what may be going on in these situations and what we can do when it does happen…

See here also:

This is an UI bug we are currently fixing.:sweat_smile: Actually you should not be able to remove a vault when it is not locked. The error afterwards is a result of it and can be fixed by restarting the application. (See also ticket #1478 on our issue tracker.)


Cryptomator keeps track of references to resources inside the vault (i.e. if a process has “a foot in the door”). It does not know the reason nor does it make any assumption about if this reference is used in the next second to read/write stuff.
If you are sure that there is nothing wild going on in you vault, you can safely force lock the vault. See the message as a reminder to double check if every important action is finished. Maybe the dialogue can be rephrased to be less frighting, but we wanted to ensure the user does not do anything hasty and e.g. abort a write operation.

2 Likes

If you are sure that there is nothing wild going on in you vault, you can safely force lock the vault. See the message as a reminder to double check if every important action is finished. Maybe the dialogue can be rephrased to be less frighting, but we wanted to ensure the user does not do anything hasty and e.g. abort a write operation.

Thanks for the response. I figured it was similar to when some process has a file handle open for a file on my external USB drives occasionally. I usually just restart my PC when it involves my USB drive but if I’m in a rush, I’ll just pull it out. :grin: