Skip to content

fix(android): prevent crash when accessibility callback fires early#11061

Merged
NathanWalker merged 1 commit intoNativeScript:mainfrom
pichurichko:fix/a11y-shared-observable-null
Jan 31, 2026
Merged

fix(android): prevent crash when accessibility callback fires early#11061
NathanWalker merged 1 commit intoNativeScript:mainfrom
pichurichko:fix/a11y-shared-observable-null

Conversation

@pichurichko
Copy link
Contributor

What is the current behavior?

In some startup/teardown timing scenarios, Android accessibility callbacks can invoke updateAccessibilityState() when sharedA11YObservable is not initialized, causing a crash on .set(...).

What is the new behavior?

Adds a defensive guard in updateAccessibilityState() to no-op when sharedA11YObservable is not available.

Fixes #11049

@NathanWalker NathanWalker merged commit 88c5cf0 into NativeScript:main Jan 31, 2026
1 check passed
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.

Android crash in Google automated tests: onAccessibilityStateChanged: Cannot read properties of null (reading 'set')

2 participants