react-native-onesignal icon indicating copy to clipboard operation
react-native-onesignal copied to clipboard

OneSignal-inAppMessageClicked is not a supported event type for RCTOneSignalEventEmitter

Open schlaegerz opened this issue 7 years ago • 27 comments

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 avatar Jul 23 '19 17:07 schlaegerz

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

schlaegerz avatar Jul 23 '19 18:07 schlaegerz

Same issue on 0.60.3

tyIer avatar Jul 23 '19 20:07 tyIer

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

vforvasile avatar Jul 24 '19 08:07 vforvasile

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

danishyousufzai avatar Jul 24 '19 08:07 danishyousufzai

same issue

ishaq-aym avatar Jul 24 '19 09:07 ishaq-aym

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

JorgeMoV avatar Jul 24 '19 10:07 JorgeMoV

Same here

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

ios: 12.4

sejas avatar Jul 24 '19 11:07 sejas

Same issue

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

ios: 12.2

MorgadoKnivet avatar Jul 24 '19 13:07 MorgadoKnivet

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

sejas avatar Jul 24 '19 13:07 sejas

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.

JorgeMoV avatar Jul 24 '19 16:07 JorgeMoV

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

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

MorgadoKnivet avatar Jul 24 '19 17:07 MorgadoKnivet

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

santiagomartinez avatar Jul 24 '19 17:07 santiagomartinez

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

patrickclancy avatar Jul 24 '19 18:07 patrickclancy

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

patrickclancy avatar Jul 24 '19 18:07 patrickclancy

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 avatar Jul 24 '19 18:07 JorgeMoV

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

patrickclancy avatar Jul 24 '19 19:07 patrickclancy

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

amadeu01 avatar Jul 24 '19 20:07 amadeu01

I see this both on Android and IOS still

FrenchBully avatar Jul 24 '19 21:07 FrenchBully

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

amadeu01 avatar Jul 24 '19 21:07 amadeu01

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

MorgadoKnivet avatar Jul 24 '19 21:07 MorgadoKnivet