{"record":{"id":"c8a5a0928ab65f41","repo":"transloadit/uppy","slug":"cannot-mark-a-queued-request-as-done-this-indicat","errorCode":null,"errorMessage":"Cannot mark a queued request as done: this indicates a bug","messagePattern":"Cannot mark a queued request as done: this indicates a bug","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/@uppy/tus/src/index.ts","lineNumber":435,"sourceCode":"          if (!this.requests.isPaused) {\n            this.requests.pause()\n            window.addEventListener(\n              'online',\n              () => {\n                this.requests.resume()\n              },\n              { once: true },\n            )\n          }\n        }\n        queuedRequest.abort()\n        queuedRequest = {\n          shouldBeRequeued: true,\n          abort() {\n            this.shouldBeRequeued = false\n          },\n          done() {\n            throw new Error(\n              'Cannot mark a queued request as done: this indicates a bug',\n            )\n          },\n          fn() {\n            throw new Error('Cannot run a queued request: this indicates a bug')\n          },\n        }\n        return true\n      }\n\n      if (onShouldRetry != null) {\n        uploadOptions.onShouldRetry = (\n          error: tus.DetailedError,\n          retryAttempt: number,\n        ) => onShouldRetry(error, retryAttempt, opts, defaultOnShouldRetry)\n      } else {\n        uploadOptions.onShouldRetry = defaultOnShouldRetry\n      }","sourceCodeStart":417,"sourceCodeEnd":453,"githubUrl":"https://github.com/transloadit/uppy/blob/5d4dedd02a1ac0ae022c75c54aca76558f88e256/packages/@uppy/tus/src/index.ts#L417-L453","documentation":"An internal queued-request placeholder object throws if its done() method is ever called. The real queued request is swapped in later; calling done() on the placeholder means the request-tracking logic has a bug, not that you misconfigured anything.","triggerScenarios":"A code path in the Tus plugin's internal queue marks the temporary placeholder request (created after an abort while a request is queued) as completed before the real request replaces it.","commonSituations":"Extremely rapid abort/resume cycles during uploads with limit-based queuing; generally only encountered as an internal plugin bug report, not through normal API use.","solutions":["Update to the latest @uppy/tus — report it on the Uppy GitHub issues with a reproduction if it persists","Avoid programmatically aborting and immediately resuming the same file in the same tick","If reproducible, reduce opts.limit concurrency to lower queue churn"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { await uppy.upload() } catch (err) { if (err.message.includes('queued request')) await uppy.retryAll(); else throw err }","preventionTips":["Keep @uppy/tus updated","Avoid aborting and resuming the same file in the same tick","File an issue with a minimal reproduction if it recurs"],"tags":["tus","internal-assertion","queue","abort"],"backgroundTag":"library-internal-invariant","analyzedSha":"5d4dedd02a1ac0ae022c75c54aca76558f88e256","analyzedAt":"2026-08-28T12:18:41.267Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}