Skip to content

fix: handle non-array action/intent-filter in AndroidManifest parsing#415

Merged
elizabit-b merged 3 commits intomainfrom
fix/expo-55-android-manifest-action-array
Apr 9, 2026
Merged

fix: handle non-array action/intent-filter in AndroidManifest parsing#415
elizabit-b merged 3 commits intomainfrom
fix/expo-55-android-manifest-action-array

Conversation

@elizabit-b
Copy link
Copy Markdown
Contributor

Why?

Customers on Expo SDK 55 cannot build Android when using @intercom/intercom-react-native > 9.6.3. The prebuild step crashes with TypeError: f.action?.some is not a function because the @expo/config-plugins XML parser (xml2js) returns a single object instead of an array when an XML element has only one child — and the hasExistingFcmService check assumed both intent-filter and action were always arrays.

How?

Normalize intent-filter and action to arrays using [].concat(value ?? []) before calling .some(), so the check works regardless of whether the XML parser returns a single object or an array. Added two test cases covering both single-object edge cases.

Generated with Claude Code

…sing

XML parsers like xml2js (used by @expo/config-plugins) may return a single
object instead of an array when there is only one child element. The
hasExistingFcmService check assumed action and intent-filter were always
arrays, causing a TypeError on Expo SDK 55 for versions > 9.6.3.

Normalize both fields with [].concat() before calling .some() so the check
works regardless of whether the XML parser returns an object or an array.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@elizabit-b elizabit-b self-assigned this Apr 9, 2026
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@elizabit-b elizabit-b merged commit 80f77aa into main Apr 9, 2026
8 checks passed
@elizabit-b elizabit-b deleted the fix/expo-55-android-manifest-action-array branch April 9, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants