Amplitude-ReactNative icon indicating copy to clipboard operation
Amplitude-ReactNative copied to clipboard

TypeError: Cannot read property 'setLibraryName' of null, js engine: hermes

Open borijuyeong opened this issue 3 years ago • 15 comments

Screen Shot 2021-09-23 at 6 09 41 PM

I am junior developer using amplitude react-native. Ios works fine but when I try to build android, it shows this error.

Can anyone give me some help?

borijuyeong avatar Sep 23 '21 09:09 borijuyeong

Hi @borijuyeong, which amplitude react-native versions are you using? And what's the version of your react-native?

yuhao900914 avatar Sep 23 '21 16:09 yuhao900914

I'm having similar issue, too. It happens when I call Amplitude.getInstance();

Version

  • @amplitude/react-native: 2.5.0
  • react-native: 0.63.4

Screenshot

Screenshot_1632896746

dongjinBaek avatar Sep 29 '21 06:09 dongjinBaek

Running into the same issue!

Version

@amplitude/react-native: 2.5.0 react-native: 0.63.4

zeeberry avatar Oct 26 '21 20:10 zeeberry

Any of you solved this?

cesarribeirobdevima avatar Nov 17 '21 22:11 cesarribeirobdevima

nope, not yet

zeeberry avatar Nov 18 '21 00:11 zeeberry

Run into same error today after installing RN amplitude package. Re-install my app using react-native run-android after npm install @amplitude/react-native@latest solved the issue for me.

khanisak avatar Dec 29 '21 08:12 khanisak

Same issue with version 2.7.0.

Any workaround?

gyl89 avatar Feb 02 '22 16:02 gyl89

"react-native": "0.65.1",
"@amplitude/react-native": "2.7.0",

Android and iOS — no issue (both Hermes)

@borijuyeong could you provide a piece of code where you use Amplitude?

vasylnahuliak avatar Feb 08 '22 15:02 vasylnahuliak

I use Hermes by following this docs.

I tried with react-native 0.63.4 & 0.66.1 with "@amplitude/react-native": "2.3.2", "@amplitude/react-native": "2.5.0". However I'm not able to reproduce this issue.

Could you provide an example app in order to reproduce this issue?

yuhao900914 avatar Feb 10 '22 08:02 yuhao900914

@borijuyeong I get this error if I forgot to install pods after installing @amplitude/react-native package. Also after that need npm run ios for building ios dependencies.

FYI: For installing pods needs in terminal run bundle exec pod install in ios folder

vasylnahuliak avatar Feb 10 '22 19:02 vasylnahuliak

the same issue is it fixed

minaairsupport avatar Jul 24 '22 15:07 minaairsupport

Hi @minaairsupport, did you install the pods in ios folder?

yuhao900914 avatar Jul 25 '22 06:07 yuhao900914

I am using Expo, should I install the pods ?

minaairsupport avatar Jul 25 '22 17:07 minaairsupport

Any solution? Im also using Expo and couldn't make it work

Lucilamrossi avatar Aug 09 '22 19:08 Lucilamrossi

This amplitude-ReactNative doesn't support EXPO. However, we have a new ReactNative SDK. It supports React Native Web, Reacts Native Android, React Native iOS, and compatibility with Expo. It also supports custom plugins and has built-in type definitions. Please check here. https://github.com/amplitude/Amplitude-ReactNative/issues/138 I will provide a document for migration soon. Thanks.

yuhao900914 avatar Aug 19 '22 23:08 yuhao900914