question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[0.61.2] Hermes does not support custom variants

See original GitHub issue

The logic in react.gradle relies on the variant name to contain release in order for Hermes to build properly.

Source 1 Source 2

In my case, I had a variant called staging. In order for hermes to work for me, I had to rename my variant to releasestaging. Instead, we should be able to pass required options in through app/build.gradle, without having to rename the variant.

React Native version:

System: OS: macOS Mojave 10.14.6 CPU: (16) x64 Intel® Core™ i9-9980HK CPU @ 2.40GHz Memory: 2.35 GB / 32.00 GB Shell: 5.3 - /bin/zsh Binaries: Node: 10.18.1 - ~/.nvm/versions/node/v10.18.1/bin/node Yarn: 1.17.3 - /usr/local/bin/yarn npm: 6.13.4 - ~/.nvm/versions/node/v10.18.1/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1 Android SDK: API Levels: 23, 26, 27, 28, 29 Build Tools: 27.0.3, 28.0.3, 29.0.2 System Images: android-28 | Google Play Intel x86 Atom IDEs: Android Studio: 3.5 AI-191.8026.42.35.5791312 Xcode: 11.2.1/11B500 - /usr/bin/xcodebuild npmPackages: react: 16.9.0 => 16.9.0 react-native: 0.61.2 => 0.61.2

Steps To Reproduce

  1. Create new React Native project
  2. Create custom variant that does not include release in its name
  3. Enable hermes
  4. Build to device and see error when launching app:
couldn't find DSO to load: libhermes-executor-debug.so caused by: dlopen failed: cannot locate symbol "_ZTIN8facebook6hermes8debugger13EventObserverE" referenced by "/data/app/com.freeplay-q767SRYD9UinoTtLFqtR4Q==/lib/arm64/libhermes-inspector.so"...

Describe what you expected to happen: Expect to build to device and the app to run successfully with Hermes enabled.

Snack, code example, screenshot, or link to a repository: Example failing android/app/build.gradle. Replacing staging with releasestaging fixes the issue.

Related issue.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
mhorowitzcommented, Jan 22, 2020

The gradle hacks you refer to are also causing issues with hermes and the android gradle plugin v3.5. I’m not a gradle expert (I find their patterns hard to work with), but I think I’ve worked out how to improve this. But, it will take a few weeks for me to get to it. Stay tuned.

1reaction
mhorowitzcommented, Jun 15, 2020

I tried to make this work better, but I wasn’t able to. If someone who is better at gradle than I am can submit a PR to improve this, that would be really helpful.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React native 0.61.5 Crashlytics missing libhermes.so
To solved this problem, I tried to submit multiple version with slightly different android configuration (for instance with and without hermes ...
Read more >
Announcing React Native 0.70
We are excited to release a new version of React Native, 0.70.0. ... Hermes as default engine, and full CMake support for Android...
Read more >
React Native Integration | Hermes
Using a custom Hermes build in a React Native app#. To make Hermes usable in a React Native app we need to perform...
Read more >
react-native-jitsi-meet - Bountysource
For 1 and 3 - I don't use StatusBar at all in this component. As for 2: after JitsiMeet.call(url, userInfo); is called, nothing...
Read more >
The resurrection of a year-old React-Native app | by Peter Quill
React Native application which has not been released for a year with ... in versions for php , node , python and other...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found