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

[Bug]: OneSignal is undefined and ERROR TypeError: undefined is not a function (near '..._reactNativeOnesignal.default.init...') #1436

Closed
3 tasks done
adamchenwei opened this issue Sep 29, 2022 · 2 comments

Comments

@adamchenwei
Copy link

adamchenwei commented Sep 29, 2022

What happened?

I followed all the steps to setup OneSignal React Native SDK according to https://documentation.onesignal.com/v7.0/docs/react-native-sdk-setup

But I can't get it running. when I load the app with the example code in the setup guide, I got this error

Screen Shot 2022-09-29 at 4 45 51 PM

Steps to reproduce?

1. follow https://documentation.onesignal.com/v7.0/docs/react-native-sdk-setup setup iOS & Android onesignal configs
2. start an app with ios emulator
3. observe error on ios emulator

node v 14.19.3
react-native-cli: 2.0.1
react-native: 0.68.2

What did you expect to happen?

no error

React Native OneSignal SDK version

4.4.1

Which platform(s) are affected?

  • iOS
  • Android

Relevant log output

ERROR  TypeError: undefined is not a function (near '..._reactNativeOnesignal.default.init...')

This error is located at:
    in App
    in RCTView (created by View)
    in View (created by AppContainer)
    in RCTView (created by View)
    in View (created by AppContainer)
    in AppContainer
    in rnPatientPortalUi(RootComponent)
 ERROR  TypeError: undefined is not a function (near '..._reactNativeOnesignal.default.init...')

This error is located at:
    in App
    in RCTView (created by View)
    in View (created by AppContainer)
    in RCTView (created by View)
    in View (created by AppContainer)
    in AppContainer
    in rnPatientPortalUi(RootComponent)

Code of Conduct

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

Hi @adamchenwei I see you are on our latest react-native SDK version 4.4.1 but the setup guide you linked is from an older release.

Can you please confirm that you are following the setup steps for our current major release?

Thanks!

@jennantilla
Copy link
Contributor

Closing due to no response.

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

No branches or pull requests

2 participants