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

RN61.4 and below with hermes enabled ./gradlew assembleRelease fails on Linux. #27123

Closed
Sixzero opened this issue Nov 5, 2019 · 4 comments
Closed
Labels
Bug Resolution: Locked This issue was locked by the bot.

Comments

@Sixzero
Copy link

Sixzero commented Nov 5, 2019

React Native version:
RN61.4 and below.

Steps To Reproduce

  1. Hermes enabled. I have many packages in a project.
  2. react-native run-android runs just fine.
  3. Buidling in release fails: Ex. react-native run-android --variant release

What happens:
Execution failed for task ':app:bundleReleaseJsAndAssets'. Process 'command '../../node_modules/hermes-engine/linux64-bin/hermes'' finished with non-zero exit value 2

More about the error:
Error: Command failed: ./gradlew app:installRelease -PreactNativeDevServerPort=8081

/home/sixzero/repo/complexapp/android/app/build/generated/assets/react/release/index.android.bundle:1:1: error: Invalid UTF-8 continuation byte �� ��� /home/sixzero/repo/complexapp/android/app/build/generated/assets/react/release/index.android.bundle:1:1: error: unrecognized Unicode character \ufffd �� ��� /home/sixzero/repo/complexapp/android/app/build/generated/assets/react/release/index.android.bundle:1:2: error: Invalid UTF-8 continuation byte �� ��� /home/sixzero/repo/complexapp/android/app/build/generated/assets/react/release/index.android.bundle:1:2: error: unrecognized Unicode character \ufffd �� ��� /home/sixzero/repo/complexapp/android/app/build/generated/assets/react/release/index.android.bundle:1:4: error: Invalid UTF-8 lead byte 0xfffffffb �� ��� /home/sixzero/repo/complexapp/android/app/build/generated/assets/react/release/index.android.bundle:1:4: error: unrecognized Unicode character \ufffd �� ��� /home/sixzero/repo/complexapp/android/app/build/generated/assets/react/release/index.android.bundle:1:5: error: Invalid UTF-8 continuation byte �� ��� /home/sixzero/repo/complexapp/android/app/build/generated/assets/react/release/index.android.bundle:1:5: error: unrecognized Unicode character \ufffd �� ��� /home/sixzero/repo/complexapp/android/app/build/generated/assets/react/release/index.android.bundle:1:6: error: unrecognized Unicode character \u6 �� ��� /home/sixzero/repo/complexapp/android/app/build/generated/assets/react/release/index.android.bundle:1:7: error: unrecognized Unicode character \u0000 �� ��� /home/sixzero/repo/complexapp/android/app/build/generated/assets/react/release/index.android.bundle:1:8: error: unrecognized Unicode character \u0000 �� ��� /home/sixzero/repo/complexapp/android/app/build/generated/assets/react/release/index.android.bundle:1:10: error: unrecognized character '#' �� ��� /home/sixzero/repo/complexapp/android/app/build/generated/assets/react/release/index.android.bundle:1:11: error: unrecognized Unicode character \u0000 �� ��� /home/sixzero/repo/complexapp/android/app/build/generated/assets/react/release/index.android.bundle:1:12: error: unrecognized Unicode character \u0000 �� ��� /home/sixzero/repo/complexapp/android/app/build/generated/assets/react/release/index.android.bundle:1:13: error: Invalid UTF-8 lead byte 0xffffff88 �� ��� /home/sixzero/repo/complexapp/android/app/build/generated/assets/react/release/index.android.bundle:1:13: error: unrecognized Unicode character \ufffd �� ��� /home/sixzero/repo/complexapp/android/app/build/generated/assets/react/release/index.android.bundle:1:14: error: Invalid UTF-8 continuation byte �� ��� /home/sixzero/repo/complexapp/android/app/build/generated/assets/react/release/index.android.bundle:1:14: error: unrecognized Unicode character \ufffd �� ��� /home/sixzero/repo/complexapp/android/app/build/generated/assets/react/release/index.android.bundle:1:15: error: unrecognized Unicode character \u3 �� ��� /home/sixzero/repo/complexapp/android/app/build/generated/assets/react/release/index.android.bundle:1:16: error: unrecognized Unicode character \u0000 �� ��� <unknown>:0: error: too many errors emitted

My guess:
index.android.bundle is not a text file.
The line causing the error in react.gradle 156. line:
commandLine(getHermesCommand(), "-emit-binary", "-out", hbcTempFile, jsBundleFile, *hermesFlags)
What I don't understand is, how can the index.android.bundle file contain unrecognizable unicode characters?

Describe what you expected to happen:
The build finishes without errors.

@Sixzero Sixzero added the Bug label Nov 5, 2019
@Sixzero
Copy link
Author

Sixzero commented Nov 5, 2019

Solved, it was my fault. Used indexed ram bundle...

@usmansbk
Copy link

usmansbk commented Nov 6, 2019

You should close this then.

@Sixzero Sixzero closed this as completed Nov 6, 2019
@Mhmetengineer
Copy link

@Sixzero how did u solve?

@apperside
Copy link

Hello, I am experiencing the same issue, I just enabled hermes, the app runs fine with react-native run-android, but when I build for release, I get this error (the errors you see in the top half repeats a lot more, I just wanted to focus on the final part with the error details)

Screenshot 2021-04-18 at 09 41 20

@facebook facebook locked as resolved and limited conversation to collaborators Oct 2, 2021
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Oct 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants