Skip to content

BackHandler.removeEventListener is not a function #81

Description

@hadi-elali

Hey,

I use Expo SDK 53 with hcaptcha and my app gives me the error "Warning: TypeError: _reactNative.BackHandler.removeEventListener is not a function (it is undefined)".

Using chatGPT it suggests that the problem is coming from the following:

The stack trace shows that the offending call to BackHandler.removeEventListener("hardwareBackPress", …) is coming from inside ReactNativeModal (which @hcaptcha/react-native-hcaptcha depends on). In RN 0.71+ (and Expo SDK 48+), BackHandler.removeEventListener no longer exists, so any library that still calls it will blow up.

Are there any updates on this?

Thank you!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions