Repository navigation
[Google3 Bug]: NullPointerException on AccessibilityBridge #180381
Copy link
Copy link
Closed
Labels
a: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)Accessibility, e.g. VoiceOver or TalkBack. (aka a11y)a: productionIssues experienced in live production appsIssues experienced in live production appsc: crashStack traces logged to the consoleStack traces logged to the consolec: datalossCan result in the user losing their stateCan result in the user losing their statecustomer: googleVarious Google teamsVarious Google teamsengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.needs repro infoAutomated crash report whose cause isn't yet knownAutomated crash report whose cause isn't yet knownplatform-androidAndroid applications specificallyAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-accessibilityOwned by Framework Accessibility team (i.e. responsible for accessibility code in flutter/flutter)Owned by Framework Accessibility team (i.e. responsible for accessibility code in flutter/flutter)
Description
Help us understand the severity of this issue
- causing severe production issues e.g. malfunctions or data loss
- blocking next binary release
- blocking a client feature launch within a quarter
- nice-to-have but does not block a launch within the next quarter
Steps to reproduce
We haven't found a way to reproduce it yet.
Expected results
No crash.
Actual results
There are crashes: b/464096258
Code sample
On file AccessibilityBridge.java, in line 992, there is a recent change:
assert embeddedView != null;
// The embedded view is initially marked as not important at creation in the platform
// view controller, so we must explicitly mark it as important here.
embeddedView.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_AUTO);Note, the assert is usually ignored in production build. Here we should do an if condition check, just like other places, for example, line 1643 and line 2031.
I suggest the code to be:
if (embeddedView != null) {
// The embedded view is initially marked as not important at creation in the platform
// view controller, so we must explicitly mark it as important here.
embeddedView.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_AUTO);
result.addChild(embeddedView);
}Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]Flutter Doctor output
NA.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
a: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)Accessibility, e.g. VoiceOver or TalkBack. (aka a11y)a: productionIssues experienced in live production appsIssues experienced in live production appsc: crashStack traces logged to the consoleStack traces logged to the consolec: datalossCan result in the user losing their stateCan result in the user losing their statecustomer: googleVarious Google teamsVarious Google teamsengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.needs repro infoAutomated crash report whose cause isn't yet knownAutomated crash report whose cause isn't yet knownplatform-androidAndroid applications specificallyAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-accessibilityOwned by Framework Accessibility team (i.e. responsible for accessibility code in flutter/flutter)Owned by Framework Accessibility team (i.e. responsible for accessibility code in flutter/flutter)
Activity
deminearchiver commentedon Jan 2, 2026
Hello! I think this issue is related to #179922, which has a little more context.
1e0ng commentedon Jan 5, 2026
Yes, @deminearchiver it looks they are related.
Add a null check for embedded view being added to accessibility tree (#…
Add a null check for embedded view being added to accessibility tree (f…
Add a null check for embedded view being added to accessibility tree (f…
gmackall commentedon Jan 6, 2026
This should have been fixed by #180539. Please let me know if you experience otherwise. Also will cherry pick the fix to beta/stable.
[CP-stable]Add a null check for embedded view being added to accessib…
github-actions commentedon Jan 22, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.Add a null check for embedded view being added to accessibility tree …