Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: _$$_REQUIRE(_dependencyMap[22], (...)ationWillShowInForegroundHandler is not a function (it is undefined), js engine: hermes #1657

Closed
2 of 3 tasks
aneena-thomas opened this issue Mar 1, 2024 · 1 comment

Comments

@aneena-thomas
Copy link

aneena-thomas commented Mar 1, 2024

What happened?

Getting error 'TypeError: _$$_REQUIRE(_dependencyMap[22], (...)ationWillShowInForegroundHandler is not a function (it is undefined), js engine: hermes' after updating oneSignal to 5.0.5 in react native 0.73.5

Steps to reproduce?

Just run the app

What did you expect to happen?

Run the app without error

React Native OneSignal SDK version

React Native: 0.73.5 oneSignal: 5.0.6

Which platform(s) are affected?

  • iOS
  • Android

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@nan-li
Copy link
Contributor

nan-li commented Mar 1, 2024

Hi @aneena-thomas,
If you upgraded from v4.x.x of the react-native-onesignal SDK to v5.0.5, this is a major version upgrade with breaking API changes.

The method notificationWillShowInForegroundHandler has been removed. It's equivalent is the foreground will display event listener with OneSignal.Notifications.addEventListener("foregroundWillDisplay", (event) => { ... };)

Please see the migration guide for all available APIs. It serves as less of a migration guide and more of a glossary of all available APIs on v5.x.x of this SDK.

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

No branches or pull requests

3 participants