Skip to content

fix(capacitor): don't hard-kill the app on load() config errors (FR-25948)#95

Merged
dianaKhortiuk-frontegg merged 1 commit into
masterfrom
fix/cap-no-hard-kill-on-config-error
Jul 22, 2026
Merged

fix(capacitor): don't hard-kill the app on load() config errors (FR-25948)#95
dianaKhortiuk-frontegg merged 1 commit into
masterfrom
fix/cap-no-hard-kill-on-config-error

Conversation

@dianaKhortiuk-frontegg

Copy link
Copy Markdown
Collaborator

FR-25948 — load() hard-kills the app on config errors

On missing/invalid config, load() terminated the process: iOS called exit(1) (FronteggNativePlugin.swift ~53, ~80), Android threw RuntimeException (~87, ~117). Both crash the app instead of surfacing a recoverable error.

Fix

load() is a Capacitor lifecycle method with no CAPPluginCall/PluginCall to 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.

…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.
@dianaKhortiuk-frontegg
dianaKhortiuk-frontegg merged commit 1772f12 into master Jul 22, 2026
1 check passed
@dianaKhortiuk-frontegg
dianaKhortiuk-frontegg deleted the fix/cap-no-hard-kill-on-config-error branch July 22, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant