React-native-onesignal: OneSignal-inAppMessageClicked is not a supported event type for RCTOneSignalEventEmitter

Created on 23 Jul 2019  ·  27Comments  ·  Source: OneSignal/react-native-onesignal

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.

High Priority iOS

Most helpful comment

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

All 27 comments

Loading it from
"react-native-onesignal": "git+https://[email protected]/geektimecoil/react-native-onesignal.git#58064e2",

Works so it was something added recently that broke it

Same issue on 0.60.3

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

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",

same issue

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

Same here

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

ios: 12.4

Same issue

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

ios: 12.2

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

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.

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

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

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

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

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

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.

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

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

I see this both on Android and IOS still

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

@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",

I am having this same issue on iOS

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

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

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

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

@jkasten2 Still happening in 3.3.2

3.4.1 not fire when clicked

@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

Was this page helpful?
0 / 5 - 0 ratings