stablyai/orca · error · Error
Unsupported file type in '${entry.name}'
Error message
Unsupported file type in '${entry.name}' What it means
Thrown in recursiveCopyDir during local external import. An entry that is not a symlink, not a directory, and not a regular file (isFile() false) triggers this error. This covers special file types such as FIFOs, Unix sockets, block devices, and character devices that cannot be meaningfully copied.
Source
Thrown at src/main/ipc/filesystem-mutations.ts:702
* individual files to leverage native OS copy primitives instead of
* buffering entire files into memory.
*/
async function recursiveCopyDir(srcDir: string, destDir: string): Promise<void> {
await mkdir(destDir, { recursive: false })
const entries = await readdir(srcDir, { withFileTypes: true })
for (const entry of entries) {
const srcPath = join(srcDir, entry.name)
const dstPath = join(destDir, entry.name)
const statResult = await lstat(srcPath)
if (statResult.isSymbolicLink()) {
throw new Error(`Symlink not allowed in '${entry.name}'`)
}
if (statResult.isDirectory()) {
await recursiveCopyDir(srcPath, dstPath)
continue
}
if (!statResult.isFile()) {
throw new Error(`Unsupported file type in '${entry.name}'`)
}
await copyLocalFileNoFollow(srcPath, dstPath, statResult)
}
}
async function copyLocalFileNoFollow(
srcPath: string,
dstPath: string,
statResult?: Awaited<ReturnType<typeof lstat>>
): Promise<void> {
const beforeOpenStat = statResult ?? (await lstat(srcPath))
if (beforeOpenStat.isSymbolicLink()) {
throw new Error(`Symlink not allowed in '${basename(srcPath)}'`)
}
if (!beforeOpenStat.isFile()) {
throw new Error(`Unsupported file type in '${basename(srcPath)}'`)
}
View on GitHub (pinned to 1136503c6a)
Solutions
- Identify the special file with `find /source -not -type f -not -type d -not -type l` and remove it.
- Exclude the directory containing special files from the import selection.
- If the file is a socket or pipe left by a crashed process, it is safe to delete.
Example fix
// before: import /tmp/myapp containing a socket /tmp/myapp/sock // after: remove the socket before importing // rm /tmp/myapp/sock // import /tmp/myapp
Defensive patterns
Strategy: validation
Validate before calling
const { findSymlinks } = await import('./pre-scan') // reuse
const { readdir, lstat } = await import('node:fs/promises')
const { join } = await import('node:path')
async function findSpecialFiles(dir: string): Promise<string[]> {
const special: string[] = []
async function visit(d: string): Promise<void> {
for (const entry of await readdir(d, { withFileTypes: true })) {
const p = join(d, entry.name)
const st = await lstat(p)
if (!st.isFile() && !st.isDirectory() && !st.isSymbolicLink()) special.push(p)
else if (st.isDirectory()) await visit(p)
}
}
await visit(dir)
return special
} Try / catch
try {
await importLocalSource(sourcePath, destDir)
} catch (error) {
if (error instanceof Error && error.message.startsWith('Unsupported file type')) {
showUserError(`${error.message} — remove the special file and retry.`)
return
}
throw error
} Prevention
- Detect special files with `find <source> -not -type f -not -type d -not -type l`.
- Avoid importing from /tmp, /var/run, or other runtime directories that contain sockets and pipes.
- Clean stale sockets and pipes from crashed processes before importing.
When it happens
Trigger: Importing a local directory containing a special file type: named pipe (mkfifo), Unix domain socket, block device, or character device. The readdir Dirent is not a symlink, not a directory, and lstat reports isFile() false.
Common situations: Importing a directory that contains build artifacts like named pipes or sockets. Importing from /tmp or /var/run which contain runtime sockets. Importing a directory that includes device files from a backup or archive extraction.
Related errors
- Unsupported file type in '${basename(srcPath)}'
- Symlink not allowed in '${entry.name}'
- Symlink not allowed in '${basename(srcPath)}'
- File changed during import: '${basename(srcPath)}'
- Could not generate a unique name for '${originalName}' after
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/7e0d4deb59a4dc98.
Report an issue: GitHub.