Repository navigation
Conversation
The queue worker ran an un-awaited async upload, so any throw or rejection before or inside the upload chain escaped, next was never called and the folder upload stayed at Processing forever. Uploads now run as a single awaited chain with a guarded callback, awaited retries, safe error classification and isolated success listeners.
Deploying drive-web with
|
| Latest commit: |
69db71f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://98681b3c.drive-web.pages.dev |
| Branch Preview URL: | https://fix-folder-upload-stuck-proc.drive-web.pages.dev |
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Uploading a folder with many files could stay stuck at "Processing" / 100% forever with files missing (e.g. 998/1000), usually after a
502onPOST /drive/filesin the console.Root cause: the
UploadManagerqueue worker ran an un-awaited asyncupload(). Any throw or rejection before or inside theuploadFilechain (e.g. IndexedDBgetUploadStateon the retry after a 502, or anundefinedrejection value) escaped,nextwas never called and the folder'sPromise.allnever settled. A throwing success listener could also re-upload the file and callnexttwice.Changes:
processFile→uploadWithRetries→uploadAttempt, with a top-level.catchand acallOnceguard sonextis always called exactly once.runListener); floatingsetUploadState/removeUploadStatepromises now have a.catch.Behaviour change: a throwing success listener is now reported and the file is kept as uploaded (previously it was re-uploaded and then marked as failed).
Checklist