Repository navigation
A voice download cut in the middle of a file tries that file again, instead of stopping at "download: aborted" - #20
Merged
Conversation
…nstead of stopping at "download: aborted" A connection reset while a Supertonic or Chinese voice file came in made the whole download stop with node's bare "aborted", and the install went on only after a second click. Each file is now tried up to three times when the connection is cut, stalls or the server answers 5xx (a missing or damaged file, a refused connection and an address that does not resolve are not tried again), the progress goes back to where the file began, a cut says "connection cut", and the half file is gone before the answer, also when the connection stalls, so a second try never starts on top of the first one's cleanup. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
@leomattos7 is attempting to deploy a commit to the DG_TEAM Team on Vercel. A member of the Team first needs to authorize it. |
Owner
|
Thanks again Leonardo! Merged, it will be in the next release. A clear reproduction without the network, a narrow fix, and the two details that make the retry safe (the half file gone before the answer, the progress taken back): exactly right. On your two questions: the page does show |
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.
What the user now sees or gets
Adding the German, Danish, Japanese, Korean or Chinese voices no longer stops at "download: aborted" when the connection to Hugging Face is reset: the file is asked for again, up to three times, and the download goes on by itself. If it still fails, the message says "connection cut". Closes #18.
How you tested it
test/supertonic.test.js). Before the change:dlError: download: abortedand a single request. After: two requests andst: true. Cut three times, it gives up after three requests with "connection cut". Also covered: a 503 is tried again (2 requests), a 404 is asked for once (1 request,HTTP 404).HOMEpointed at a throwaway folder. The change is inkokoro.jsonly: no session of Claude Code, Codex, Vibe or Cowork was involved. Not tried: macOS, Windows, a real Hugging Face download.node --test test/supertonic.test.js: 5 pass, 0 fail, repeated 12 times in a row with no failure.node --test test/server.test.js: 35 pass.Checks
node --check kokoro.jsandnode --check test/supertonic.test.js; the page-script check from CONTRIBUTING.md (no page file changed, it passes)npm run i18nis not affected: no new text ("connection cut" was already inkokoro.js); it passes on mainnpm test: only the non-live suites were run (thelive-*suites need Chrome); this change touches no pageBeyond the fix / Proposed improvement
Two things in this PR beyond "try again", both needed for the retry to be safe:
.partof the same name while the old removal was still running. While building it, an intermediate version of this change sometimes reportedCannot call write after a stream was destroyedinstead of the real cause; the first-cause guard fixes that (it does not happen on main).Follow-up, not in this PR: resume a cut file with
Range: bytes=n-on its.part(the biggest file is 256 MB; the CDN redirect and servers that ignoreRangeneed their own tests), and showdlErrorwith a "Try again" button in the page if it does not already.Reviewer notes
ECONNRESET,ECONNABORTED,EPIPE,ETIMEDOUT,EAI_AGAIN, HTTP 5xx.ECONNREFUSED,ENOTFOUND, a damaged file (size or SHA-256), disk errors.🤖 Generated with Claude Code