Error when restoring and taking snapshot

Why am I getting this error when restoring files?

Error: error restoring: restore error: copy directory contents: error reading directory: unable to open object: k9b59b41c1081bef57b0a54a843240b31: unexpected content error: error getting cached content: invalid (offset=9771212,length=187) for blob "qfac8d6304c4b80294441b2124bce1c23-sab66b54666e2296310c" of size 0.

I also get a red error message in the snapshot logs, but the logs aren’t long enough to find the error again.

Seems that you have some zero-length file in the repository. Is this a filesystem or cloud?

It is a filesystem.
I did the snapshot and restore as a test of Kopia-ui

So it’s a brand new repo on a regular filesystem? Or is the filesystem special in any way (network-based, cloud-based) ?

Can you locate the file in the repository directory (will be under <repo-dir>/q/fa subdirectory) and see what the length is? Kopia seems to be thinking it’s zero.

Regular filesystem.

What kind of filesystem is this (FAT, ext4, btrfs)? The path almost indicates a removable drive, is this correct? I encountered something like this before, but in my case, it was a hardware problem. I had a USB flash drive that would refuse to copy the file contents and would get stuck. Can you rule out that you are using a external drive, and that the drive is problem free? Also, kopia should have logs for the snapshot you look, can you see if there are any errors mentioned in the logs?