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.

index.android.bundle.hbc.e6d69f: No such file or directory

See original GitHub issue

Environment

How do you use Sentry? Sentry SaaS (sentry.io)

Which SDK and version?

    "@sentry/react-native": "2.6.2",

Steps to Reproduce

Tried to upgrade my project from React Native 0.63.4 to 0.65.1 and enable hermes for Android.

I am using a monorepo and have the following in my build.gradle:

project.ext.react = [
    cliPath: "../../../node_modules/react-native/cli.js",
    composeSourceMapsPath: "../../../node_modules/react-native/scripts/compose-source-maps.js",
    enableHermes: true,  // clean and rebuild if changing
    entryFile: "index.js",
    hermesCommand: "../../../../../node_modules/hermes-engine/%OS-BIN%/hermesc",
]

apply from: "../../../../../node_modules/react-native/react.gradle"
apply from: "../../../../../node_modules/@sentry/react-native/sentry.gradle"

Here is my android/sentry.properties:

defaults.url=https://sentry.io/
defaults.org=myOrganization
defaults.project=myProject
cli.executable=../../../node_modules/@sentry/cli/bin/sentry-cli

Expected Result

Source maps would be handled like before, but with hermes enabled for Android.

Actual Result

I get the following error related to a missing index.android.bundle.hbc file:

[16:32:20]: ▸ ^~~~~~~~~~~~~~~~
[16:32:26]: ▸ Failed to open file /frontend/applications/myProject/android/app/build/generated/assets/react/dev/release/index.android.bundle.hbc.e6d69f: No such file or directory
[16:32:28]: ▸ DEBUG   2021-09-08 16:32:28.064290 -05:00 sentry-cli version: 1.66.0, platform: "darwin", architecture: "x86_64"
[16:32:28]: ▸ INFO    2021-09-08 16:32:28.065016 -05:00 sentry-cli was invoked with the following command line: "/node_modules/@sentry/cli/sentry-cli" "react-native" "gradle" "--bundle" "/frontend/applications/myProject/android/app/build/generated/assets/react/dev/release/index.android.bundle" "--sourcemap" "/frontend/applications/myProject/android/app/build/generated/sourcemaps/react/dev/release/index.android.bundle.map" "--release" "[REDACTED]" "--dist" "[REDACTED]"
[16:32:28]: ▸ INFO    2021-09-08 16:32:28.072137 -05:00 Issuing a command for Organization: myOrganization Project: myProject
[16:32:28]: ▸ Processing react-native sourcemaps for Sentry upload.
[16:32:28]: ▸ INFO    2021-09-08 16:32:28.072173 -05:00   bundle path: /frontend/applications/myProject/android/app/build/generated/assets/react/dev/release/index.android.bundle
[16:32:28]: ▸ INFO    2021-09-08 16:32:28.072184 -05:00   sourcemap path: /frontend/applications/myProject/android/app/build/generated/sourcemaps/react/dev/release/index.android.bundle.map
[16:32:28]: ▸ error: No such file or directory (os error 2)
[16:32:28]: ▸ DEBUG   2021-09-08 16:32:28.108294 -05:00 client close; no transport to shut down  (from sentry)
[16:32:28]: ▸ DEBUG   2021-09-08 16:32:28.108346 -05:00 skipping update nagger because session is not attended
[16:32:28]: ▸ FAILURE: Build completed with 2 failures.

If I disable hermes for Android, it builds without errors.

iOS works fine.

Since I am using a monorepo, is there something I am missing in terms of giving Sentry and/or React Native the paths they need to create the .hbc file?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:21 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
eliw00dcommented, Nov 5, 2021

As for only happening for monorepo, I would assume so since we have to specify the paths to our root node_modules. Normal repos would have their node_modules where react-native expects to find it.

1reaction
eliw00dcommented, Nov 5, 2021

does that happen only for monorepo? is it only with hermes or without it too?

It works fine with Hermes disabled. It only fails at the point where it creates the .hbc file.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to load script from assets index.android.bundle
This issue helped me resolve the problem in following steps. (in project directory) mkdir android/app/src/main/assets; react-native bundle -- ...
Read more >
Unable to load script from assets 'index.android.bundle' ...
Follow this. Go to your project directory and check if this folder exists android/app/src/main/assets. i) If it exists then delete two files ......
Read more >
Fastlane Android Building: Index.Android.Bundle Missing
index.android.bundle.hbc.e6d69f: No such file or directory #1765.EnvironmentHow do you use Sentry?Sentry SaaS sentry.ioWhich SDK and version?
Read more >
no such file or directory, open 'android/app/src/main/assets ...
Coding example for the question ENOENT: no such file or directory, open 'android/app/src/main/assets/index.android.bundle'-React Native.
Read more >
Hermes for React Native
If you are using Hermes, you should not have the RAM bundles feature ... npx react-native bundle --platform android --dev false --entry-file index.js ......
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