You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When upgrading to Expo 46 and React Native 0.69.5 the hermesCommand in android/app/build.gradle file broke our Android build. This hermesCommand is in the Migrating to Expo Modules doc.
This issue was masked by expo-updates complaining about 'No launchable update was found', so the app would crash on launch. When I removed expo-updates from the project it was instead throwing the error com.facebook.jni.CppException: Compiling JS failed: Wrong bytecode version. Expected 85 but got 84.
Now that I was able to find this issue, I found this related issue and was able to fix it: facebook/react-native#34114
This happened because the Bare Workflow upgrade notes say to "Apply any relevant changes from the React Native Upgrade Helper" however the stock React Native android/app/build.gradle file does not override the hermesCommand, only Expo's version of android/app/build.gradle does.
Perhaps some kind of 'Expo Upgrade Helper' would be useful, to make it obvious how the supporting files should change, so tweaks like this one don't get missed. It's cumbersome to create fresh projects using create-expo-app and compare the files manually.
Instead of
hermesCommand: new File(["node", "--print", "require.resolve('hermes-engine/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsolutePath() + "/%OS-BIN%/hermesc",
it should be
hermesCommand: new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsolutePath() + "/sdks/hermesc/%OS-BIN%/hermesc",
This is what's now in android/app/build.gradle when you run npx create-expo-app -t bare-minimum.
The text was updated successfully, but these errors were encountered:
ariccio
added a commit
to ariccio/COVID-CO2-tracker
that referenced
this issue
Dec 17, 2022
Deal with bad `hermesCommand`? expo/fyi#86 (comment)
Was getting an error similar to OP, something like `com.facebook.jni.CppException: Compiling JS failed: Wrong bytecode version. Expected 85 but got 84`
When upgrading to Expo 46 and React Native 0.69.5 the
hermesCommand
inandroid/app/build.gradle
file broke our Android build. ThishermesCommand
is in the Migrating to Expo Modules doc.This issue was masked by
expo-updates
complaining about 'No launchable update was found', so the app would crash on launch. When I removedexpo-updates
from the project it was instead throwing the errorcom.facebook.jni.CppException: Compiling JS failed: Wrong bytecode version. Expected 85 but got 84
.Now that I was able to find this issue, I found this related issue and was able to fix it:
facebook/react-native#34114
This happened because the Bare Workflow upgrade notes say to "Apply any relevant changes from the React Native Upgrade Helper" however the stock React Native
android/app/build.gradle
file does not override thehermesCommand
, only Expo's version ofandroid/app/build.gradle
does.Perhaps some kind of 'Expo Upgrade Helper' would be useful, to make it obvious how the supporting files should change, so tweaks like this one don't get missed. It's cumbersome to create fresh projects using
create-expo-app
and compare the files manually.Instead of
it should be
This is what's now in
android/app/build.gradle
when you runnpx create-expo-app -t bare-minimum
.The text was updated successfully, but these errors were encountered: