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

OneSignal-inAppMessageClicked is not a supported event type for RCTOneSignalEventEmitter #812

Closed
schlaegerz opened this issue Jul 23, 2019 · 27 comments · Fixed by #818
Closed

Comments

@schlaegerz
Copy link

Screen Shot 2019-07-23 at 10 52 12 AM

Description:
I was using the git version of this repo yesterday and it was working normally, and now when I launch my app I get an error saying inAppMessageClicked is wrong.

I am using react native 0.60.4 on ios and it is all auto linked and everything was working on an earlier version.

@schlaegerz
Copy link
Author

Loading it from
"react-native-onesignal": "git+https://git@github.com/geektimecoil/react-native-onesignal.git#58064e2",

Works so it was something added recently that broke it

@tyIer
Copy link

tyIer commented Jul 23, 2019

Same issue on 0.60.3

@vforvasile
Copy link

Same issue on "react-native-onesignal": "^3.2.14" and RN 0.59.9

@danishyousufzai
Copy link

Same issue with me app working fine in android but when i open app in ios it showing above error

"react-native-onesignal": "^3.3.0",
"react-native": "0.59.5",

@ishaq-aym
Copy link

same issue

@JorgeMoV
Copy link

Same issue
"react-native-onesignal": "^3.3.0",
"react-native": "0.60.4",

@sejas
Copy link

sejas commented Jul 24, 2019

Same here

"react-native-onesignal": "^3.2.14",
"react-native": "0.59.9",

ios: 12.4

@MorgadoKnivet
Copy link

Same issue

"react-native-onesignal": "^3.3.0",
"react-native": "0.59.4",

ios: 12.2

@sejas
Copy link

sejas commented Jul 24, 2019

It has fixed itself.
I've installed the version 12.2 in XCode and now it is working in the simulator with iOS 12.4 🤷🏻‍♂️

Captura de pantalla 2019-07-24 a las 14 09 30

Captura de pantalla 2019-07-24 a las 14 07 42

@JorgeMoV
Copy link

JorgeMoV commented Jul 24, 2019

I'm going to try tomorrow what @sejas has indicated.

Currently I have found a temporary solution that allows the execution to continue without this error occurring. I explain the solution in case someone needs an urgent solution to continue working with the project until the problem is resolved.

This is what worked for me temporarily:
· Install "react-native-onesignal": "^ 3.0.9" and link.
· Install react-native-community/netinfo and link (if you don't have yet this component).
· Modify the file /node_modules/react-native-onesignal/index.js by changing the following line: import {NativeModules, NativeAppEventEmitter, NetInfo, Platform} from 'react-native';
For this:

import { NativeModules, NativeAppEventEmitter, Platform } from 'react-native';
import NetInfo from "@react-native-community/netinfo";

This apparently has worked and avoids the problems, however I cannot 100% assure it because I am working on an unstable project that has other problems in other components.

This worked to me with "react-native": "0.60.4".

I hope it helps you as a temporary solution but remember update when the problem has been resolved in the latest version of react-native-onesignal.

@MorgadoKnivet
Copy link

MorgadoKnivet commented Jul 24, 2019

The solution suggested by @sejas don't work for me.

"react-native-onesignal": "^3.3.0",
"react-native": "0.59.4",

@santiagomartinez
Copy link

@JorgeMoV solution worked for me but just like he said I don't know if this is a good solution.

@patrickclancy
Copy link

The solution suggested by @sejas did not work for me. I'll have to try @JorgeMoV suggested work around.

@patrickclancy
Copy link

The solution suggested by @JorgeMoV did Not work for me.

@JorgeMoV
Copy link

The solution suggested by @JorgeMoV did Not work for me.

I forgot to detail that you had to install the netInfo component in case you don't have it. If this component is not installed, an error related to this componente will occur when following my instructions.

I have edited my previous comment indicating this information and linking the netinfo component, if you want, review the previous comment and try it, I think it will work for you.

@patrickclancy
Copy link

patrickclancy commented Jul 24, 2019

@JorgeMoV when I read your solution I realized that and installed netInfo. Thanks for following up!!! It still didn't work for me...

@amadeu01
Copy link
Contributor

I did a PR which should prevent the app from crashing, however the event does not exist in iOS.
This method exists only in Android -> initInAppMessageClickHandlerParams

@FrenchBully
Copy link

I see this both on Android and IOS still

@amadeu01
Copy link
Contributor

I haven't face this issue in Android, only iOS @FrenchBully

@MorgadoKnivet
Copy link

MorgadoKnivet commented Jul 24, 2019

@amadeu01 , how i update my app? Because i installed and linked the package and ios don't work

"react-native-onesignal": "^3.3.0",
"react-native": "0.59.4",

@owenhope
Copy link

owenhope commented Jul 24, 2019

I am having this same issue on iOS

"react-native-onesignal": "^3.3.0",

@amadeu01
Copy link
Contributor

@MorgadoKnivet my PR has to be accepted. So, for now we have to wait the maintainers

@amadeu01
Copy link
Contributor

@rgomezp Could you ask for someone from OneSignal review my PR?

@jkasten2
Copy link
Member

Just to close out this issue with a reference, this is now fixed in version 3.3.1

@yaronlevi
Copy link

@jkasten2 Still happening in 3.3.2

@alive-vietnam-ti
Copy link

3.4.1 not fire when clicked

@rgomezp
Copy link
Contributor

rgomezp commented Oct 10, 2019

@yaronlevi , please update to the latest version

@alivevietnam , this sounds like a different issue. perhaps open a new Github issue with further details/repro steps

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.