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]: #899

Closed
3 tasks done
jtejederabit opened this issue Jul 19, 2023 · 2 comments
Closed
3 tasks done

[Bug]: #899

jtejederabit opened this issue Jul 19, 2023 · 2 comments

Comments

@jtejederabit
Copy link

jtejederabit commented Jul 19, 2023

What happened?

Using React + Capacitor fails on OneSignal init. I have been using it on a Vue project (not this package, the one related to Vue) and now I want to follow the same approach/logic within a React + Capacitor app. I've been following the official documentation, online examples and Youtube videos but in my case is not working.

  • "@capacitor/core": "^5.2.1",
  • "onesignal-cordova-plugin": "^3.3.1"
import OneSignal from 'onesignal-cordova-plugin';
function App() {
    const OneSignalInit = () => {
        OneSignal.setAppId(XXXXXXX);
    }

    OneSignalInit();

    return ( <h1>Hello</>);
}

When I run the app, it crash and in console log I can see the next error:
image

Steps to reproduce?

1. Install React + Capacitor + onesignal plugin
2. Create a simple react app and add Capacitor.
3. Copy code example and run the app

What did you expect to happen?

I expected the app to run normally and initialize Onesignal plugin as described in docs.

OneSignal Cordova SDK version

3.3.1

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
@emawby
Copy link
Contributor

emawby commented Nov 3, 2023

@jtejederabit Hello I apologize for the late response is this still an issue with the latest version?

@jennantilla
Copy link
Contributor

Closing due to no response. Feel free to comment here if this is still an issue for you!

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