What happened?
On production 2.3.1 (build 184), Play Vitals reports 1 ANR (1 user, 1 event) with stack:
Input dispatching timed out
at kotlin.text.Regex.matches (Regex.kt:108)
at to.bitkit.ui.settings.advanced.ElectrumConfigViewModel.isValidURL (ElectrumConfigViewModel.kt:209)
at to.bitkit.ui.settings.advanced.ElectrumConfigViewModel.validateInput (ElectrumConfigViewModel.kt:189)
at to.bitkit.ui.settings.advanced.ElectrumConfigViewModel$onClickConnect$1.invokeSuspend (ElectrumConfigViewModel.kt:249)
at to.bitkit.ui.settings.advanced.ElectrumConfigViewModel.onClickConnect (ElectrumConfigViewModel.kt:248)
User tapped Connect on the Electrum server settings screen. URL validation runs a hostname Regex.matches() call via ICU native matcher (libicui18n.so), blocking the main thread long enough to trigger an ANR.
Expected behavior
Tapping Connect should validate host/port quickly and either show a validation toast or proceed to connect — without freezing the UI.
Steps to Reproduce
- Open Settings → Advanced → Electrum server (custom server config).
- Enter a host string that may stress the hostname regex (exact production input unknown; likely long/malformed host before port).
- Tap Connect.
- UI hangs; ANR dialog may appear.
Code path: onClickConnect() → viewModelScope.launch (Main) → validateInput() → isValidURL() → hostname.matches(Regex(...)) at line 209.
Likely fix direction: move validation off main thread and/or replace regex with URI parsing (see RgsServerViewModel.isValidURL pattern).
Logs / Screenshots / Recordings
- Play Vitals screenshot (2026-07-13 weekly report)
- Stack trace above (Play Console ANR details)
Bitkit Version
2.3.1 (build 184) — production mainnet
Device / OS
Motorola moto g - 2025, Android 16 (SDK 36). Occurred ~4 days before report (Play Vitals sample).
Reproducibility
Rarely (once or twice) — 1 user / 1 event on 2.3.1 since Jun 29 rollout.
Additional context
What happened?
On production 2.3.1 (build 184), Play Vitals reports 1 ANR (1 user, 1 event) with stack:
User tapped Connect on the Electrum server settings screen. URL validation runs a hostname
Regex.matches()call via ICU native matcher (libicui18n.so), blocking the main thread long enough to trigger an ANR.Expected behavior
Tapping Connect should validate host/port quickly and either show a validation toast or proceed to connect — without freezing the UI.
Steps to Reproduce
Code path:
onClickConnect()→viewModelScope.launch(Main) →validateInput()→isValidURL()→hostname.matches(Regex(...))at line 209.Likely fix direction: move validation off main thread and/or replace regex with
URIparsing (seeRgsServerViewModel.isValidURLpattern).Logs / Screenshots / Recordings
Bitkit Version
2.3.1 (build 184) — production mainnet
Device / OS
Motorola moto g - 2025, Android 16 (SDK 36). Occurred ~4 days before report (Play Vitals sample).
Reproducibility
Rarely (once or twice) — 1 user / 1 event on 2.3.1 since Jun 29 rollout.
Additional context
listBalances/listPeersANRs) and [Bug]: CoreService$init$1.invokeSuspend — UniFFI API checksum mismatch (bitkit-core, Play 2.2.0) #983 (CoreService init) not seen on 2.3.1 this week.