Http 301 error when opening vault

Hello,
since today evening after installing the new update from the App Store I get a http 301 error when I open one of my vaults. Do you maybe know why? If know how I can fix this it would be really great :slight_smile: Thanks for the help.

Thanks,
Timo

HTTP 301 means that it’s a redirection and shouldn’t be handled as an error. I’ll have a look at it and we’re going to fix this.

In the meantime, you should be able to “fix” it by using the “new” URL so that it doesn’t have to redirect anymore. Since I don’t know what kind of WebDAV server you’re using, I’m not certain where the given URL is redirecting to. But maybe this info helps you?

Hello,
thank you for your reply :slight_smile: This is exactly my problem, I have no idea why my webdav server is using a redirect. Is there a way to get a iOS log file to figure out what exactly is being redirected?

Settings → privacy → diagnostics and usage → diagnostic and usage data → find a record that starts with cryptomator

What storage provider do you use, and which WebDAV url do you use?

Just wanted to mention that you’ll only find crash logs there. Cryptomator for iOS doesn’t actually have log files like the other applications.

Other than that, I’ve been experimenting a little with redirects and I couldn’t find any issues yet. The new version of Cryptomator didn’t come with major changes in the WebDAV implementation.

@Timo: Are you using a Mac or Linux? You could e.g. call the following in Terminal

curl -I example.com

to check the redirect location. Of course, use your WebDAV URL instead of example.com. :wink:

Hello,
I just checked and there are no Cryptomator log files :frowning: I use a StorageBox from Hetzner.de.

Yes I am using macOS. When I use the curl … command I get the following output (with https in the url):

HTTP/1.1 401 Unauthorized
Date: Sun, 22 Apr 2018 21:04:17 GMT
Server: Apache
WWW-Authenticate: Basic realm="WebDAV Restricted"
Content-Type: text/html; charset=iso-8859-1

I only get the moved permanently message when not using https in the curl … command.

HTTP/1.1 301 Moved Permanently
Date: Sun, 22 Apr 2018 21:09:43 GMT
Server: Apache
Location: https://xxxx.your-storagebox.de
Content-Type: text/html; charset=iso-8859-1

But I am using the https address within Cryptomator and I have 5 other vaults using the same webdav server and non of these vaults gives me a 301 warning when opening them in the iOS app.

Oh yes, I didn’t consider that you have to get through authentication (username/password) to actually see something useful. :sweat_smile:

If I’m not mistaken, you should be able to authenticate like this:

curl -u username -I example.com

Hm, is it possible that your vault PDF (I’m assuming that’s what it’s called from the screenshot) has moved to another location? Maybe you’ve renamed it?

I’m unable to reproduce the issue. I’ve experimented with 301 redirects both in Cryptomator 1.3.0 and Cryptomator 1.3.1. Not sure where to go from here…

Btw, also try to enter the full URL to the curl command. E.g. like this:

https://xxx.your-storagebox.de/path/to/PDF

Okay when using https://xxx.your-storagebox.de/PDF I get this:

curl -u xxxx -I https://xxxx.your-storagebox.de/PDF
Enter host password for user 'xxxx':
HTTP/1.1 301 Moved Permanently
Date: Sun, 22 Apr 2018 21:27:21 GMT
Server: Apache
Location: https://xxxx.your-storagebox.de/PDF/
Content-Type: text/html; charset=iso-8859-1

But when I use: https://xxx.your-storagebox.de/PDF/ I get the output:

HTTP/1.1 200 OK
Date: Sun, 22 Apr 2018 21:29:44 GMT
Server: Apache
Content-Type: text/html;charset=ISO-8859-1

Hm, I don’t see anything unusual about that. You mentioned that your other vaults work as expected that are located at the same WebDAV server. That’s what I’m really confused about.

  • Have you tried to re-add the vault?
  • Have you tried to “restart” the app? Maybe a “wrong” redirection is stored in the cache for whatever reason.

Yes thats what confuses me too. I have now deleted the vault from the app restarted my iPhone and readded it, and I am still getting the same 301 message.

I came to realize that https://xxx.your-storagebox.de/PDF/ is probably not the path that results in HTTP 301. I can’t be sure of that but you mentioned that you were even able to re-add the vault? That means you were able to navigate inside PDF and select masterkey.cryptomator?

In that case, it’s probably the encrypted path that results in HTTP 301: https://xxx.your-storagebox.de/PDF/d/XX/YYYYYYYYYYYYYYYYYYYYYYYYYYYYYY/

The vault structure looks like this: folder d -> folders with 2 chars -> folders with 30 chars.

Since the paths are encrypted, it’s hard to say which one is the root folder.

Another idea that I have: Could you please try to connect to this WebDAV server with Cyberduck? Since Cyberduck is also able to unlock Cryptomator vaults, it’d be interesting to know if you can open the vault with a different software.

Okay I just noticed something really crazy. I normally use Mountainduck to mount my webdav server a local drive and then work on my Cryptomator vaults and when I open the PDF vault everything looks normal. But when I open the vault with Cyberduck there are 2 files that are named something like E7JQxxxx.lng at the the end, and these are the exact same file names that are stored on my webdav server. I have no subfolders in this vault so finding the folder where all files are on the webdav server is quite easy. What could this be? I have never seen Cryptomator store a file with a .lng ending.

Yes I am able to navigate into the PDF vaults root folder and select the masterkey.cryptomator file.

I also checked the encrypted path and it does not result in a 301 it returns a:

HTTP/1.1 200 OK
Date: Mon, 23 Apr 2018 10:17:32 GMT
Server: Apache
Content-Type: text/html;charset=ISO-8859-1

.lng files are fine. They’re created when the encrypted filename is too long. See Cryptomator’s security architecture on name shortening. That’s why there’s also a folder m (metadata) for this case.

I’m running out of ideas. We probably need some logging in the iOS app. I’ll get back to you when we’ve added WebDAV logging. We’ll probably do some testing via TestFlight. Are you already a beta tester? If not, you can send me a direct message with your email and I’ll send you an invitation.

Hello,
do you have any news about the beta version with the logging feature? :slight_smile:

Thanks,
Timo

1 Like

Sorry for the late response. I actually had it ready for quite some time but didn’t upload to TestFlight for several reasons. But I’ve just submitted it for review and it should hopefully be available very soon!

1 Like

@tobihagemann Long Time no see! I was wondering if you guys are doing beta on TestFlight as well and how I can sign up!!