stablyai/orca · error · Error

Unsupported file type in '${childRelativePath}'

Error message

Unsupported file type in '${childRelativePath}'

What it means

Thrown by stageDirectoryEntries() when a child entry is not a symlink, not a directory, and not a regular file — i.e. entry.isFile() is false for a non-dir, non-symlink entry. Being a plain Error (not RuntimeUploadSymlinkError), it surfaces as { status: 'failed' } for the source. It guards against staging special files (FIFO/socket/device) into a base64 runtime upload where they cannot be represented.

Source

Thrown at src/main/ipc/filesystem-mutations.ts:557

    await assertRealPathInsideRoot(
      rootRealPath,
      dirPath,
      normalizeRelativeUploadPath(relative(rootPath, dirPath))
    )
    const dirEntries = await readdir(dirPath, { withFileTypes: true })
    for (const entry of dirEntries) {
      const childPath = join(dirPath, entry.name)
      const childRelativePath = normalizeRelativeUploadPath(relative(rootPath, childPath))
      if (entry.isSymbolicLink()) {
        throw new RuntimeUploadSymlinkError(`Symlink not allowed in '${childRelativePath}'`)
      }
      if (entry.isDirectory()) {
        entries.push({ relativePath: childRelativePath, kind: 'directory' })
        await visit(childPath)
        continue
      }
      if (!entry.isFile()) {
        throw new Error(`Unsupported file type in '${childRelativePath}'`)
      }
      const stagedFile = await stageFileEntry(childPath, childRelativePath, {
        rootRealPath,
        totalBytesBefore: totalBytes
      })
      totalBytes += stagedFile.byteLength
      entries.push(stagedFile.entry)
    }
  }

  await visit(rootPath)
  return entries
}

async function stageFileEntry(
  filePath: string,
  relativePath: string,
  options?: { rootRealPath?: string; totalBytesBefore?: number }

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Remove the special files (sockets/FIFOs/devices) from the source tree and re-stage.
  2. Exclude well-known special-file directories (e.g. runtime/socket dirs) from the upload selection.
  3. Re-select a clean directory containing only regular files and folders.
Defensive patterns

Strategy: validation

Validate before calling

// Detect non-regular, non-dir, non-symlink children before staging
import { readdir, lstat } from 'node:fs/promises'
async function hasSpecialChild(dir: string): Promise<boolean> {
  for (const e of await readdir(dir, { withFileTypes: true })) {
    if (e.isSymbolicLink() || e.isDirectory() || e.isFile()) continue
    return true
  }
  return false
}

Try / catch

const res = await stageOneSourceForRuntimeUpload(src)
if (res.status === 'failed' && /Unsupported file type/.test(res.reason ?? '')) {
  // report the offending child path and abort the staging
}

Prevention

When it happens

Trigger: readdir inside the staged directory yields a child that is a socket, FIFO, character device, or block device; the entry is neither directory nor regular file, so it is rejected.

Common situations: Tree contains runtime artifacts such as Unix sockets (common under .node-gyp, postgres sockets, X11 sockets), named pipes, or device nodes; platform-specific entries that survive into a dropped folder.

Related errors


AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12). Data as JSON: /api/errors/df73969eb68ecb08. Report an issue: GitHub.