Cannot remount filesystem

I get unexpected error ‘FileSystemAlreadyExistsException’ when I unmount and mount a filesystem.
Environment: Windows 10 home, Cryptomator 1.5.3, Dokany 1.3.1.1000 (x64)
I do as follows:

Uninstall Cryptomator, to clear any residual programdata.
Delete old vault directories.
Delete Cryptomator program- and programdata directories.
Reinstall Cryptomator.
Create new vault ‘crypt1’ in customized (OneDrive) location.
Set mount options, custom path ‘crypt1data’ in same OneDrive directory as the vault directory.
Unmount vault
Mount vault
Unlock vault result in error text:

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:302)
at org.cryptomator.cryptofs.CryptoFileSystemProvider.newFileSystem(CryptoFileSystemProvider.java:94)
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:135)
at org.cryptomator.common.vaults.Vault.unlockCryptoFileSystem(Vault.java:120)
at org.cryptomator.common.vaults.Vault.lambda$getCryptoFileSystem$0(Vault.java:98)
at org.cryptomator.common.LazyInitializer.lambda$invokeFactoryIfNull$1(LazyInitializer.java:62)
at java.base/java.util.concurrent.atomic.AtomicReference.updateAndGet(Unknown Source)
at org.cryptomator.common.LazyInitializer.initializeLazily(LazyInitializer.java:49)
at org.cryptomator.common.vaults.Vault.getCryptoFileSystem(Vault.java:98)
at org.cryptomator.common.vaults.Vault.unlock(Vault.java:127)
at org.cryptomator.ui.common.VaultService$UnlockVaultTask.call(VaultService.java:299)
at org.cryptomator.ui.common.VaultService$UnlockVaultTask.call(VaultService.java:278)
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.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 could rename the vault- and custom path directories and then mount the vault.

Seems like the vault drive or folder is not disconnected when you lock your vault. Then when you unlock the vault it cannot assignbthe Mount Point because it still exists.
Can you please confirm that you still see the drive or the folder from the vault in your file explorer when you have your vault locked?

Right now the vault is locked (after pc restart) and I can see both the directories - the vault and the mount point - in explorer. The mount point is shown as a short-cut.
For some reason I cannot unlock it now, I get message ‘Not an empty directory’, but I also cannot open the directory in explorer here I get message ‘folder is not accessable’ or something like that.

The message „not an empty directory indicates, that your are trying to mount the vault to a directory, that already contain files or folders.
Nevertheless, if you close a vault, you shouldn’t see the vault directory anymore (that’s why the message said it’s not available).

Please do the following:

  1. check the folder that you have configured as mountpoint if it’s empty. If it’s not, please choose an other folder (that is empty) or check if you want to delete the files I’m your mount point folder so that it will be empty.
  2. you can also switch your configured filesystem adapter from dokany to WebDAV and check if the behaviour still exists.
  3. please provide the latest logfile. Maybe there’s a message that leads to the cause of this.

There exists a similar issue on our bug tracker, see

But this only happens when the system is shut down with an opened vault…

Logs are gone, sorry.
I tried Webdav using a drive letter and that seems to work ok. Webdav and switching to a custom path however did not work - ‘custom path’ in the dialog is correct, but ‘Reveal drive’ shows drive Z:
I think I will wait for the fix to that other bug before trying Dokany again.

That is yet another bug to be fixed :sweat_smile:

WebDAV does not support the mounting into directories, see https://github.com/cryptomator/cryptomator/issues/1082.

I’d like to mention, that using WebDAV under Windows has some drawbacks. The Windows WebDAV implementation supports only files of size <4GB. Also, if your vault has long paths inside, the windows explorer won’t be able to display these locations, because it only supports paths not longer than 260 characters.

I can live with those restrictions for the time being. Re WebDAV and mounting into directories, I thought as much, would be good if the dialog did not accept it either.