Cryptomator is stuck and opened in multiple session

Hi all,

Im using Cryptomator in a automated backup process since version 1.3.4 which follows 3 steps.

  1. open cryptomator by starting the .exe and mount the vault (and wait 30 seconds before going ahead so there’s enough time to open the vault)
  2. run file backup into the vault
  3. start onedrive for sync

Worked like a charm.

Since Version 1.4.5/6 I notice a really strange behavior that actually avoids my backup process to start.
When cryptomator is launched, the vault is opened and mounted.
also the logfile says its mounted, no error messages, debug mode on:

[Background Thread 1] DEBUG o.c.f.webdav.mount.WindowsMounter - Mounted \cryptomator-vault@42427\DavWWWRoot\O0XFc5erTQpE\XXX on drive Z:

But the drive is not available or mounted, not visible in the windows explorer.
And then the update check is running, and the app seems stuck in it.
pic1
You can see, the vault is shown open (but its not), and the update check is shown running (but the progress wheel is not turning).
I thought the update check is having problems so deactivated it. But, that does not help. The app is stuck at the same position, but without the update message.

In my case, after 30 seconds the backup program is interrupted with the message that the drive is not available, because the drive is not available. After that message, the drive is available immediately.
Furthermore, If I restart the process, the cryptomator is opened once again in a second instance and tries to open the same vaults. You can also start cryptomator in several sessions now. That was not possible with the older versions, and Im not sure if this is intended, because it just don’t make sense to me to have multiple cryptomator sessions at once.

To be honest, the “is mounted but drive is not available” issue does not appear if I start cryptomator with the desktop icon or directly with the exe, so I’m not sure if my problem is a cryptomator problem at all. I just don’t have a clue whats going on, and the only software that has changed in this process is cryptomator :slight_smile:
UPDATE: actually this happened right now even with dokany (thought it is a WebDAV only thing)

So there is no workaround/solution for me and I have to do my backup-process step by step manually. I’m curious whats going on here and why we are allowed to open cryptomator more than once now.
Maybe someone has an idea.

Thanks in advance!

System: Windows 10 Pro 1809
Cryptomator: 1.46
Dokan Library 1.2.1.1000 x64

Cryptomator being “stuck” after startup is a weird behavior because you’ve mentioned that this does not happen if you start the application manually. How does the automation (a script?) start Cryptomator?

In 1.4.6, we’ve simplified the launcher (incl. its IPC parts). I think this could be a bug that multiple sessions can be opened at once, we’ll check that.

Let’s focus on WebDAV first.

Is it possible that when starting Cryptomator automatically, it is executed with a different user?

If you see the “mounted … on drive …” message in the log for a WebDAV-based drive, net use ran successfully:

What is the output of net use to list all currently mounted drives?

1st of all: thank you for your support.

I can configure in my backup solution (Personal Backup) to run a file before and after the actual backup process. There I entered the path to cryptomator.
1

I only have 1 User on my system, and he is the admin. I opened cryptomator “the normal way” and via the backup tool and checked which user runs the cryptomator process. Both ways the same user.
But there’s an option in Personal Backup that can be checked for the external program to start before the backup. “Force start as admin”. (see picture above). I enabled this just in case I missed an “admin” on my system that is not shown in the windows user-management :slight_smile:
But the same user was running cryptomator and there was no effect on my issue.
Therefore I’m pretty sure to answer your question with “no”

At the moment when cryptomator is not responding anymore (the moment I took the initial picture of the “unlocked” vault), net use does not list any entries
Green Frame: opened cryptomator with desktop shortcut
Red Frame: opened cryptomator via exe call in Personal Backup (stucked)
2
I checked the log file at the point when cryptomator “stucks”.
Last entry:

17:53:03.207 [Background Thread 1] DEBUG o.c.f.webdav.mount.WindowsMounter - Mounted \\cryptomator-vault@42427\DavWWWRoot\xxxxxxxxxxx\yyy on drive Z:

(that should be line 45 WindowsMounter.java)

To be honest, I’m out of ideas what makes a difference between launching Cryptomator manually vs. via some other program or script. Neither can I explain why the UI is stuck, nor why net use exits successfully but doesn’t mount anything. :disappointed:

Mhm. Ok. I will keep an eye on that and will report if there’s any change during the next updates.
(And i will try to find out more about how personal backup ist launching external programs. Maybe there’s more than just the exe call.)

Thank you for your time on this!

Today I wanted to try something else.
Why not writing a batch that starts cryptomator.exe and waits for a couple of seconds, and then let Personal Backup call the batch instead of the cryptomator.exe directly.

Said and done.
I wrote this script (all comments just too see each step when executed)

:@echo off
"C:\Program Files\Cryptomator\Cryptomator.exe"
echo vor timeout
timeout /T 15 /nobreak
echo nach timeout
exit

The result was:

  1. cryptomator showed up nearly immediately and the volume was available also in less than 2 secondes.
  2. the batch get stuck. Yes, the batch did not not proceed after the cryptomator call. The line 3 was not printed, the window remained open until I closed it manually

So I just commented out the cryptomator call, just to see if my batch is wrong (its been a while since i have written batches and I wanted to be sure.)

:@echo off
:"C:\Program Files\Cryptomator\Cryptomator.exe"
echo vor timeout
timeout /T 15 /nobreak
echo nach timeout
exit

Result: The batch proceeded completely, means

  1. printed line 3
  2. waited 15 seconds
  3. printed line 5
  4. closed itself.

I am really confused about this behavior when calling cryptomator.exe via a script or external program.
If anyone has an idea where I can dig also, Im happy for every hint.
I will continue my investigation and report.

I’m gonna go insane… :frowning:

When I let personal backup call the batch, the behavior is like it was when calling the cryptomator.exe.
(batch-window shows up), Cryptomator shows up, checking for update message appears, then cryptomator get stuck and the volume is not available. Just like described in my post #1

This is so weird to me.
Glad to have a “one-click”- workaround, but it would be better to have a “no click” solution in my process :slight_smile:

This is actually a desirable behaviour that I failed to achieve in other places. :smiley: During debugging sessions I like to start Cryptomator via command line to see anything written to stdout, but on Windows it usually just triggers the launcher and returns immediately (other than on Mac/Linux).

So apparently the launcher is able to distinguish if it is in a script environment or started manually. But neither do we know how to influence it nor how to make use of this capability. :thinking:

Fixed in V 1.4.7

2 Likes