xpipe-io/xpipe · error · IOException

Directory creation in ${dataDirectory} failed silently

Error message

Directory creation in ${dataDirectory} failed silently

What it means

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.

Source

Thrown at app/src/main/java/io/xpipe/app/core/check/AppDirectoryPermissionsCheck.java:31

    public static void checkDirectory(Path dataDirectory) {
        // Only check this for the daemon to prevent issues with concurrent file creations
        if (Boolean.getBoolean("io.xpipe.app.isCli")) {
            return;
        }

        try {
            var testDirectory = dataDirectory.resolve("permissions_check");

            // Maybe we have a broken leftover from a previous attempt?
            if (Files.exists(testDirectory)) {
                return;
            }

            FileUtils.forceMkdir(dataDirectory.toFile());
            FileUtils.forceMkdir(testDirectory.toFile());
            if (!Files.exists(testDirectory)) {
                throw new IOException("Directory creation in " + dataDirectory + " failed silently");
            }
            Files.delete(testDirectory);

            // For cloud providers like OneDrive, we need another check to guarantee that all files are synced
            // The file operation might fail if the directory is designated to sync but the actual file is not
            // downloaded yet
            var testFile = dataDirectory.resolve("sync_file");
            if (!Files.exists(testFile)) {
                Files.createFile(testFile);
            }
            Files.readString(testFile);
        } catch (IOException e) {
            var message = "Unable to access directory " + dataDirectory + ".";
            if (OsType.ofLocal() == OsType.WINDOWS) {
                message +=
                        " Please make sure that you have the appropriate permissions and no Antivirus program is blocking the access. "
                                + "In case you use cloud storage, verify that your cloud storage is working and you are logged in.";
            }

View on GitHub (pinned to d85ca821ba)

Solutions

  1. Move the XPipe data directory off cloud-synced/network locations to a local disk
  2. Check disk space and quota on the data directory's volume
  3. Create the directory manually and confirm it persists, then retry
  4. Check cloud provider 'files on-demand' settings and pin the folder locally

Example fix

// before
XPDATA=/home/user/OneDrive/xpipe
// after
XPDATA=/home/user/.local/share/xpipe
Defensive patterns

Strategy: try-catch

Validate before calling

Files.createDirectories(testDir);
if (!Files.isDirectory(testDir)) { /* pick another data dir */ }

Try / catch

try { checkDirectory(dir); } catch (IOException e) { if (e.getMessage().contains("failed silently")) { /* relocate data dir off synced/network storage */ } else throw e; }

Prevention

When it happens

Trigger: checkDirectory runs at startup on the chosen data directory: forceMkdir succeeds without exception but Files.exists(testDirectory) is false immediately afterwards.

Common situations: 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.

Understand the failure class

Background: "failed to write file", "Could not save figure", "Error saving remote file" — file write failed: causes and fixes across languages and libraries — this error's family across 38 libraries.

Related errors


AI-assisted analysis of xpipe-io/xpipe@d85ca821ba (2026-09-06). Data as JSON: /api/errors/e329f0f044935520. Report an issue: GitHub.