{"record":{"id":"e329f0f044935520","repo":"xpipe-io/xpipe","slug":"directory-creation-in-datadirectory-failed-sile","errorCode":null,"errorMessage":"Directory creation in ${dataDirectory} failed silently","messagePattern":"Directory creation in (.+?) failed silently","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"app/src/main/java/io/xpipe/app/core/check/AppDirectoryPermissionsCheck.java","lineNumber":31,"sourceCode":"\n    public static void checkDirectory(Path dataDirectory) {\n        // Only check this for the daemon to prevent issues with concurrent file creations\n        if (Boolean.getBoolean(\"io.xpipe.app.isCli\")) {\n            return;\n        }\n\n        try {\n            var testDirectory = dataDirectory.resolve(\"permissions_check\");\n\n            // Maybe we have a broken leftover from a previous attempt?\n            if (Files.exists(testDirectory)) {\n                return;\n            }\n\n            FileUtils.forceMkdir(dataDirectory.toFile());\n            FileUtils.forceMkdir(testDirectory.toFile());\n            if (!Files.exists(testDirectory)) {\n                throw new IOException(\"Directory creation in \" + dataDirectory + \" failed silently\");\n            }\n            Files.delete(testDirectory);\n\n            // For cloud providers like OneDrive, we need another check to guarantee that all files are synced\n            // The file operation might fail if the directory is designated to sync but the actual file is not\n            // downloaded yet\n            var testFile = dataDirectory.resolve(\"sync_file\");\n            if (!Files.exists(testFile)) {\n                Files.createFile(testFile);\n            }\n            Files.readString(testFile);\n        } catch (IOException e) {\n            var message = \"Unable to access directory \" + dataDirectory + \".\";\n            if (OsType.ofLocal() == OsType.WINDOWS) {\n                message +=\n                        \" Please make sure that you have the appropriate permissions and no Antivirus program is blocking the access. \"\n                                + \"In case you use cloud storage, verify that your cloud storage is working and you are logged in.\";\n            }","sourceCodeStart":13,"sourceCodeEnd":49,"githubUrl":"https://github.com/xpipe-io/xpipe/blob/d85ca821baa46092a320ebb13546d7240adb74f8/app/src/main/java/io/xpipe/app/core/check/AppDirectoryPermissionsCheck.java#L13-L49","documentation":"After asking Commons-IO's FileUtils.forceMkdir to create the data directory and a test subdirectory, XPipe verifies the test directory actually exists. If mkdir calls returned without error yet the directory is absent (silent failure), it throws this IOException. This catches filesystems (notably cloud-sync providers) that report success but do not actually materialize files.","triggerScenarios":"checkDirectory runs at startup on the chosen data directory: forceMkdir succeeds without exception but Files.exists(testDirectory) is false immediately afterwards.","commonSituations":"Data directory located on OneDrive/Dropbox/Google Drive sync folders where on-demand files are not materialized; network mounts with laggy or lying write semantics; full disks or quota limits swallowed by the FS layer.","solutions":["Move the XPipe data directory off cloud-synced/network locations to a local disk","Check disk space and quota on the data directory's volume","Create the directory manually and confirm it persists, then retry","Check cloud provider 'files on-demand' settings and pin the folder locally"],"exampleFix":"// before\nXPDATA=/home/user/OneDrive/xpipe\n// after\nXPDATA=/home/user/.local/share/xpipe","handlingStrategy":"try-catch","validationCode":"Files.createDirectories(testDir);\nif (!Files.isDirectory(testDir)) { /* pick another data dir */ }","typeGuard":null,"tryCatchPattern":"try { checkDirectory(dir); } catch (IOException e) { if (e.getMessage().contains(\"failed silently\")) { /* relocate data dir off synced/network storage */ } else throw e; }","preventionTips":["Keep data directories on local, non-synced disks","Monitor disk space and quotas","Verify cloud 'on-demand' file settings"],"tags":["filesystem","io","directory-creation"],"backgroundTag":"file-write-failed","analyzedSha":"d85ca821baa46092a320ebb13546d7240adb74f8","analyzedAt":"2026-09-06T14:30:08.251Z","contentChangedAt":"2026-09-06T14:30:08.251Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}