Add existing vault dialog does "nothing"

Let me just write my journey. I had several vaults in 1.4.17 using Dropbox as the sync service. Some of the vaults were in my Dropbox folder in my computer, but some were not. I was using Dropbox’s selective sync to download the vaults that were not saved locally only when I needed them. Cryptomator would still display all the vaults in the main window, but when I selected those vaults, Cryptomator would display a warning asking whether I had moved them. I was fine with that behaviour, as I knew what was going on. Then I updated to 1.5. I converted the vaults that were local without problem and started to sync the vaults that were not local using selective sync in Dropbox. 1.5 would still display the vaults that were not local since I supposed it “inherited” that from 1.4. I disabled some options in 1.5, like automatic starting when the computer restarts. Then I closed 1.5. When the vaults finished syncing, I tried opening again 1.5 to convert the cloud vaults to format 7. That’s when 1.5 couldn’t open. However, when I deleted the settings.json I could use 1.5 again. However, I had to add all the vaults again. So the vaults that were already converted to format 7 were added, but the cloud vaults that were not converted could not be added. That’s my last post, that 1.5 just shows me back the window for adding the vaults (that were not converted) when I try to add them. I suppose a warning stating that the vaults are in the old format would be useful here.

I downloaded 1.4.17, and tried adding the cloud vaults (that were now saved locally) but now I get a warning saying that the vaults are in a newer format. So I’m lost now. It’s not a big deal, since I can roll back my Dropbox to the state it had before all this happened and use 1.5 to convert everything again.

You asked about VM, security software and location. I don’t use a VM to run macOS. I have some security software from https://www.objective-see.com. Presumably their software ransomwhere? could be the one causing the problem? But with 1.4.17 I never had any issues. I also have installed ReiKey, DHS, WhatsYourSign, Do Not Disturb, TaskExplorer, Netiquette, KextViewr and KnockKnock from the same website.
Finally, about the special locations, like I mentioned before, I had some vaults not saved locally, that I would only sync using Dropbox’s selective sync when I needed to use them.

I just wanna say that this is not a complaint and you are really filling a void in the security market out there. I really like you product and will continue using it. Please let me know if I you need more information.

Thanks!

1.4.x not being able to deal with newer vault formats is expected behaviour. There should be no need to revert and upgrade again. If migration was successful, there is nothing a second migration would do differently.

Now back to the original problems:

1. Cryptomator not starting until you deleted the settings.json.

Absolutely no idea what happened here, this is the first time I hear about this. I suspect there were other factors affecting the launch, but we will probably never know.

Since you resolved this yourself, I don’t think we should investigate any further, unless anyone else can reproduce it.

2. Cryptomator stuck in the “add existing vault” dialog.

Just to make sure, we’re talking about the same dialog:

After choosing a file from the “macOS file chooser”:

You’re back at this dialog:

And while for your “local” vaults the dialog just closed and your vaults were added to your vault list, this dialog just does “nothing” for your fourth vault. Did I understand this correctly?

That is correct. I am back at the dialog of the last image.

And now you can reattempt opening it or cancel it? Or is the UI in any way frozen or otherwise impaired?

It’s not frozen. I can try to open it again and I keep getting the same result.

It seems to me that the masterkey file is somehow… weird. Could you please do the following:

  1. Create a folder (let’s call it “Test”) somewhere outside of Dropbox.
  2. Create a folder “d” inside “Test”.
  3. Copy the masterkey file (that doesn’t work) to the “Test” folder.

Now try to add this vault. In my case, I was able to add the vault and even unlock it (of course it’s empty then). But even if that doesn’t work, could you please open the masterkey file with a text editor and check its contents? It should look something like this:

{
  "scryptSalt": "...",
  "scryptCostParam": 32768,
  "scryptBlockSize": 8,
  "primaryMasterKey": "...",
  "hmacMasterKey": "...",
  "versionMac": "...",
  "version": 7
}

Or in your case, "version": 6 since it hasn’t been migrated yet.

That works. It’s telling me about upgrading the vault. Is it safe for me to post that file? I suppose I can change the password, so here it is:

{
  "scryptSalt": "Xxxxx+=vvbbb",
  "scryptCostParam": 32768,
  "scryptBlockSize": 8,
  "primaryMasterKey": "[54 Didgets]==",
  "hmacMasterKey": "[54 didgets]==",
  "versionMac": "[43 Didgets]=",
  "version": 6
}

PS: sorry for the late reply, I was prevented from posting so many replies in my first day.

I don’t have a good feeling of posting this in cleartext here, so I updated your post. Devs can see the original if my assumption that this information is not critical for the analysis is wrong.

3 Likes

It is “secure” (that’s why the masterkey file can be put in a public cloud, see: Why is the masterkey stored in the cloud?

However(!), I agree that it’s unnecessary to post the actual contents here because they don’t seem to add any value to finding the actual issue.

I still don’t understand why the masterkey file can be selected if it’s put in another location. Some vaults in Dropbox work, some don’t. Is there anything special about the vault’s name? Or are there special characters in the path leading up to the vault? :thinking:

1 Like

Nothing special about the location. In fact, one of the vaults that I successfully migrated had special characters in its path, not this one though. What do you mean by “some vaults in Dropbox work, some don’t”? is that a know issue or were you just restating the particularities of my problem?

I was just restating the particularities of your problem and trying to guess what might cause them.

@amrods Can you please attempt the following:

  1. In your /Applications folder, right click on Cryptomator.app and choose “show package contents”
  2. Within these package contents, navigate to Contents/Java
  3. Replace the file ui-1.5.0.jar with this one
  4. Start Cryptomator, enable debug logging, reattempt adding the vault

You can now deactivate debug logging again. Please attach the log contents (redact any paths, if you like).

I already upgraded tha data into version 7 but the issue is adding two vaults ( one Local data -> show OK ) and one mapped data via SMB3 Windows 10 ( drive mapped data via SMB3 share -> no show)

I am not able to open the shared data ( no show) if data is on shared drive.
This worked since i use Cryptomator ( started in 2017 )
Two vaults open works if data is on local drive or onedrive

My issue was a windows smb3 encrypted remote share.

This is what that shows (BTW that was after replacing ui-1.5.0.jar inside Cryptomator.app).

18:45:14.154 [main] DEBUG org.cryptomator.common.Environment - java.library.path: /Applications/Cryptomator.app/Contents/Java:/Applications/Cryptomator.app/Contents/MacOS:/usr/local/lib
18:45:14.157 [main] DEBUG org.cryptomator.common.Environment - user.language: en
18:45:14.157 [main] DEBUG org.cryptomator.common.Environment - user.region: null
18:45:14.158 [main] DEBUG org.cryptomator.common.Environment - logback.configurationFile: null
18:45:14.158 [main] DEBUG org.cryptomator.common.Environment - cryptomator.settingsPath: ~/Library/Application Support/Cryptomator/settings.json
18:45:14.158 [main] DEBUG org.cryptomator.common.Environment - cryptomator.ipcPortPath: ~/Library/Application Support/Cryptomator/ipcPort.bin
18:45:14.158 [main] DEBUG org.cryptomator.common.Environment - cryptomator.keychainPath: null
18:45:14.158 [main] DEBUG org.cryptomator.common.Environment - cryptomator.logDir: ~/Library/Logs/Cryptomator
18:45:14.158 [main] DEBUG org.cryptomator.common.Environment - cryptomator.mountPointsDir: /Volumes
18:45:14.158 [main] DEBUG org.cryptomator.common.Environment - cryptomator.minPwLength: null
18:45:14.158 [main] DEBUG org.cryptomator.common.Environment - cryptomator.buildNumber: dmg-2139.102
18:45:14.186 [main] DEBUG org.cryptomator.common.ShutdownHook - Registered shutdown hook.
18:45:14.248 [main] DEBUG org.cryptomator.common.settings.SettingsProvider - Attempting to load settings from /Users/xxx/Library/Application Support/Cryptomator/settings.json
18:45:14.287 [main] INFO org.cryptomator.common.settings.SettingsProvider - Settings loaded from /Users/xxx/Library/Application Support/Cryptomator/settings.json
Exception in thread "main" java.lang.IllegalStateException: Not a JSON Object: "\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
	at com.google.gson.JsonElement.getAsJsonObject(JsonElement.java:91)
	at org.cryptomator.cryptolib.api.KeyFile.parse(KeyFile.java:81)
	at org.cryptomator.cryptofs.migration.Migrators.needsMigration(Migrators.java:81)
	at org.cryptomator.common.vaults.VaultListManager.determineVaultState(VaultListManager.java:90)
	at org.cryptomator.common.vaults.VaultListManager.create(VaultListManager.java:81)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
	at java.base/java.util.AbstractList$RandomAccessSpliterator.forEachRemaining(AbstractList.java:720)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
	at org.cryptomator.common.vaults.VaultListManager.addAll(VaultListManager.java:66)
	at org.cryptomator.common.vaults.VaultListManager.<init>(VaultListManager.java:41)
	at org.cryptomator.common.vaults.VaultListManager_Factory.newInstance(VaultListManager_Factory.java:40)
	at org.cryptomator.common.vaults.VaultListManager_Factory.get(VaultListManager_Factory.java:29)
	at org.cryptomator.common.vaults.VaultListManager_Factory.get(VaultListManager_Factory.java:8)
	at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
	at org.cryptomator.common.CommonsModule_ProvideVaultListFactory.get(CommonsModule_ProvideVaultListFactory.java:29)
	at org.cryptomator.common.CommonsModule_ProvideVaultListFactory.get(CommonsModule_ProvideVaultListFactory.java:11)
	at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
	at org.cryptomator.ui.launcher.UiLauncher_Factory.get(UiLauncher_Factory.java:50)
	at org.cryptomator.ui.launcher.UiLauncher_Factory.get(UiLauncher_Factory.java:13)
	at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
	at org.cryptomator.launcher.Cryptomator_Factory.get(Cryptomator_Factory.java:47)
	at org.cryptomator.launcher.Cryptomator_Factory.get(Cryptomator_Factory.java:12)
	at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
	at org.cryptomator.launcher.DaggerCryptomatorComponent.application(DaggerCryptomatorComponent.java:523)
	at org.cryptomator.launcher.Cryptomator.main(Cryptomator.java:48)
18:45:16.375 [ShutdownTasks] DEBUG org.cryptomator.common.ShutdownHook - Running graceful shutdown tasks...
2020-04-20 18:45:16.736 Cryptomator[23828:1247150] Cryptomator:Failed to launch JVM

This confirms what @tobihagemann already stated:

From Cryptomator’s point of view, the file only contains garbage (NUL bytes). Wondering why. Permissions? Fancy storage media?

yeah, that seems to be the problem. i noticed that they are the wrong size. its like dropbox downloads the file structure, but the files are “empty”

Can you delete and restore it from Dropbox?

Ok, so it seemed to be a problem with Dropbox syncing. I was chatting with their support team, I had to deactivate Dropbox system extension in my settings page (online) and reinstall the desktop application. That seems to be working, as Dropbox is now properly downloading the vaults that I kept online.

Sorry for all the trouble, it was just unfortunate that this issue flared up around the time I upgraded to 1.5. However, if I may suggest something: perhaps Cryptomator should display a warning when it cannot read the contents of masterkey.cryptomator.

I couldn’t agree more! :smiley:

I’m having a very similar process. On the latest cryptomator app (1.5.x), I open the app and choose the option to add a vault. However, the same screen continues to show for a few seconds and eventually the Cryptomator app crashes. I’m on windows 10.