undefined is not an object (evaluating m.getExponentPushTokenAsync) running Android Standalone APK
See original GitHub issueHi,
My app works nicely running in the exponent client, but the android apk fails at launch with the following error:
undefined is not an object (evaluating m.getExponentPushTokenAsync)
I bootstrapped initially using CRNA, but have modified to look a little more like an Expo project (maybe I’ve missed something!)
My app.json looks like this:
{
"expo": {
"name": "Switch",
"version": "1.0.0",
"sdkVersion": "18.0.0",
"orientation": "portrait",
"icon": "./assets/switch_icon.png",
"slug": "switch",
"privacy": "unlisted",
"primaryColor": "#000000",
"ios": {
"bundleIdentifier": "com.switchapp.switch"
},
"android": {
"package": "com.switchapp.switch"
}
}
}
And my package.json looks like so:
{
"name": "switch",
"version": "0.1.0",
"private": true,
"devDependencies": {
"react-native-scripts": "0.0.40",
"jest-expo": "~18.0.0",
"react-test-renderer": "16.0.0-alpha.12"
},
"main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
"scripts": {
"start": "react-native-scripts start",
"eject": "react-native-scripts eject",
"android": "react-native-scripts android",
"ios": "react-native-scripts ios",
"test": "node node_modules/jest/bin/jest.js --watch"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"aws-sdk": "^2.82.0",
"babili": "^0.1.4",
"base-64": "^0.1.0",
"base64-arraybuffer": "^0.1.5",
"blob-to-buffer": "^1.2.6",
"buffer": "^5.0.6",
"expo": "^18.0.3",
"gnirts": "^1.1.1",
"js-base64": "^2.1.9",
"jwt-decode": "^2.2.0",
"react": "16.0.0-alpha.12",
"react-native": "https://github.com/expo/react-native/archive/sdk-18.0.3.tar.gz",
"react-navigation": "^1.0.0-beta.11",
"react-navigation-is-focused-hoc": "^1.0.0",
"utf8": "^2.1.2"
}
}
Thanks, Jack
Issue Analytics
- State:
- Created 6 years ago
- Comments:23 (7 by maintainers)
Top Results From Across the Web
[SDK 44]Expo application throws TypeError: undefined is not ...
I got this issue after upgrading to the latest Expo SDK 44 the android app didn't open with an error ...
Read more >a module failed to load due to an error and appregistry ...
how to solve TypeError: undefined is not an object (evaluating '_reactNative.Text. ... EAS Build (Android) .apk Crashes, Expo Build .apk Runs Correctly.
Read more >iOS error application on load | OutSystems
The Android apk works fine only iOS having this issue. ... undefined is not an object (evaluating 'e["default"]'). OutsystemsError.JPG.
Read more >react-native-sound/Help - Gitter
i have a problem when install react-native sound to my project, when i import Sound and run project, it throw error: "undefined is...
Read more >null is not an object (evaluating 'RNPurchases ...
Like Marcos mentioned, you'll have to make sure create a development build. This can be done either through EAS or with Xcode /...
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 updated my expo version to 20.1.2 and its work…
@dikaiosune, I’ve got the same issue with sdk 20 on android too. I’ve cleaned all the cache I don’t explicitly use getExponentPushTokenAsync and still get the error:
One thing worth mentioning is that I ejected the project but then converted back. Here are my
exp.json
andpackage.json
.What should I do about it? It really is a stopper since I cannot get inside my app on android.