{"record":{"id":"7e0d4deb59a4dc98","repo":"stablyai/orca","slug":"unsupported-file-type-in-entry-name","errorCode":null,"errorMessage":"Unsupported file type in '${entry.name}'","messagePattern":"Unsupported file type in '(.+?)'","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/main/ipc/filesystem-mutations.ts","lineNumber":702,"sourceCode":" * individual files to leverage native OS copy primitives instead of\n * buffering entire files into memory.\n */\nasync function recursiveCopyDir(srcDir: string, destDir: string): Promise<void> {\n  await mkdir(destDir, { recursive: false })\n  const entries = await readdir(srcDir, { withFileTypes: true })\n  for (const entry of entries) {\n    const srcPath = join(srcDir, entry.name)\n    const dstPath = join(destDir, entry.name)\n    const statResult = await lstat(srcPath)\n    if (statResult.isSymbolicLink()) {\n      throw new Error(`Symlink not allowed in '${entry.name}'`)\n    }\n    if (statResult.isDirectory()) {\n      await recursiveCopyDir(srcPath, dstPath)\n      continue\n    }\n    if (!statResult.isFile()) {\n      throw new Error(`Unsupported file type in '${entry.name}'`)\n    }\n    await copyLocalFileNoFollow(srcPath, dstPath, statResult)\n  }\n}\n\nasync function copyLocalFileNoFollow(\n  srcPath: string,\n  dstPath: string,\n  statResult?: Awaited<ReturnType<typeof lstat>>\n): Promise<void> {\n  const beforeOpenStat = statResult ?? (await lstat(srcPath))\n  if (beforeOpenStat.isSymbolicLink()) {\n    throw new Error(`Symlink not allowed in '${basename(srcPath)}'`)\n  }\n  if (!beforeOpenStat.isFile()) {\n    throw new Error(`Unsupported file type in '${basename(srcPath)}'`)\n  }\n","sourceCodeStart":684,"sourceCodeEnd":720,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/src/main/ipc/filesystem-mutations.ts#L684-L720","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before: import /tmp/myapp containing a socket /tmp/myapp/sock\n// after: remove the socket before importing\n//   rm /tmp/myapp/sock\n//   import /tmp/myapp","handlingStrategy":"validation","validationCode":"const { findSymlinks } = await import('./pre-scan') // reuse\nconst { readdir, lstat } = await import('node:fs/promises')\nconst { join } = await import('node:path')\n\nasync function findSpecialFiles(dir: string): Promise<string[]> {\n  const special: string[] = []\n  async function visit(d: string): Promise<void> {\n    for (const entry of await readdir(d, { withFileTypes: true })) {\n      const p = join(d, entry.name)\n      const st = await lstat(p)\n      if (!st.isFile() && !st.isDirectory() && !st.isSymbolicLink()) special.push(p)\n      else if (st.isDirectory()) await visit(p)\n    }\n  }\n  await visit(dir)\n  return special\n}","typeGuard":null,"tryCatchPattern":"try {\n  await importLocalSource(sourcePath, destDir)\n} catch (error) {\n  if (error instanceof Error && error.message.startsWith('Unsupported file type')) {\n    showUserError(`${error.message} — remove the special file and retry.`)\n    return\n  }\n  throw error\n}","preventionTips":["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."],"tags":["filesystem","local-import","unsupported-type","ipc"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}