fix(core): preserve background start failures - #2326
Draft
LiuLin1220 wants to merge 1 commit into
Draft
Conversation
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
failed to start background corebackgroundCoreNotAvailablewhile retaining unexpected Core errors verbatimThe change is limited to App-side error propagation and connection state recovery. It does not change Core configuration generation, retry behavior, platform permissions, or service setup.
Why
Different Core startup failures currently collapse into the same dialog, even though the original
GrpcErrorcontains the actionable cause. The catch path also returns before explicitly publishing a stopped status.During Windows integration testing, the hidden error was:
That Core configuration bug is addressed separately by hiddify/hiddify-core#146. Existing reports such as #2276, #2290, and #2291 demonstrate that the same generic App message also hides unrelated permission and platform failures; this PR improves their diagnostics but does not claim to fix each underlying cause.
Testing
flutter test --no-pub test/hiddifycore/core_start_failure_test.dart(3 tests)flutter test --no-pub(28 tests on this standalone branch)flutter analyze --no-pub(reports the repository baseline plus the existingflutter_testdependency info for the new test; no new production error)The combined Windows artifact also passed a real generated-config startup smoke test and an HTTP 204 request through the resulting local proxy.