-
-
Notifications
You must be signed in to change notification settings - Fork 337
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
index.android.bundle.hbc.e6d69f: No such file or directory #1765
Comments
We're not using Hermes currently but maybe this will still help? I don't recall exactly all the changes we made to get Sentry working in the monorepo but, from what I can relocate:
Note, changed
App's iOS 'Bundle React Native code and images' build stage script changed to:
(Note extra App's iOS 'Upload Debug Symbols to Sentry' build stage script changed to:
The number of If it's still not working for you after all those changes let me know what error you get and maybe I can find what I've missed including here. |
Unfortunately, it still has the same error with the few things that were different between our setups added. It seems like it does not generate the .hbc file at all. For me, entryFile is relative to my project directory, so changing it to
|
Ah, I think something we are doing differently then is the fact that we change our I think we did this to get references to images in submodules working correctly? It may also have been TypeScript related. Can't recall tbh. Note, if this difference helps you, we had to add a dynamic blacklist/exclusionList to ensure only the current app was 'visible' to metro since our monorepo contains multiple RN apps:
|
Unfortunately, not able to get this to work with above suggestions. Any other thoughts? |
Sorry, I'm not that familiar with hermes specifics, we haven't switched over to it yet due to some other blocking dependencies. Might be worth asking on the Sentry Community discord? https://discord.com/invite/sentry |
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
This is still an issue for us. Any thoughts? |
@eliw00d See step 2 here: https://docs.sentry.io/platforms/react-native/manual-setup/hermes/#compile-for-android maybe try switching out the hermesCommand to the correct one with OS-BIN filled out? |
@jennmueng Here is some additional output if it helps:
The CI machine I am running on is indeed a Mac so osx-bin is correctly being used. It had exit code 6 which seems to indicate it did run. I look at line 182 of node_modules/react-native/react.gradle and this is where it is failing: exec {
if (targetName.toLowerCase().contains("release")) {
// Can't use ?: since that will also substitute valid empty lists
hermesFlags = config.hermesFlagsRelease
if (hermesFlags == null) hermesFlags = ["-O", "-output-source-map"]
} else {
hermesFlags = config.hermesFlagsDebug
if (hermesFlags == null) hermesFlags = []
}
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
commandLine("cmd", "/c", getHermesCommand(), "-emit-binary", "-out", hbcTempFile, jsBundleFile, *hermesFlags)
} else {
commandLine(getHermesCommand(), "-emit-binary", "-out", hbcTempFile, jsBundleFile, *hermesFlags)
}
} I do not have hermesFlagsRelease set and it is not a Windows machine, so it should end up doing:
which matches what you linked me. Any thoughts on why that exec would fail? |
On further study of react.gradle, I see this just before the exec:
And the error I am getting is:
It seems to be appending a SHA to the end of the hbc. Could it be as simple as that? Where it should be trying to open it as |
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. |
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. |
@jennmueng do you have any hint on this? |
@eliw00d Hmm I'm turning blank here, it could just be like you said where it's adding a hash at the end of the filename. Also, if you remove the sentry build script:
does the error still occur or is this coming from the react native build script? |
@jennmueng I removed that line but still get the same error. |
@eliw00d Hmm this tells us that this issue isn't caused by Sentry's build script then, but an issue is coming from the React Native build script itself. |
can you provide a minimal reproducible example so we can double-check that it's not a sentry's issue? the standard setup with Hermes just works using the latest RN SDK Version |
Closing the issue as a part of large repository cleanup, due to it being inactive and/or outdated. |
any updates here ? I have the same issue with
|
Yes, actually! I finally figured this out a few months ago. Basically, our git branch names look something like
in our Jenkinsfile to get around it. |
I had the same problem and was stuck on this for days. Then by seeing your problem it helped me find the solution, apparently the problem was that in my project rootfolder the folder name contains a space (%20) and that's why it adds this SHA-1 code or whatever as a file extension after android.index.bundle.hbc... |
I also encountered this problem only to find out it's because of the 🫠 |
Environment
How do you use Sentry?
Sentry SaaS (sentry.io)
Which SDK and version?
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
:Here is my
android/sentry.properties
: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: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?
The text was updated successfully, but these errors were encountered: