Skip to content

[Android] native module fails to initialize for some users #78

@jinjinwang02

Description

@jinjinwang02

Firstly thanks for creating this great package!

We're seeing this error in production for a small number of Android users:

Error: Failed to load Wallet module, make sure to link @expensify/react-native-wallet correctly

We patched the library to log the actual native error and found:

android.content.ActivityNotFoundException
    at com.expensify.wallet.WalletModule.<init>(WalletModule.kt:49)

It appears the module initialization throws ActivityNotFoundException when Google Wallet is not installed on the device.

Expected behavior:

The module should initialize successfully and checkWalletAvailability() should return false for devices without Google Wallet.

Actual behavior:

The module fails to load entirely, causing TurboModuleRegistry.getEnforcing('RNWallet') to throw. This means Wallet is undefined and all wallet functions reject with the linking error.

Package version: 0.1.21

Many thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions