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]: App crashes in iOS dev mode, but works fine in release builds and Android dev mode. #1733

Open
2 of 3 tasks
sharad-incapsulate opened this issue Aug 22, 2024 · 1 comment

Comments

@sharad-incapsulate
Copy link

sharad-incapsulate commented Aug 22, 2024

What happened?

Using "react-native-onesignal": "^5.2.2" with "expo": "~51.0.26", the app works fine in all modes but only fails in iOS dev mode.

Steps to reproduce?

- Installed the package of react-native-onesignal on the expo managed project.
- Done the setup as per documentation.
- When build is complete in local app crashed with following error in iOS

What did you expect to happen?

The app should not crash it should work as expected without any crash.

React Native OneSignal SDK version

5.2.2

Which platform(s) are affected?

  • iOS
  • Android

Relevant log output

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
 ERROR  Invariant Violation: Your JavaScript code tried to access a native module that doesn't exist. 

If you're trying to use a module that is not supported in Expo Go, you need to create a development build of your app. See https://docs.expo.dev/development/introduction/ for more info., js engine: hermes
 ERROR  Invariant Violation: "main" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called., js engine: hermes

Code of Conduct

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

Hi there @sharad-incapsulate apologies for the delay in getting back to you.

Is this still an issue? If so, a quick clarifying question--are you using Expo Go? If so, you will not be able to run on Expo Go since it doesn't come with the native dependencies required by OneSignal.

Apologies for the inconvenience here, please let us know if you have any other questions or if you have any difficulties building outside of Expo Go.

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