Hello,
I have switched to bare workflow from the managed one, as some native code was needed. In managed workflow I was using expo build and expo publish for my releases and OTA updates. Now as I have shifted to bare flow I’m using cmd prompt for builds. Everything was working fine, but when I tried to publish OTA update using publish cmd app crashes.
- “expo-updates”: “^0.2.7”
- “expo”: “^37.0.12”
Followed the complete procedure as per docs but unable to resolve the bug.
Error log :
com.facebook.react.common.JavascriptException: Error: The Expo SDK requires Expo to run. It appears the native Expo modules are unavailable and this code is not running on Expo. Visit https://docs.expo.io to learn more about developing an Expo project., stack:
@13:185
v@2:1474
@9:67
v@2:1474
@8:191
v@2:1474
@6:48
v@2:1474
d@2:876
global code@1902:4
at com.facebook.react.modules.core.ExceptionsManagerModule.reportException(ExceptionsManagerModule.java
at java.lang.reflect.Method.invoke (Native Method)
at com.facebook.react.bridge.JavaMethodWrapper.invoke (JavaMethodWrapper.java:371)
at com.facebook.react.bridge.JavaModuleWrapper.invoke (JavaModuleWrapper.java:150)
at com.facebook.react.bridge.queue.NativeRunnable.run (Native Method)
at android.os.Handler.handleCallback (Handler.java:883)
at android.os.Handler.dispatchMessage (Handler.java:100)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage (MessageQueueThreadHandler.java:26)
at android.os.Looper.loop (Looper.java:237)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run (MessageQueueThreadImpl.java:225)
at java.lang.Thread.run (Thread.java:919)
Details about the ejected project:
app.json:
“expo”: {
"packagerOpts": {
"config": "metro.config.js",
"sourceExts": [
"js",
"jsx",
"ts",
"tsx",
"svg"
],
"transformer": "node_modules/react-native-svg-transformer/index.js"
},
"name": "xxx",
"slug": "xxx",
"privacy": "public",
"platforms": [
"ios",
"android",
"web"
],
"sdkVersion": "37.0.0",
"version": "1.0.5",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#B12E21",
"imageStyle": {
"top": 40
}
},
.
.
.
.
"updates": {
"enabled": true,
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
.
.
},
“entryPoint”: “node_modules/expo/AppEntry.js”
},
metro.config.js :
.
.
.
transformer: {
babelTransformerPath: require.resolve('react-native-svg-transformer'),
assetPlugins: ['expo-asset/tools/hashAssetFiles'],
},
.
.
I have tried creating new project but not able to find out the issue.
FYI: I have also gone through