Bugfix/network issues on init - #213
Open
CAMOBAP wants to merge 11 commits into
Open
Conversation
CAMOBAP
commented
Mar 20, 2026
Collaborator
- Make error messages clearer when network is offline or interrupted #97
CAMOBAP
force-pushed
the
bugfix/network-issues-on-init
branch
from
March 20, 2026 22:32
b10849d to
c9943c5
Compare
|
Cocoapods size report: |
CAMOBAP
force-pushed
the
bugfix/network-issues-on-init
branch
from
March 21, 2026 20:37
f7ace79 to
ab8cdef
Compare
CAMOBAP
marked this pull request as ready for review
March 21, 2026 20:48
e271828-
reviewed
Mar 23, 2026
…t interference - Clear WKWebsiteDataStore and DispatchQueue.onceTokenStorage between tests - Remove leftover WKWebView subviews in tearDown across all test classes - Replace fragile fixed-delay assertions with XCTNSPredicateExpectation - Fix Rx test__Reset to avoid toBlocking() dispose poisoning manager state - Re-enable HCaptchaWebViewManager__HTML__Tests and HCaptcha_Rx__Tests - Move test-only throttle/debounce/resetOnceTokens out of production code - Rename DispatchQueue+Throttle.swift to DispatchQueue+Once.swift - Reduce test timeouts (CI: 30s/60s/10s, local: 5s/15s/2s)
Record loadingState as .failed even when completion is present, so subsequent validate() calls can detect the failure and reload HTML. Switch mock.html from sessionStorage to document.cookie for loadCount tracking, since sessionStorage resets on each loadHTMLString call.
Use .nonPersistent() data store so the SDK leaves no cookies, localStorage, or cache on the device. Switch mock.html to localStorage for loadCount.
CAMOBAP
force-pushed
the
bugfix/network-issues-on-init
branch
from
March 26, 2026 11:01
75c7f98 to
9de016e
Compare
P1 - Prevent double execute() on didFinishLoading: capture pending completion state before setting loadingState = .loaded so the didSet callback (onDidFinishLoading) cannot trigger a second execute via validate(). P1 - Always transition to .failed on error: handle(error:) now sets loadingState = .failed unconditionally before completing, so a terminated web view is never left in .loaded state where subsequent validate() calls would try JS on a dead process. P2 - Classify navigation errors instead of blanket .networkError: introduce classify(navigationError:) that maps known NSURLErrorDomain connectivity codes to .networkError (eligible for retry) and preserves the original NSError as .unexpected for cancellations and non-network failures, restoring diagnosability.
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.