{"record":{"id":"20b07ff333ce12f3","repo":"alyssaxuu/screenity","slug":"drive-resumable-upload-made-no-progress-at-offset","errorCode":null,"errorMessage":"Drive resumable upload made no progress at offset ${offset}","messagePattern":"Drive resumable upload made no progress at offset (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/pages/Background/drive/handleSaveToDrive.js","lineNumber":257,"sourceCode":"        delayMs: Math.round(delay + jitter),\n      });\n      await new Promise((r) => setTimeout(r, delay + jitter));\n    }\n\n    if (advanced) {\n      stalledRounds = 0;\n      continue;\n    }\n    if (!stalled) {\n      throw new Error(\n        `Drive chunk PUT exhausted retries at offset ${offset}`\n      );\n    }\n    // Drive accepted none of the chunk. Resending the same range is correct,\n    // but bound it so a persistently stalled upload fails instead of looping.\n    stalledRounds += 1;\n    if (stalledRounds >= MAX_STALL_ROUNDS) {\n      throw new Error(\n        `Drive resumable upload made no progress at offset ${offset}`\n      );\n    }\n    const stallDelay = Math.min(1000 * Math.pow(2, stalledRounds - 1), 15000);\n    diagEvent(\"drive-chunk-stall\", {\n      offset,\n      round: stalledRounds,\n      delayMs: stallDelay,\n    });\n    await new Promise((r) => setTimeout(r, stallDelay));\n  }\n\n  throw new Error(\"Drive resumable upload finished without final response\");\n};\n\nconst isAuthError = (err) => {\n  const msg = String(err?.message || err || \"\");\n  return / 401\\b/.test(msg) || /401 /.test(msg);","sourceCodeStart":239,"sourceCodeEnd":275,"githubUrl":"https://github.com/alyssaxuu/screenity/blob/512606387b8d07dda5e63bb428bd063f0a2a3ed0/src/pages/Background/drive/handleSaveToDrive.js#L239-L275","documentation":"Drive repeatedly accepted none of the current chunk (successive 'stalled' responses with no offset advance) and stalledRounds reached MAX_STALL_ROUNDS, so the uploader aborts to avoid an infinite resend loop. Thrown in uploadResumable when offset never progresses across consecutive stalled rounds.","triggerScenarios":"Thrown at src/pages/Background/drive/handleSaveToDrive.js:257 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Resume the session by querying PUT Content-Range: bytes */size to learn the true committed offset","Restart the upload entirely if the session expired (410)","Increase MAX_STALL_ROUNDS only if long stalls are expected; otherwise treat as a network failure"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"512606387b8d07dda5e63bb428bd063f0a2a3ed0","analyzedAt":"2026-09-02T20:59:09.419Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T02:17:09.455Z"}