Amplitude-ReactNative
Amplitude-ReactNative copied to clipboard
TypeError: Cannot read property 'setLibraryName' of null, js engine: hermes
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?
Hi @borijuyeong, which amplitude react-native versions are you using? And what's the version of your react-native?
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
Running into the same issue!
Version
@amplitude/react-native: 2.5.0 react-native: 0.63.4
Any of you solved this?
nope, not yet
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.
Same issue with version 2.7.0.
Any workaround?
"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?
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?
@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
the same issue is it fixed
Hi @minaairsupport, did you install the pods in ios folder?
I am using Expo, should I install the pods ?
Any solution? Im also using Expo and couldn't make it work
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.