Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:app:bundleReleaseJsAndAssets hangs forever on Hermes #27057

Closed
MarekPawlowskiGelato opened this issue Oct 30, 2019 · 6 comments
Closed

:app:bundleReleaseJsAndAssets hangs forever on Hermes #27057

MarekPawlowskiGelato opened this issue Oct 30, 2019 · 6 comments
Labels
Bug Stale There has been a lack of activity on this issue and it may be closed soon. Tech: Bundler 📦 This issue is related to the bundler (Metro, Haul, etc) used.

Comments

@MarekPawlowskiGelato
Copy link

react-native run-android --variant=release hangs forever on :app:bundleReleaseJsAndAssets.

After brief debugging it seems it hangs on hermes command:
../../node_modules/hermes-engine/osx-bin/hermes -emit-binary -out /Users/marekpawlowski/Workspace/my-app/android/app/build/generated/assets/react/staging/release/index.android.bundle.hbc /Users/marekpawlowski/Workspace/my-app/android/app/build/generated/assets/react/staging/release/index.android.bundle -O -output-source-map

It throws a lot of warnings like this:
/Users/marekpawlowski/Workspace/my-app/android/app/build/generated/assets/react/staging/release/index.android.bundle:28:134: warning: the variable "Promise" was not declared in function "isBoldTextEnabled" ...)(r(d[1])),t=r(d[2]),o=r(d[3]),s=new Map,c={isBoldTextEnabled:function(){return Promise.resolve(!1)},isGrayscaleEnabled:function(){return Promise.resolve(!1)},isInver... ^~~~~~~
and hangs... forever.

I've have played a little bit with this command and it seems that removing the last two args -O -output-source-map makes it working. (it still throws a lot of warning but it is not hanging)

React Native version:
System:
OS: macOS 10.14.6
CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
Memory: 5.05 GB / 32.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.6.0 - ~/.nvm/versions/node/v12.6.0/bin/node
Yarn: 1.16.0 - /usr/local/bin/yarn
npm: 6.9.0 - ~/.nvm/versions/node/v12.6.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.1, DriverKit 19.0, macOS 10.15, tvOS 13.0, watchOS 6.0
Android SDK:
API Levels: 23, 25, 26, 27, 28
Build Tools: 28.0.3
System Images: android-24 | Google APIs Intel x86 Atom, android-26 | Google Play Intel x86 Atom, android-27 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom
Android NDK: 19.2.5345600
IDEs:
Android Studio: 3.3 AI-182.5107.16.33.5314842
Xcode: 11.1/11A1027 - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.2 => 0.61.2
npmGlobalPackages:
react-native-cli: 2.0.1

Steps To Reproduce

  1. Just react-native run-android --variant=release
    And it hangs forever:
    `<======-------> 50% EXECUTING [25m 31s]

IDLE
:app:bundleReleaseJsAndAssets`

Describe what you expected to happen:
Please verify source map building on hermes as it seems to be broken

@react-native-bot react-native-bot added the Tech: Bundler 📦 This issue is related to the bundler (Metro, Haul, etc) used. label Oct 30, 2019
@Sixzero
Copy link

Sixzero commented Nov 5, 2019

Same issue. So I can't build release and signed builds.

@romanbarzyczakgelato
Copy link

same issue

@MarekPawlowskiGelato
Copy link
Author

Switching off source map is temp sollution you can do this by adding following key to project.ext.react:
project.ext.react = [ enableHermes: true, // clean and rebuild if changing entryFile: "index.js", hermesFlagsRelease: [], ]

@ekmobile
Copy link

Same here, with hermesFlagsRelease: [] the build takes 3 minutes, without it takes over 11 minutes.

Do we loose anything by the workaround (e.g. performance)?

@stale
Copy link

stale bot commented Mar 15, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Mar 15, 2020
@stale
Copy link

stale bot commented Mar 22, 2020

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Mar 22, 2020
@facebook facebook locked as resolved and limited conversation to collaborators Mar 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Stale There has been a lack of activity on this issue and it may be closed soon. Tech: Bundler 📦 This issue is related to the bundler (Metro, Haul, etc) used.
Projects
None yet
Development

No branches or pull requests

5 participants