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

[question]: #158

Closed
1 task done
proton1k opened this issue Jan 28, 2023 · 1 comment
Closed
1 task done

[question]: #158

proton1k opened this issue Jan 28, 2023 · 1 comment

Comments

@proton1k
Copy link

proton1k commented Jan 28, 2023

How can we help?

Hello, I've posted this question here: OneSignal/react-native-onesignal#1482 I am nit 100% sure which project it belongs.

How can we help?

Hello! I’ve been trying to connect OneSignal by following the tutorial for Expo app, but I can't get the new subscriber. Here is the tutorial I followed: https://documentation.onesignal.com/docs/react-native-expo-sdk-setup . I also checked github threads:

There's a sample code I took from this Logrocket article: https://blog.logrocket.com/implement-push-notifications-react-native-onesignal/ (signal app ID different of course)
On the OneSignal page I see a button to "check subscribed users" and the warning below shows

You have X total subscribed users for this app, but none specifically for the Google Android (FCM) platform. You need at least one subscribed user specifically for Google Android (FCM) to continue."

I see in build logs:

ERROR Could not load RNOneSignal native module. Make sure native dependencies are properly linked.

And it sends me back to the expo's developed plugin called "onesignal-expo-plugin" which has to do that linking for Expo version 46 or below (I have 46).
Things were checked:

  • app.json is correct
  • cache cleaned and regenerated the prebuild
  • packages installed and present in the node_modules folder

So what may have gone wrong here?

OneSignal Expo SDK version

"onesignal-expo-plugin": "^1.3.0"
"react-native-onesignal": "^4.5.0"

Platform

MacOS M1 Ventura 13.0.1 (22A400)

Relevant log output

> Logs for your project will appear below. Press Ctrl+C to exit.
> Android Bundling complete 3708ms
>  ERROR  Could not load RNOneSignal native module. Make sure native dependencies are properly linked.
>  ERROR  Could not load RNOneSignal native module. Make sure native dependencies are properly linked.
>  ERROR  Could not load RNOneSignal native module. Make sure native dependencies are properly linked.
>  ERROR  Could not load RNOneSignal native module. Make sure native dependencies are properly linked.
>  ERROR  Could not load RNOneSignal native module. Make sure native dependencies are properly linked.

Code of Conduct

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

Hi @proton1k! I suspect you are trying to run your app in the Expo Go environment which is unfortunately not a supported environment due to OneSignal depending on a native module. Please make sure you are building and running in one of the supported environments:

The Expo run commands (expo run:[android|ios])
Custom clients
EAS Build

Thanks!

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

2 participants