[expo-branch] null is not an object (evaluating RNBranch.STANDARD_EVENT_ADD_TO_CART
See original GitHub issue🐛 Bug Report
Environment
This bug happens in Android
Expo CLI 3.0.9 environment info:
System:
OS: macOS 10.14.6
Shell: 5.3 - /bin/zsh
Binaries:
Node: 10.16.0 - ~/.nvm/versions/node/v10.16.0/bin/node
Yarn: 1.17.3 - /usr/local/bin/yarn
npm: 6.9.2 - ~/.nvm/versions/node/v10.16.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5522156
Xcode: 10.3/10G8 - /usr/bin/xcodebuild
npmPackages:
expo: ^34.0.1 => 34.0.4
react: 16.8.3 => 16.8.3
react-native: https://github.com/expo/react-native/archive/sdk-34.0.0.tar.gz => 0.59.8
npmGlobalPackages:
expo-cli: 3.0.9
Steps to Reproduce
import * as whatever from 'expo-branch'
OR
import whatever from 'expo-branch'
OR
import { Branch } from 'expo-branch'
npm start
- Scan QR code on Expo on Android app
- See red screen of death:
Expected Behavior
It does not break.
Actual Behavior
It breaks.
Reproducible Demo
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:50 (20 by maintainers)
Top Results From Across the Web
Expo Branch: undefined is not an object (evaluating ...
I am using expo for my react native application. Steps: - run expo start. Hit the error below on android studio emulator. Working...
Read more >Can anybody help me with branch.io integration in Expo?
When I run the app via expo client, I get this error : null is not an object (evaluating RNBranch.STANDARD_EVENT_ADD_TO_CART.
Read more >Expo: Uncaught Error: Undefined Is Not An Object (Evaluating ...
Error: null is not an object evaluating RNBranch.STANDARDEVENTADDTOCART import Branch { BranchEvent } from expobranch;. Expected Behavior. It does not break ...
Read more >A brand new website interface for an even better experience!
null is not an object (evaluating 'RNBranch.STANDARD_EVENT_ADD_TO_CART')
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m stuck with the same problem.
I’m trying with SDK 35 and still getting that error on IOS and Android. The error happens importing as
and
I read about the Android support here, and followed this instructions.
error:
null is not an object (evaluating 'RNBranch.STANDARD_EVENT_ADD_TO_CART')
i’m missing something?
Also, for those interested, I’ve ended up handling it this way:
and then
import Branch from 'my-branch'
. The above code would obviously need to mock all functions called by your code.