Broken directory file. Failed to load contents of directory

I’m having the same problem with the latest version of Cryptomator. Just one of my vaults refuses to allow me to open any files or copy them out. Strangely, I can add new files to this vault and they work fine but existing files are all seemingly corrupted.

I can see all the attributes and metadata for the files. Just can’t open them, edit them or view them. I’m getting “access denied” type errors. Affects all filetypes in that vault.

Log file saying things like:

23:56:25.213 [webdav-018] WARN  o.c.c.dir.BrokenDirectoryFilter - Broken directory file: D:\OneDrive\Documents\[redacted]
java.io.IOException: Failed to load contents of directory file at path D:\OneDrive\Documents\[redacted]
	at org.cryptomator.cryptofs.DirectoryIdProvider.load(DirectoryIdProvider.java:36)
	at org.cryptomator.cryptofs.CryptoPathMapper.resolveDirectory(CryptoPathMapper.java:173)
	at org.cryptomator.cryptofs.dir.BrokenDirectoryFilter.process(BrokenDirectoryFilter.java:31)
	at java.base/java.util.stream.ReferencePipeline$7$1.accept(Unknown Source)
	at java.base/java.util.stream.Streams$StreamBuilderImpl.tryAdvance(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline$7$1.accept(Unknown Source)
	at java.base/java.util.stream.Streams$StreamBuilderImpl.tryAdvance(Unknown Source)
	at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.lambda$initPartialTraversalState$0(Unknown Source)
	at java.base/java.util.stream.StreamSpliterators$AbstractWrappingSpliterator.fillBuffer(Unknown Source)
	at java.base/java.util.stream.StreamSpliterators$AbstractWrappingSpliterator.doAdvance(Unknown Source)
	at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.tryAdvance(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline$7$1.accept(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
	at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Unknown Source)
	at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.lambda$initPartialTraversalState$0(Unknown Source)
	at java.base/java.util.stream.StreamSpliterators$AbstractWrappingSpliterator.fillBuffer(Unknown Source)
	at java.base/java.util.stream.StreamSpliterators$AbstractWrappingSpliterator.doAdvance(Unknown Source)
	at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.tryAdvance(Unknown Source)
	at java.base/java.util.Spliterators$1Adapter.hasNext(Unknown Source)
	at org.cryptomator.webdav.core.servlet.DavFolder.getMembers(DavFolder.java:111)
	at org.apache.jackrabbit.webdav.MultiStatus.addResourceProperties(MultiStatus.java:63)
	at org.apache.jackrabbit.webdav.server.AbstractWebdavServlet.doPropFind(AbstractWebdavServlet.java:632)
	at org.apache.jackrabbit.webdav.server.AbstractWebdavServlet.execute(AbstractWebdavServlet.java:404)
	at org.cryptomator.webdav.core.servlet.AbstractNioWebDavServlet.execute(AbstractNioWebDavServlet.java:95)
	at org.apache.jackrabbit.webdav.server.AbstractWebdavServlet.service(AbstractWebdavServlet.java:316)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:756)
	at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1670)
	at org.cryptomator.webdav.core.filters.MacChunkedPutCompatibilityFilter.doFilterHttp(MacChunkedPutCompatibilityFilter.java:51)
	at org.cryptomator.webdav.core.filters.HttpFilter.doFilter(HttpFilter.java:21)
	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1645)
	at org.cryptomator.webdav.core.filters.AcceptRangeFilter.doFilterHttp(AcceptRangeFilter.java:37)
	at org.cryptomator.webdav.core.filters.HttpFilter.doFilter(HttpFilter.java:21)
	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1645)
	at org.cryptomator.webdav.core.filters.MkcolComplianceFilter.doFilterHttp(MkcolComplianceFilter.java:40)
	at org.cryptomator.webdav.core.filters.HttpFilter.doFilter(HttpFilter.java:21)
	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1645)
	at org.cryptomator.webdav.core.filters.PostRequestBlockingFilter.doFilterHttp(PostRequestBlockingFilter.java:39)
	at org.cryptomator.webdav.core.filters.HttpFilter.doFilter(HttpFilter.java:21)
	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1645)
	at org.cryptomator.webdav.core.filters.UnicodeResourcePathNormalizationFilter.doFilterHttp(UnicodeResourcePathNormalizationFilter.java:53)
	at org.cryptomator.webdav.core.filters.HttpFilter.doFilter(HttpFilter.java:21)
	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1645)
	at org.cryptomator.webdav.core.filters.LoggingFilter.doFilterHttp(LoggingFilter.java:32)
	at org.cryptomator.webdav.core.filters.HttpFilter.doFilter(HttpFilter.java:21)
	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1645)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:510)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1571)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1356)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:176)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:467)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1544)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:174)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1278)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:192)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
	at org.eclipse.jetty.server.Server.handle(Server.java:562)
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$0(HttpChannel.java:399)
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:656)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:391)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:284)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:319)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100)
	at org.eclipse.jetty.io.SocketChannelEndPoint$1.run(SocketChannelEndPoint.java:101)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:370)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.util.concurrent.ExecutionException: java.nio.file.AccessDeniedException: D:\OneDrive\Documents\[redacted]
	at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:566)
	at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:527)
	at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:104)
	at com.google.common.util.concurrent.Uninterruptibles.getUninterruptibly(Uninterruptibles.java:240)
	at com.google.common.cache.LocalCache$Segment.getAndRecordStats(LocalCache.java:2313)
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2279)
	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2155)
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2045)
	at com.google.common.cache.LocalCache.get(LocalCache.java:3951)
	at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3974)
	at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4935)
	at org.cryptomator.cryptofs.DirectoryIdProvider.load(DirectoryIdProvider.java:34)
	... 80 common frames omitted
Caused by: java.nio.file.AccessDeniedException: D:\OneDrive\Documents\[redacted]
	at java.base/sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
	at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
	at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
	at java.base/sun.nio.fs.WindowsFileSystemProvider.newFileChannel(Unknown Source)
	at java.base/java.nio.channels.FileChannel.open(Unknown Source)
	at java.base/java.nio.channels.FileChannel.open(Unknown Source)
	at org.cryptomator.cryptofs.DirectoryIdLoader.load(DirectoryIdLoader.java:27)
	at org.cryptomator.cryptofs.DirectoryIdLoader.load(DirectoryIdLoader.java:16)
	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3529)
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2278)
	... 86 common frames omitted
Caused by: java.nio.file.AccessDeniedException: D:\OneDrive\Documents\[redacted]

This is not something Cryptomator specific, there is something wrong with the access rights of your vault files. Where is the encrypted data located? Is a special access control structure used? What are the access rights of the files?

I think I solved this by closing the vault, deleting the files on the PC and re-downloading them from Onedrive. That seems to have restored everything.

© 2021 Skymatic GmbH • Privacy PolicyImpressum