fix(capacitor): don't hard-kill the app on load() config errors (FR-25948)#95
Merged
dianaKhortiuk-frontegg merged 1 commit intoJul 22, 2026
Merged
Conversation
…5948) load() terminated the process on missing/invalid config — iOS called exit(1), Android threw RuntimeException — instead of surfacing a recoverable error. Both now log the misconfiguration and return early (abort initialization) rather than killing the app; subsequent JS calls surface the error instead of a crash.
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.
FR-25948 —
load()hard-kills the app on config errorsOn missing/invalid config,
load()terminated the process: iOS calledexit(1)(FronteggNativePlugin.swift~53, ~80), Android threwRuntimeException(~87, ~117). Both crash the app instead of surfacing a recoverable error.Fix
load()is a Capacitor lifecycle method with noCAPPluginCall/PluginCallto reject, so it can't return a rejected promise directly. Instead of terminating the process, both platforms now log the misconfiguration and return early (abort initialization). The app stays alive; subsequent JS calls surface the error rather than a hard crash.Note
iOS via
swiftc -parse; Android/Java reviewed (no unit-test harness in this repo). Please let CI / device builds confirm.