Linux Ubuntu Cannot Quit Cryptomator "lock failed"

I’m using Cryptomator 1.6.10 installed from dl.flathub.org running in Ubuntu 20.04.4 LTS inside a VirtualBox VM in Windows 10. I’m using this with Obsidian 0.14.6 and no other software should be accessing the mounted folder. Every few hours (approx.) I get an error in Obsidian saying that it cannot save to the file system, I quit Obsidian and I cannot quit Cryptomator. To stop Cryptomator I need to use the System Monitor to kill the Cryptomator processes (there are two visible). I have been using Cryptomator without issue on OSX so I guess there is something about Ubuntu and Cryptomator that is broken.

The Cryptomator log reports:

15:49:07.380 [JavaFX Application Thread] ERROR o.cryptomator.ui.common.VaultService - Failed to lock NextcloudCrypto
org.cryptomator.common.vaults.Volume$VolumeException: org.cryptomator.frontend.fuse.mount.FuseMountException: Unmount refused: There are open files or pending operations.
	at org.cryptomator.desktop@1.6.10/org.cryptomator.common.vaults.FuseVolume.unmount(FuseVolume.java:109)
	at org.cryptomator.desktop@1.6.10/org.cryptomator.common.vaults.Vault.lock(Vault.java:176)
	at org.cryptomator.desktop@1.6.10/org.cryptomator.ui.common.VaultService$LockVaultTask.call(VaultService.java:183)
	at org.cryptomator.desktop@1.6.10/org.cryptomator.ui.common.VaultService$LockVaultTask.call(VaultService.java:165)
	at javafx.graphics@18.0.1/javafx.concurrent.Task$TaskCallable.call(Task.java:1426)
	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)

It seems there should be an option to quit Cryptomator and force the unmount rather than having the user kill the process with System Monitor. It would be even better if the file system were stable.

What might be causing the mount to no longer work (can’t write)? What can I do to collect more information about the problem?

I could get some information about what is accessing the filesystem when this happens. After closing Obsidian I see:

mark@mark-VirtualBox:~$ fuser -vm /home/mark/.local/share/Cryptomator/mnt/NextcloudCrypto
                     USER        PID ACCESS COMMAND
/home/mark/.local/share/Cryptomator/mnt/NextcloudCrypto:
                     root     kernel mount /home/mark/.local/share/Cryptomator/mnt/NextcloudCrypto
                     mark       2635 f.... xdg-desktop-por

I do not know what xdg-desktop-por does

xdg-desktop-portal/focal,now 1.6.0-1 amd64 [installed,automatic]
  desktop integration portal for Flatpak and Snap

But I have removed it with:

sudo apt-get remove --auto-remove xdg-desktop-portal

This did not improve the situation, the filesystem failed again without kdg-desktop-por :frowning:

I tried to umount manually and get ‘target is busy’