Error Code VLEG:TDB1:DDP3 - After updating Cryptomator and my vault, cannot open vault

I updated Cryptomator on my Mac (Catalina), afterward it wanted to update/migrate the vault to open it. Now I cannot open my vault. I get the following error message.

The vault is on a Google Drive/File Stream path.

After the update, I noticed Java needed to be updated on the Mac, so I did that.

Any help would be greatly appreciated!

Error Code VLEG:TDB1:DDP3
org.cryptomator.cryptolib.api.MasterkeyLoadingFailedException: I/O error
	at org.cryptomator.cryptolib@2.0.2/org.cryptomator.cryptolib.common.MasterkeyFileAccess.load(MasterkeyFileAccess.java:121)
	at org.cryptomator.desktop@1.6.3/org.cryptomator.ui.keyloading.masterkeyfile.MasterkeyFileLoadingStrategy.loadKey(MasterkeyFileLoadingStrategy.java:71)
	at org.cryptomator.cryptofs@2.1.1/org.cryptomator.cryptofs.CryptoFileSystems.create(CryptoFileSystems.java:52)
	at org.cryptomator.cryptofs@2.1.1/org.cryptomator.cryptofs.CryptoFileSystemProvider.newFileSystem(CryptoFileSystemProvider.java:194)
	at org.cryptomator.cryptofs@2.1.1/org.cryptomator.cryptofs.CryptoFileSystemProvider.newFileSystem(CryptoFileSystemProvider.java:86)
	at java.base/java.nio.file.FileSystems.newFileSystem(Unknown Source)
	at java.base/java.nio.file.FileSystems.newFileSystem(Unknown Source)
	at org.cryptomator.cryptofs@2.1.1/org.cryptomator.cryptofs.CryptoFileSystemProvider.newFileSystem(CryptoFileSystemProvider.java:126)
	at org.cryptomator.desktop@1.6.3/org.cryptomator.common.vaults.Vault.createCryptoFileSystem(Vault.java:129)
	at org.cryptomator.desktop@1.6.3/org.cryptomator.common.vaults.Vault.unlock(Vault.java:148)
	at org.cryptomator.desktop@1.6.3/org.cryptomator.ui.keyloading.KeyLoadingStrategy.use(KeyLoadingStrategy.java:79)
	at org.cryptomator.desktop@1.6.3/org.cryptomator.ui.unlock.UnlockWorkflow.attemptUnlock(UnlockWorkflow.java:71)
	at org.cryptomator.desktop@1.6.3/org.cryptomator.ui.unlock.UnlockWorkflow.call(UnlockWorkflow.java:61)
	at org.cryptomator.desktop@1.6.3/org.cryptomator.ui.unlock.UnlockWorkflow.call(UnlockWorkflow.java:34)
	at javafx.graphics/javafx.concurrent.Task$TaskCallable.call(Task.java:1426)
	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)
Caused by: java.io.IOException: Unreadable JSON
	at org.cryptomator.cryptolib@2.0.2/org.cryptomator.cryptolib.common.MasterkeyFile.read(MasterkeyFile.java:59)
	at org.cryptomator.cryptolib@2.0.2/org.cryptomator.cryptolib.common.MasterkeyFileAccess.load(MasterkeyFileAccess.java:127)
	at org.cryptomator.cryptolib@2.0.2/org.cryptomator.cryptolib.common.MasterkeyFileAccess.load(MasterkeyFileAccess.java:119)
	... 20 more
Caused by: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 9 column 3 path $
	at com.google.gson@2.8.8/com.google.gson.Gson.assertFullConsumption(Gson.java:908)
	at com.google.gson@2.8.8/com.google.gson.Gson.fromJson(Gson.java:871)
	at org.cryptomator.cryptolib@2.0.2/org.cryptomator.cryptolib.common.MasterkeyFile.read(MasterkeyFile.java:52)
	... 22 more
Caused by: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 9 column 3 path $
	at com.google.gson@2.8.8/com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1562)
	at com.google.gson@2.8.8/com.google.gson.stream.JsonReader.checkLenient(JsonReader.java:1403)
	at com.google.gson@2.8.8/com.google.gson.stream.JsonReader.doPeek(JsonReader.java:541)
	at com.google.gson@2.8.8/com.google.gson.stream.JsonReader.peek(JsonReader.java:424)
	at com.google.gson@2.8.8/com.google.gson.Gson.assertFullConsumption(Gson.java:904)
	... 24 more

Did you download the .dmg? In that case you don’t need any Java installation (at least not for Cryptomator).

That said, let’s look at your problem: It looks like your masterkey.cryptomator has been tampered with. You can open it with TextEdit.app and look at its structure. It should look similar to this:

{
  "version": 7,
  "scryptSalt": "3nSQRZi/l7I=",
  "scryptCostParam": 32768,
  "scryptBlockSize": 8,
  "primaryMasterKey": "OFnSaud2/Guh2ExsGH2QBIKr4zCocS4fS0dOdT3NHb3wDPINH0r1ug==",
  "hmacMasterKey": "DDCmsGRBGUSBkQJUkKBHBive9/RQiAMCl04UUS5YdF1s1LC525E5gg==",
  "versionMac": "LYrCjfPOdFGb6KqXZ71o7e5hr9fkoEcCKKCzpnLPK44="
}

Please check the following:

  1. Does it start with { and end on }?
  2. Except for numbers, are all values in between " quotes?
  3. Is there a : between each of the 7 key-value pairs?
  4. Are all seven key-value pairs separated by ,?

If you like, you can post this file, it is intended to be exposed to the public. But you might still want to redact the values for primaryMasterKey and hmacMasterKey if it makes your feel safer.

I did download the .dmg file when I updated.

Thank you for your reply. Here are the contents of masterkey.cryptomator:

{
  "version": 999,
  "scryptSalt": "9pl4Ae3WT1c=",
  "scryptCostParam": 32768,
  "scryptBlockSize": 8,
  "primaryMasterKey": “REDACTED”,
  "hmacMasterKey": “REDACTED”,
  "versionMac": "XOlcz0qP1bW9xgYLwOqAY7Z5VhWKpRr8A19mlI296kY="
} @Ä @Ä @Ä @a8Encyclopedia of Cryptography and Security 2nd ed_ (2770)lg1Scomp$f8Encyclopedia of Cryptography and Security 2nd ed_ (2770)lsvPblobàbplist00⁄a	

CDCF_viewOptionsVersion_showIconPreview_calculateAllSizesWcolumns_scrollPositionYXtextSize_scrollPositionXZsortColumn_useRelativeDatesXiconSize	™!%*/49>‘
WvisibleUwidthYascendingZidentifier	çTname‘
	µ\dateModified‘
[dateCreated	‘
$	YdateAdded‘'
)	aTsize‘,.	s	Tkind‘01Ulabeld		‘
68K	Wversion‘
;
=»^dateLastOpened‘
@B,	Xcomments##@(	#@02DX`r{çò´¥∂∑∏√Ñ⁄‰ÔÛÙ˘()*345?HIKLQZ[]^clrtuvÄÇÉãîïóòß∞±¥µæ«–—G⁄8Encyclopedia of Cryptography and Security 2nd ed_ (2770)lsvpblobébplist00⁄a	

GHGJ_viewOptionsVersion_showIconPreview_calculateAllSizesWcolumns_scrollPositionYXtextSize_scrollPositionXZsortColumn_useRelativeDatesXiconSize	Ÿ!&+05:?DXcommentsTname[dateCreatedTsizeUlabelTkindWversion^dateLastOpened\dateModified‘e
 WvisibleUwidthYascendingUindex,	‘e#
%	ç‘e'(
µ	‘e-
/	a‘e12d		‘e79	s	‘e
<>K	‘e
A
C»a‘e(
	##@(	#@02DX`r{çò´¥∂∑∏À‘ŸÂÍı˝"*0:@ADEGPQTUW`bdefoprsu~ÄÇÉÑçéêëìúùü†¢´¨Æر∫ªº≈ŒœKÿ8Encyclopedia of Cryptography and Security 2nd ed_ (2770)moDDdutc‘òùm8Encyclopedia of Cryptography and Security 2nd ed_ (2770)modDdutc‘òùm8Encyclopedia of Cryptography and Security 2nd ed_ (2770)ph1Scomp@8Encyclopedia of Cryptography and Security 2nd ed_ (2770)vSrnlong EDSDB `Ä(0@Ä @Ä @eUlabelTkindWversion^dateLastOpened\dateModified‘e
 WvisibleUwidthYascendingUindex,	‘e#
%	ç‘e'(
µ	‘e-
/	a‘e12d		‘e79	s	‘e
<>K	‘e
A
C»a‘e(
	##@(	#@02DX`r{çò´¥∂∑∏À‘ŸÂÍı˝"*0:@ADEGPQTUW`bdefoprsu~ÄÇÉÑçéêëìúùü†¢´¨Æر∫ªº≈ŒœKÿ8Encyclopedia of Cryptography and Security 2nd ed_ (2770)moDDdutc‘òùm8Encyclopedia of Cryptography and Security 2nd ed_ (2770)modDdutc‘òùm8Encyclopedia of Cryptography and Security

Well… I have no clue where the additional contents originate, but as said before the file should end after }.

Make a backup of the file, then delete the remaining parts and you should be good to go again.

That did it, thank you!