expo-cli icon indicating copy to clipboard operation
expo-cli copied to clipboard

JavaScript engine configuration is inconsistent between app.config.ts and Android native project

Open lumairink opened this issue 2 years ago • 3 comments

Summary

I'm using expo SDK 44 and I'm trying to publish my project with hermes enabled but I've got the following error:

Error: JavaScript engine configuration is inconsistent between app.config.ts and Android native project.

But I have hermes enabled in both app.json and the Android native project

Screenshot 2022-07-07 165844

A strange thing that happened was when I disabled hermes in the app.json the expo-cli started to identify the hermes in the native project, but of course it gave me an inconsistency error:

Screenshot 2022-07-07 165654

Environment

expo-env-info 1.0.4 environment info: System: OS: Windows 10 10.0.19044 Binaries: Node: 16.13.2 - C:\node\node.EXE Yarn: 1.22.10 - ~\AppData\Roaming\npm\yarn.CMD npm: 8.3.1 - C:\node\npm.CMD SDKs: Android SDK: Android NDK: 22.1.7171670 IDEs: Android Studio: Version 2021.1.0.0 AI-211.7628.21.2111.8092744 npmPackages: expo: ~44.0.6 => 44.0.6 react: 17.0.1 => 17.0.1 react-dom: 17.0.1 => 17.0.1 react-native: 0.64.3 => 0.64.3 react-native-web: 0.17.1 => 0.17.1 Expo Workflow: bare

Please specify your device/emulator/simulator platform, model and version

Emulator Pixel 3 API 29

Error output

Error: JavaScript engine configuration is inconsistent between app.config.ts and Android native project.
Please check the following files for inconsistencies:
  - C:\workspace\app-aprova-brasil\app.config.ts
  - C:\workspace\app-aprova-brasil\android\gradle.properties
  - C:\workspace\app-aprova-brasil\android\app\build.gradle
Learn more: https://expo.fyi/hermes-android-config
    at maybeThrowFromInconsistentEngineAsync (C:\nvm\v16.13.2\node_modules\expo-cli\node_modules\@expo\dev-server\src\HermesBundler.ts:112:11)
    at maybeAddHermesBundleAsync (C:\nvm\v16.13.2\node_modules\expo-cli\node_modules\@expo\dev-server\sdev-server\src\Hermrc\MetroDevServer.ts:214:5)
    at bundleAsync (C:\nvm\v16.13.2\node_modules\expo-cli\node_modules\@expo\dev-server\src\MetroDevSerrc\MetroDevServer.tver.ts:247:26)
    at createBundlesAsync (C:\nvm\v16.13.2\node_modules\expo-cli\node_modules\xdl\src\project\createBunver.ts:247:26)     dlesAsync.ts:100:19)                                                                                   dlesAsync.ts:100:19
    at Object.publishAsync (C:\nvm\v16.13.2\node_modules\expo-cli\node_modules\xdl\src\project\publishAsync.ts:86:19)                                                                                         sync.ts:86:19)     
    at actionAsync (C:\nvm\v16.13.2\node_modules\expo-cli\src\commands\publish\publishAsync.ts:103:18)

Reproducible demo or steps to reproduce from a blank project

  • Create an expo project in bare workflow
  • Enable hermes in both app.json and native project
  • Publish the app (via expo publish)

I don't know if it makes any difference but I have some native UI components using OpenCV in the project.

lumairink avatar Jul 07 '22 20:07 lumairink

did you set this up in your build.gradle? https://github.com/expo/fyi/blob/main/hermes-android-config.md#make-enablehermes-reference-the-expojsengine-gradle-property-in-androidappbuildgradle

brentvatne avatar Jul 07 '22 21:07 brentvatne

@brentvatne Yes. We initialized the project with SDK 44, so this configuration is automatic

lumairink avatar Jul 08 '22 12:07 lumairink

share a link to a minimal github project where this can be reproduced please :)

brentvatne avatar Jul 25 '22 21:07 brentvatne

Hi there! It looks like your issue requires a minimal reproducible example, but it is invalid or absent. Please prepare such an example and share it in a new issue.

The best way to get attention to your issue is to provide a clean and easy way for a developer to reproduce the issue on their own machine. Please do not provide your entire project, or a project with more code than is necessary to reproduce the issue.

A side benefit of going through the process of narrowing down the minimal amount of code needed to reproduce the issue is that you may get lucky and discover that the bug is due to a mistake in your application code that you can quickly fix on your own.

Resources

Common concerns

"I've only been able to reproduce it in private, proprietary code"

You may not have spent enough time narrowing down the root cause of the issue. Try out the techniques discussed in this manual debugging guide to learn how to isolate the problem from the rest of your codebase.

"I didn't have time to create one"

That's understandable, it can take some time to prepare. We ask that you hold off on filing an issue until you are able to fully complete the required fields in the issue template.

"You can reproduce it by yourself by creating a project and following these steps"

This is useful knowledge, but it's still valuable to have the resulting project that is produced from running the steps, where you have verified you can reproduce the issue.

expo-bot avatar Nov 01 '22 19:11 expo-bot