Cannot create webdav repository due to error

Hello,

I’ve just installed kopia
0.8.4 build: 940d10dfa29e771467b5d9d45412b889053c2ed1 from: kopia/kopia

And I tried to create a repository using webdav but it’s not working. Could you please help me understanding the error ?

Is rclone recommended to use webdav ?

Thank you,
Tom

kopia repository create webdav --url=https://connect.drive.infomaniak.com/ --webdav-username=XXX --description test
Enter WebDAV password: 
Enter password to create new repository: 
Re-enter password for verification: 
Initializing repository with:
  block hash:          BLAKE2B-256-128
  encryption:          AES256-GCM-HMAC-SHA256
  splitter:            DYNAMIC-4M-BUZHASH
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/studio-b12/gowebdav.FixSlashes(...)
        /home/runner/go/pkg/mod/github.com/studio-b12/gowebdav@v0.0.0-20210203212356-8244b5a5f51a/utils.go:54
github.com/studio-b12/gowebdav.(*Client).MkdirAll(0xc0004770c0, 0x0, 0x0, 0x1c0, 0xc0001a2f30, 0x2ae)
        /home/runner/go/pkg/mod/github.com/studio-b12/gowebdav@v0.0.0-20210203212356-8244b5a5f51a/client.go:277 +0x54c
github.com/kopia/kopia/repo/blob/webdav.(*davStorageImpl).PutBlobInPath.func1(0x2ae, 0x0)
        /home/runner/work/kopia/kopia/repo/blob/webdav/webdav_storage.go:135 +0x173
github.com/kopia/kopia/internal/retry.WithExponentialBackoffNoValue.func1(0xc000255080, 0xc000557410, 0x51fb99, 0xc000255080)
        /home/runner/work/kopia/kopia/internal/retry/retry.go:80 +0x26
github.com/kopia/kopia/internal/retry.internalRetry(0x1855df8, 0xc00003e0f0, 0x12f2acd, 0x25, 0xc000557500, 0x16f81a0, 0x3b9aca00, 0x773594000, 0xa, 0x3ff8000000000000, ...)
        /home/runner/work/kopia/kopia/internal/retry/retry.go:55 +0xc2
github.com/kopia/kopia/internal/retry.WithExponentialBackoff(...)
        /home/runner/work/kopia/kopia/internal/retry/retry.go:31
github.com/kopia/kopia/internal/retry.WithExponentialBackoffNoValue(0x1855df8, 0xc00003e0f0, 0x12f2acd, 0x25, 0xc0005575a0, 0x16f81a0, 0x26, 0x10)
        /home/runner/work/kopia/kopia/internal/retry/retry.go:79 +0xd1
github.com/kopia/kopia/repo/blob/webdav.(*davStorageImpl).PutBlobInPath(0xc00012d5c0, 0x1855df8, 0xc00003e0f0, 0x0, 0x0, 0xc00022a0a8, 0x12, 0x18528f0, 0xc0000977d0, 0x12d3512, ...)
        /home/runner/work/kopia/kopia/repo/blob/webdav/webdav_storage.go:121 +0x28a
github.com/kopia/kopia/repo/blob/sharded.Storage.PutBlob(0x185cf58, 0xc00012d5c0, 0x0, 0x0, 0x12c5080, 0x2, 0x1ef7d50, 0x2, 0x2, 0x1855df8, ...)
        /home/runner/work/kopia/kopia/repo/blob/sharded/sharded.go:115 +0xfb
github.com/kopia/kopia/repo/blob/retrying.retryingStorage.PutBlob.func1(0xc000360180, 0x19, 0x19, 0x1)
        /home/runner/work/kopia/kopia/repo/blob/retrying/retrying_storage.go:51 +0x69
github.com/kopia/kopia/internal/retry.internalRetry(0x1855df8, 0xc00003e0f0, 0xc000360180, 0x19, 0xc0005578f0, 0x16f8168, 0x3b9aca00, 0x773594000, 0xa, 0x3ff8000000000000, ...)
        /home/runner/work/kopia/kopia/internal/retry/retry.go:55 +0xc2
github.com/kopia/kopia/internal/retry.WithExponentialBackoff(...)
        /home/runner/work/kopia/kopia/internal/retry/retry.go:31
github.com/kopia/kopia/repo/blob/retrying.retryingStorage.PutBlob(0x1862618, 0xc000125db0, 0x1855df8, 0xc00003e0f0, 0x12d3512, 0x10, 0x18528f0, 0xc0000977d0, 0xc0000977d0, 0x1200f20)
        /home/runner/work/kopia/kopia/repo/blob/retrying/retrying_storage.go:50 +0x1a5
github.com/kopia/kopia/repo.writeFormatBlob(0x1855df8, 0xc00003e0f0, 0x18624f8, 0xc00049b090, 0xc000231040, 0xc0003601a0, 0x20)
        /home/runner/work/kopia/kopia/repo/format_block.go:170 +0x19b
github.com/kopia/kopia/repo.Initialize(0x1855df8, 0xc00003e0f0, 0x18624f8, 0xc00049b090, 0xc000557c40, 0xc0001840a0, 0xa, 0xc00046c510, 0xc0004770c0)
        /home/runner/work/kopia/kopia/repo/initialize.go:71 +0x229
github.com/kopia/kopia/cli.runCreateCommandWithStorage(0x1855df8, 0xc00003e0f0, 0x18624f8, 0xc00049b090, 0xc00049b090, 0x0)
        /home/runner/work/kopia/kopia/cli/command_repository_create.go:78 +0x49b
github.com/kopia/kopia/cli.RegisterStorageConnectFlags.func1(0xc000120240, 0x40ba45, 0x1144d60)
        /home/runner/work/kopia/kopia/cli/storage_providers.go:31 +0xce
github.com/alecthomas/kingpin.(*actionMixin).applyActions(0xc0004abef8, 0xc000120240, 0x0, 0x0)
        /home/runner/go/pkg/mod/github.com/alecthomas/kingpin@v0.0.0-20200323085623-b6657d9477a6/actions.go:28 +0x6d
github.com/alecthomas/kingpin.(*Application).applyActions(0xc000146100, 0xc000120240, 0x0, 0x0)
        /home/runner/go/pkg/mod/github.com/alecthomas/kingpin@v0.0.0-20200323085623-b6657d9477a6/app.go:560 +0xdf
github.com/alecthomas/kingpin.(*Application).execute(0xc000146100, 0xc000120240, 0xc000476f80, 0x3, 0x4, 0x0, 0x0, 0x0, 0xc000133ed0)
        /home/runner/go/pkg/mod/github.com/alecthomas/kingpin@v0.0.0-20200323085623-b6657d9477a6/app.go:398 +0x95
github.com/alecthomas/kingpin.(*Application).Parse(0xc000146100, 0xc00003a090, 0x7, 0x7, 0x1, 0xc000133ed0, 0x0, 0x1)
        /home/runner/go/pkg/mod/github.com/alecthomas/kingpin@v0.0.0-20200323085623-b6657d9477a6/app.go:230 +0x228
main.main()
        /home/runner/work/kopia/kopia/main.go:83 +0x206

There’s some underlying error which causes Kopia to retry but the retry fails due to a bug in webdav library. This got fixed yesterday as part of other work.

This build will tell you more about what is going on:

Alternatively try adding --log-level=debug to see if it prints any useful message.

Thank you, it works with this latest release !

Unfortunately kdrive service doesn’t allow me to write at the root.
kopia: error: cannot initialize repository: unable to write format blob: unable to write format blob: unable to complete PutBlob(kopia.repository) despite 10 retries, last error: Write kopia.repository.f-2775422040480279449: 411

I’ve tried to put --url=“https://connect.drive.infomaniak.com/My Disk/” but this is not working.
If I use the url with curl it’s ok but not kopia.
Do you know if it’s possible to define a folder with kopia ?

I can’t write to the root of webdav (kdrive limitation) and I cannot use a subfolder of webdav (kopia limitation). Maybe it’s because the folder name has a space in it, I don’t know (I cannot remove it).

I’m using both at the same time: kopia with filesystem + rclone with webdav. This is working fine.