Have to clear the cache at every start of the app to get access to WebDAV vault using mailbox.org

Hi there,

I ran into a problem with Android 11 on a Pixel 4a - didn’t have that behavior on Android 10 but also changed devices so can’t be sure if its a general Android 11 problem or just on my device …

Every time I open the app the unlocking of a WebDAV vault (mailbox.org) fails - a Dropbox vault unlocks as expected though. After clearing the app cache the vault can be unlocked and works as expected till its locked, then, to open the vault again, the cache has to be cleared again before the vault can be unlocked - doesn’t matter if the app has been closed or just the vault has been locked …

Any ideas?

Many thanks,

Martin

Can you please enable debug mode, reproduce the error and send us the log file or take a look into it.
A short time ago a user also had problems with mailbox.org and the cache. The server replied with a 412 HTTP status code. Please check the log if you find something like this:

PrepareUnlockUseCase	started 48878533
OkHttp	--> GET https://dav.mailbox.org/servlet/webdav.infostore/Userstore/xxx/mailbox/masterkey.cryptomator http/1.1 (unknown length)
OkHttp	--> END GET
OkHttp	<-- 412 Precondition Failed https://dav.mailbox.org/servlet/webdav.infostore/Userstore/xxx/mailbox/masterkey.cryptomator (98ms)
...
OkHttp	<-- END HTTP
PrepareUnlockUseCase	failed 48878533
ExceptionHandler	Unexpected error
org.cryptomator.domain.exception.FatalBackendException: Response code isn't between 200 and 300: 412
	at org.cryptomator.data.cloud.webdav.network.WebDavClient.void checkExecutionSucceeded(int)(:1)
	at org.cryptomator.data.cloud.webdav.network.WebDavClient.java.io.InputStream readFile(java.lang.String)(:5)
	at org.cryptomator.data.cloud.webdav.network.ConnectionHandlerHandlerImpl.java.io.InputStream readFile(java.lang.String)(:1)
	at org.cryptomator.data.cloud.webdav.WebDavImpl.void read(org.cryptomator.domain.CloudFile,java.io.OutputStream,org.cryptomator.domain.usecases.ProgressAware)(:34)
	...
	at org.cryptomator.domain.usecases.vault.PrepareUnlockUseCase$Launcher$2.org.cryptomator.domain.usecases.vault.UnlockToken call()(:4)
	at org.cryptomator.domain.usecases.vault.PrepareUnlockUseCase$Launcher$2.java.lang.Object call()(:1)
	at io.reactivex.internal.operators.flowable.FlowableFromCallable.void subscribeActual(org.reactivestreams.Subscriber)(:3)

If this is the case as a workaround you can disable in the Cryptomator settings the caching mechanism Settings — Cryptomator 1.7.0 documentation

1 Like

Blockquote Can you please enable debug mode, reproduce the error and send us the log file or take a look into it.
A short time ago a user also had problems with mailbox.org and the cache. The server replied with a 412 HTTP status code. Please check the log if you find something like this:

Yes that is the exact error in the log - works with disabled cache, thanks for the suggestion - so it seems related to mailbox.org only - it didn’t happen with my old device on Android 10 but might also have been introduced with a recent cryptomator update - I’m on 1.5.11-beta2 btw

Just checked again, the other user had Android 10 running. I don’t think anything has changed in this direction in the Cryptomator app, but I’ll take a closer look and will report back.

Edit: The app behaves identically with mailbox.org in Cryptomator version 1.5.10

Blockquote Just checked again, the other user had Android 10 running. I don’t think anything has changed in this direction in the Cryptomator app, but I’ll take a closer look and will report back.
Edit: The app behaves identically with mailbox.org in Cryptomator version 1.5.10

OK - thanks for looking into it - maybe mailbox.org changed something on the server side and it was just a coincidence - so i just leave cache disabled for now …

Have looked at this in detail because I was a bit confused by the status code 412. Here is the result: https://github.com/cryptomator/android/issues/259

Would be great if you could forward this to mailbox.org.

many thanks, opened a ticket with the issue on mailbox.org help desk - will report back

mailbox.org wasn’t really helpful in this case …

Blockquote Der Zugriff per webdav funktioniert grundsätzlich wie in folgenden Artikeln beschrieben und mit vielen anderen Anwendungen.

https://kb.mailbox.org/display/MBOKB/WebDav+unter+Windows

https://kb.mailbox.org/display/MBOKB/WebDav+unter+Linux

Ich empfehle Ihnen sich an das Supportteam des Herstellers Ihrer Anwendung zu wenden oder eine dafür supportfähige Community um Hilfe zu bitten. Oder Sie besuchen unser Userforum. Dort sind viele engagierte User unterwegs, die ihr breites Wissen gerne teilen.
Vielleicht wird Ihre Frage dort schon beantwortet oder Sie stellen sie dort zur Diskussion.

Bitte haben Sie Verständnis dafür, dass wir keinen Support für Drittanbieter Software übernehmen können, da wir die technischen Spezifikationen nicht kennen oder verändern können.

Bei Fragen zu unserem Produkt helfen wir Ihnen natürlich gerne weiter.

Viele Grüße

mailbox.org Support-Team

1 Like

This is very sad :disappointed:.

The behavior is clearly handled in rfc7234#section-4.3.2 and rfc7232#section-6. I provided them a really easy command to reproduce it and they call curl a third party tool which I only used for illustrating the headers :thinking:.

They probably didn’t quite understand the problem. I’ll write to them but thank you again for contacting their support!

Just created a ticket in the help desk, maybe this helps that they understand the problem:

Caching using WebDAV doesn’t work with mailbox.org because you’re not responding the correct HTTP status codes according to the RFCs https://tools.ietf.org/html/rfc7234#section-4.3.2 and https://tools.ietf.org/html/rfc7232#section-6. Here you can also find a short summery: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-None-Match

The response from the server when an “If-None-Match” header is set in the GET request MUST be 200 if the content has been changed and 302 if unmodified when the ETag is provided. Your server return 412 instead of 302. See the following snippets to reproduce the problem:

curl -I -X GET "https://dav.mailbox.org/servlet/webdav.infostore/Userstore/xxx/asdf/masterkey.cryptomator" -u xxx@mailbox.org
Enter host password for user 'xxx@mailbox.org':
HTTP/1.1 200 OK
Date: Tue, 02 Feb 2021 14:09:11 GMT
Server: Openexchange WebDAV
X-Robots-Tag: none
Content-Disposition: attachment
ETag: 8035586-1-1-1612264501136
Accept-Ranges: bytes
Last-Modified: Tue, 02 Feb 2021 11:15:01 GMT
Content-Type: application/octet-stream
Content-Length: 327
Strict-Transport-Security: max-age=15768000
curl -I -H 'If-None-Match: "8035586-1-1-1612264501136"' -X GET "https://dav.mailbox.org/servlet/webdav.infostore/Userstore/xxx/asdf/masterkey.cryptomator" -u xxx@mailbox.org
Enter host password for user 'xxx@mailbox.org':
HTTP/1.1 412 Precondition Failed
Date: Tue, 02 Feb 2021 14:10:44 GMT
Server: Openexchange WebDAV
X-Robots-Tag: none
Content-Length: 0
Strict-Transport-Security: max-age=15768000

but the file didn’t even changed, see

curl -I -X GET "https://dav.mailbox.org/servlet/webdav.infostore/Userstore/xxx/asdf/masterkey.cryptomator" -u xxx@mailbox.org
Enter host password for user 'xxx@mailbox.org':
HTTP/1.1 200 OK
Date: Tue, 02 Feb 2021 14:35:20 GMT
Server: Openexchange WebDAV
X-Robots-Tag: none
Content-Disposition: attachment
ETag: 8035586-1-1-1612264501136
Accept-Ranges: bytes
Last-Modified: Tue, 02 Feb 2021 11:15:01 GMT
Content-Type: application/octet-stream
Content-Length: 327
Strict-Transport-Security: max-age=15768000

and

curl -I -H 'If-Match: "8035586-1-1-1612264501136"' -X GET "https://dav.mailbox.org/servlet/webdav.infostore/Userstore/xxx/asdf/masterkey.cryptomator" -u xxx@mailbox.org
Enter host password for user 'xxx@mailbox.org':
HTTP/1.1 200 OK
Date: Tue, 02 Feb 2021 14:39:13 GMT
Server: Openexchange WebDAV
X-Robots-Tag: none
Content-Disposition: attachment
ETag: 8035586-1-1-1612264501136
Accept-Ranges: bytes
Last-Modified: Tue, 02 Feb 2021 11:15:01 GMT
Content-Type: application/octet-stream
Content-Length: 327
Strict-Transport-Security: max-age=15768000

Please use as defined in the RFC, 200 if the content has been changed and 302 if unmodified when the “If-None-Match” header is set and the valid ETag is provided.

If you need further information, please let me know.

3 Likes

I also chased them again, the answer though has been somehow unsatisfying …

Blockquote Guten Tag,
vielen Dank für Ihre Nachricht.
Wir stellen die webdav Schnittstelle zur Verfügung. Es gibt kein anderes Webdav für Android. Wenn Sie selbst feststellen, dass es auf 3 Plattformen mit der genannten App klappt aber auf einer 4. nicht, ist es unverständlich dass der Support dort meint es läge an mailbox.org.
Ich kann aber gut verstehen, dass es ärgerlich ist als Anwender von 2 Seiten hin und her geschickt zu werden. Darum nochmal meine Antwort hier. Es ist nicht Ziel Kunden “abzuwimmeln”
Viele Grüße
mailbox.org Support-Team

I’m sorry to hear that. I hope that they will investigate when they read my support ticket, because I tried to argue only with RFCs but that remains to be seen. In any case, not a nice experience, sorry for that.

Did you get a reply from them?

The credit on my test account has expired, so I don’t know exactly, the account was deleted in any case hahaha, went super stupid, I’ll create an account again tomorrow and report the bug again :sweat_smile:

I have just received a good answer from mailbox.org:

Thank you very much for this report and the detailed information. We will forward this to Open-Xchange, the software developer and will try to get this fixed

Unfortunately I cannot tell you if and when your suggestion will be accepted.

@elastic thanks again for reporting, hopefully they fix it soon.

That’s good news, many thanks for looking into it

I just want to say “thank you” to the community. I have the same problem with WebDAV / mailbox.org / Cryptomator / Android as described in this thread.

The workaround to disable the cache in Cryptomator works nicely -> Thanks!

I am also really thankful that you communicated the issue transparently to mailbox.org. Lets hope that Open-Xchange will fix it.

1 Like

In the meantime Open-Xchange may have fixed the issue for mailbox.org.

I re-activated the Cache Option in the Android App and so far had no issues. Can @elastic confirm?

2 Likes

never tried to enable it again - just tested it now an can confirm it seems to work - many thanks for posting it

2 Likes