{"record":{"id":"df73969eb68ecb08","repo":"stablyai/orca","slug":"unsupported-file-type-in-childrelativepath","errorCode":null,"errorMessage":"Unsupported file type in '${childRelativePath}'","messagePattern":"Unsupported file type in '(.+?)'","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/main/ipc/filesystem-mutations.ts","lineNumber":557,"sourceCode":"    await assertRealPathInsideRoot(\n      rootRealPath,\n      dirPath,\n      normalizeRelativeUploadPath(relative(rootPath, dirPath))\n    )\n    const dirEntries = await readdir(dirPath, { withFileTypes: true })\n    for (const entry of dirEntries) {\n      const childPath = join(dirPath, entry.name)\n      const childRelativePath = normalizeRelativeUploadPath(relative(rootPath, childPath))\n      if (entry.isSymbolicLink()) {\n        throw new RuntimeUploadSymlinkError(`Symlink not allowed in '${childRelativePath}'`)\n      }\n      if (entry.isDirectory()) {\n        entries.push({ relativePath: childRelativePath, kind: 'directory' })\n        await visit(childPath)\n        continue\n      }\n      if (!entry.isFile()) {\n        throw new Error(`Unsupported file type in '${childRelativePath}'`)\n      }\n      const stagedFile = await stageFileEntry(childPath, childRelativePath, {\n        rootRealPath,\n        totalBytesBefore: totalBytes\n      })\n      totalBytes += stagedFile.byteLength\n      entries.push(stagedFile.entry)\n    }\n  }\n\n  await visit(rootPath)\n  return entries\n}\n\nasync function stageFileEntry(\n  filePath: string,\n  relativePath: string,\n  options?: { rootRealPath?: string; totalBytesBefore?: number }","sourceCodeStart":539,"sourceCodeEnd":575,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/src/main/ipc/filesystem-mutations.ts#L539-L575","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Remove the special files (sockets/FIFOs/devices) from the source tree and re-stage.","Exclude well-known special-file directories (e.g. runtime/socket dirs) from the upload selection.","Re-select a clean directory containing only regular files and folders."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Detect non-regular, non-dir, non-symlink children before staging\nimport { readdir, lstat } from 'node:fs/promises'\nasync function hasSpecialChild(dir: string): Promise<boolean> {\n  for (const e of await readdir(dir, { withFileTypes: true })) {\n    if (e.isSymbolicLink() || e.isDirectory() || e.isFile()) continue\n    return true\n  }\n  return false\n}","typeGuard":null,"tryCatchPattern":"const res = await stageOneSourceForRuntimeUpload(src)\nif (res.status === 'failed' && /Unsupported file type/.test(res.reason ?? '')) {\n  // report the offending child path and abort the staging\n}","preventionTips":["Exclude well-known special-file directories (sockets, FIFOs) from uploads.","Filter selection to directories containing only regular files and folders.","Surface 'unsupported file type' failures with the path so users can clean up."],"tags":["filesystem","upload","runtime-upload","staging","unsupported-type"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}