input/output error with Linux CLI & pCloud

Hi,
I’ve been using pCloud + Cryptomator in a very user-like way for a bit more than a year and have been very satisfied using it. Recently, I did look to integrate it in my home hosted services and set up a Jellyfin server for music I listen within a docker container, the media files being stored on a docker volume binded into a cryptomator vault from a pCloud storage.
Everything is managed with CLI tools, pCloud & Cryptomator are systemd services while the rest is handled by docker.
Earlier this week I encountered an issue when trying to listen to music from my car with a client app connecting to jellyfin. After a quick diagnostic, I noticed that the docker volume was missing and that the issue was coming from a fault between pCloud & Cryptomator (No longer remember which failed exactly :/). From there, I simply restarted both services, then the container and everything seemingly got back up.

Later on, I noticed that I could no longer play some specific media. For the first one I quickly ended up removing it from the vault from my computer then re-import it which did solved my issue. Though it happened a second time letting me investigate further :

  • I get “Input/Output error” in the cryptomator vault :
    md5sum: '/mnt/Cryptomator/Path/To/File.flac': Input/output error
  • I have the following error in the cryptomator logs whenever I try to access the file
[Thread-4] ERROR o.c.f.f.ReadOnlyAdapter - read /mnt/Cryptomator/Path/To/File.flac failed.
java.io.IOException: org.cryptomator.cryptolib.api.AuthenticationFailedException: Authentication of chunk 135 failed.
         at org.cryptomator.cryptofs@2.7.1/org.cryptomator.cryptofs.fh.ChunkCache.getChunk(ChunkCache.java:123)
         at org.cryptomator.cryptofs@2.7.1/org.cryptomator.cryptofs.ch.CleartextFileChannel.readLocked(CleartextFileChannel.java:112)
         at org.cryptomator.cryptofs@2.7.1/org.cryptomator.cryptofs.ch.AbstractFileChannel.read(AbstractFileChannel.java:155)
         at org.cryptomator.frontend.fuse@5.0.2/org.cryptomator.frontend.fuse.OpenFile.read(OpenFile.java:59)
         at org.cryptomator.frontend.fuse@5.0.2/org.cryptomator.frontend.fuse.ReadOnlyFileHandler.read(ReadOnlyFileHandler.java:62)
         at org.cryptomator.frontend.fuse@5.0.2/org.cryptomator.frontend.fuse.ReadOnlyAdapter.read(ReadOnlyAdapter.java:345)
         at org.cryptomator.jfuse.api@0.7.0/org.cryptomator.jfuse.api.FuseOperationsDecorator.read(FuseOperationsDecorator.java:117)
         at org.cryptomator.jfuse.linux.amd64@0.7.0/org.cryptomator.jfuse.linux.amd64.FuseImpl.read(FuseImpl.java:189)
 Caused by: org.cryptomator.cryptolib.api.AuthenticationFailedException: Authentication of chunk 135 failed.
         at org.cryptomator.cryptolib@2.2.0/org.cryptomator.cryptolib.v1.FileContentCryptorImpl.decryptChunk(FileContentCryptorImpl.java:99)
         at org.cryptomator.cryptofs@2.7.1/org.cryptomator.cryptofs.fh.ChunkLoader.load(ChunkLoader.java:40)
         at org.cryptomator.cryptofs@2.7.1/org.cryptomator.cryptofs.fh.ChunkCache.loadChunk(ChunkCache.java:133)
         at org.cryptomator.cryptofs@2.7.1/org.cryptomator.cryptofs.fh.ChunkCache.lambda$getChunk$2(ChunkCache.java:117)
         at com.github.benmanes.caffeine/com.github.benmanes.caffeine.cache.BoundedLocalCache.lambda$remap$16(BoundedLocalCache.java:2858)
         at java.base/java.util.concurrent.ConcurrentHashMap.compute(Unknown Source)
         at com.github.benmanes.caffeine/com.github.benmanes.caffeine.cache.BoundedLocalCache.remap(BoundedLocalCache.java:2853)
         at com.github.benmanes.caffeine/com.github.benmanes.caffeine.cache.BoundedLocalCache.compute(BoundedLocalCache.java:2803)
         at com.github.benmanes.caffeine/com.github.benmanes.caffeine.cache.LocalCache.compute(LocalCache.java:99)
         at org.cryptomator.cryptofs@2.7.1/org.cryptomator.cryptofs.fh.ChunkCache.getChunk(ChunkCache.java:115)
         ... 7 common frames omitted
  • The file is fine if accessed from another device through Pcloud+Cryptomator (Android app + Windows Desktop app) meaning there must be some local cache that have been corrupted ?
    I have several questions if someone is willing to answer them :
  • What could have caused this to happen in the first place ? (I strongly believe that its due to the volumes being unproperly dismounter due to the fault I mentionned earlier; it is also worth noting that I still have another issue with my service boot order that may lead to Cryptomator running before Pcloud or Docker running container before those are yet available)
  • What can I do to prevent this from happening again ?
  • Is there any best solution than reupload the file from another device ?