Repository navigation
Conversation
When ModDB hangs during CONNECT or TLS handshake, Chromium aborts with net::ERR_TIMED_OUT or net::ERR_CONNECTION_TIMED_OUT. Because useQueryMod previously matched only the launcher's internal "Network request timed out" timer string, connection timeouts did not flag timedOut. As a result, Manage Mods and modpack import continued through all subsequent lookup waves, stalling the UI for 95 seconds or more. Map net::ERR_TIMED_OUT and net::ERR_CONNECTION_TIMED_OUT to "Network request timed out" in requestBoundedBuffer, and recognize them alongside the timer error in useQueryMod. Quick failures such as connection refused or DNS resolution failure remain non-timeout failures so other installed mods continue to be checked. Fixes #750
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.
Summary
When ModDB is unreachable because the connection hangs during CONNECT or TLS handshake, Chromium aborts with
net::ERR_TIMED_OUTornet::ERR_CONNECTION_TIMED_OUT. BecauseuseQueryModpreviously matched only the internal"Network request timed out"message from the launcher's own timers, connection-level timeouts were treated as plain non-timeout failures. Consequently,lookupTimedOutnever tripped inuseGetCompleteInstalledModsorImportModpackPopup, causing batches to continue querying through all subsequent 30-second waves and stalling Manage Mods for 95 seconds or more.This change maps
net::ERR_TIMED_OUTandnet::ERR_CONNECTION_TIMED_OUTto"Network request timed out"inrequestBoundedBuffer(src/ipc/network.ts), and also recognizes both codes directly alongside the timer message inuseQueryMod(src/renderer/src/features/mods/hooks/useQueryMod.ts). Quick failures such asnet::ERR_CONNECTION_REFUSEDornet::ERR_NAME_NOT_RESOLVEDcontinue to reporttimedOut: falseso remaining mods in the batch are still checked.Type
Checklist
dev, notmain.npm run typecheckpasses.npm run lint:cipasses.npm run format:checkpasses.npm run test:coveragepasses, coverage at or above the floor invitest.config.ts.npm run build:unpackpasses.Testing
tests/renderer-dom/useQueryMod.test.tsx(11 tests passed), checking clean 200, 404 not-found, non-timeout errors, timer timeout, and Chromium connect timeouts (net::ERR_TIMED_OUT,net::ERR_CONNECTION_TIMED_OUT).tests/renderer-dom/useGetCompleteInstalledMods.test.tsx(8 tests passed): verified that connect timeouts stop subsequent lookup waves at 2 requests, while quick connection refused failures permit all 6 requests to run.tests/renderer-dom/importModpackPopup.test.tsx(28 tests passed): verified that connect timeouts stop subsequent modpack lookup requests.tests/ipc/moddb-slow-transfer-timeout.test.ts(9 tests passed): verifiedrequestBoundedBufferunifiesnet::ERR_TIMED_OUTandnet::ERR_CONNECTION_TIMED_OUTas"Network request timed out"and preserves other error codes.npm run typecheck: cleannpm run lint:ci: 0 errorsnpm run format:check: 100% compliantnpm run test:coverage: Statements 95.08%, Branches 91.30%, Functions 95.89%, Lines 97.03%npm run build:unpack: Linux x64 unpacked build completed with 0 errorsRelated issues
Fixes #750