{"record":{"id":"1214539db356bed2","repo":"vercel/next.js","slug":"skipping-file-file-is-empty","errorCode":null,"errorMessage":"Skipping ${file}: file is empty.","messagePattern":"Skipping (.+?): file is empty\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/next/src/cli/internal/upload-trace.ts","lineNumber":127,"sourceCode":"\n  const uploadUrl = getUploadUrl()\n\n  console.log(`Found ${uploadableFiles.length} file(s) in ${profilesDir}.`)\n  console.log(`Uploading to the Next.js team...`)\n\n  const { put } =\n    require('next/dist/compiled/@vercel/blob') as typeof import('next/dist/compiled/@vercel/blob')\n\n  let sessionId: string | undefined\n  let sessionToken: string | undefined\n  let uploadedCount = 0\n\n  for (const file of uploadableFiles) {\n    const filePath = path.join(profilesDir, file)\n\n    const stat = await fs.stat(filePath)\n    if (stat.size === 0) {\n      console.warn(`Skipping ${file}: file is empty.`)\n      continue\n    }\n\n    const fd = await fs.open(filePath, 'r')\n    const headerBuf = Buffer.alloc(16)\n    await fd.read(headerBuf, 0, 16, 0)\n    await fd.close()\n\n    if (file.endsWith('.cpuprofile')) {\n      validateCpuProfile(headerBuf, file)\n    } else if (file.endsWith('trace-turbopack.bin')) {\n      validateTurbopackTrace(headerBuf, file)\n    }\n\n    const content = await fs.readFile(filePath)\n\n    const tokenRes = await fetch(uploadUrl, {\n      method: 'POST',","sourceCodeStart":109,"sourceCodeEnd":145,"githubUrl":"https://github.com/vercel/next.js/blob/0eb377541648e63402a47b38fee00a8d0ce8f8f1/packages/next/src/cli/internal/upload-trace.ts#L109-L145","documentation":"uploadTraceToBlob stats each profile file before upload and warns (skipping the file) when its size is zero; an empty trace contains no span data so uploading it is pointless, while the rest of the upload continues.","triggerScenarios":"Thrown at packages/next/src/cli/internal/upload-trace.ts:127 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the trace file is non-empty before uploading, or remove the empty file from the trace inputs."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0eb377541648e63402a47b38fee00a8d0ce8f8f1","analyzedAt":"2026-08-19T02:10:13.922Z","contentChangedAt":"2026-08-19T02:10:13.922Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}