kopia: WebDAV: Nextcloud invalid format blob: unexpected end of JSON input

I’m trying to setup Kopia with a NextCloud WebDAV provider. However, I cannot create the repository as shown in the logs:

kopia@nas:~/kopia-0.5.2-linux-arm$ ./kopia repository create webdav --url=<URL> --webdav-username=<USERNAME> --webdav-password="<PASS>"
Enter password to create new repository: 
Re-enter password for verification: 
Initializing repository with:
  block hash:          <STUFF>
  encryption:          <STUFF>
  splitter:            <STUFF>
kopia: error: unable to connect to repository: invalid format blob: unexpected end of JSON input, try --help

Adding --log-level=debug doesn’t show anything more than this.

Any suggestions?

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 2
  • Comments: 18 (5 by maintainers)

Most upvoted comments

Hetzner has resolved this issue on their end (and fixed for all instances). Thank you for your help!

@Zottelchen After more investigation, there’s nothing wrong with Kopia itself. It looks like Hetzner’s reverse proxy does not handle HTTP/2 without Content-Length header correctly (while request without Content-Length that is not marked chunked encoding is not allowed in HTTP/1.1, it is valid in HTTP/2 because all data in HTTP/2 is implicitly “chunked”.) Perhaps you can raise a case with Hertzner support.

This command uploads correctly

curl -u "username:password" --data-binary "test-data" -X PUT "https://xxxx.your-storageshare.de/remote.php/dav/files/username/test.dat"

However, this command results in a 0 KB file being uploaded

curl -u "username:password" -H "transfer-encoding: chunked" --data-binary "test-data" -X PUT "https://xxxx.your-storageshare.de/remote.php/dav/files/username/test.dat"