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

Expo: Issue with RNOneSignal.setAppId #1220

Closed
isidor99 opened this issue May 17, 2021 · 4 comments · Fixed by #1226
Closed

Expo: Issue with RNOneSignal.setAppId #1220

isidor99 opened this issue May 17, 2021 · 4 comments · Fixed by #1226

Comments

@isidor99
Copy link

isidor99 commented May 17, 2021

Hi, I am creating an app using Expo bare workflow. I installed this library following documentation and now I constantly get this warning:
[Unhandled promise rejection: TypeError: null is not an object (evaluating 'RNOneSignal.setAppId')]

I tried to reinstall library, created new Onesignal app, created new Firebase app with new server key, but nothing helped me. Does anyone know why this happens?

I created new empty expo bare workflow project and installed this library following official OneSignal documentation and still getting the same issues.

@MAhtishamShahzad
Copy link

same error

@riyaztechuz
Copy link

I'm Facing the same issue

@rgomezp
Copy link
Contributor

rgomezp commented May 24, 2021

Howdy,
To everyone in this thread, please comment whether you are using Expo bare workflow as well.

I looked into this a bit and did manage to reproduce the issue. It seems that RNOneSignal is undefined at this line here.

I'm not too familiar with Bare workflow but from a quick search it seems like you may need to install something called unimodules: https://docs.expo.io/bare/installing-unimodules/

Please make sure you have those installed as well.

Cheers

@isidor99
Copy link
Author

The problem was in running the application. When I start app with expo start there is that warning, and OneSignal can't see subscribed user. However, when I start app with npx react-native run-android everything works just fine.

@rgomezp rgomezp mentioned this issue May 25, 2021
@rgomezp rgomezp changed the title Issue with RNOneSignal.setAppId Expo: Issue with RNOneSignal.setAppId May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants