-
Notifications
You must be signed in to change notification settings - Fork 2
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
0.62.1 Release APK: Unable to load script. Make sure you're either running a Metro server (run 'react-native start') or that your bundle 'index.android.bundle' is packaged correctly for release. #38
Comments
Update I solved this issue by doing this before each build:
and then run
Adding the Also, I tried experimenting with the version of |
@palkerecsenyi that's more like a workaround as the bundle is already generated when you run Have you tried removing this line: https://gist.github.com/palkerecsenyi/6c09728996c4f982dc3bd11ad757c45b#file-app-build-gradle-L81? just a shot in the dark here as this dictates where the bundle will be stored before being added to the |
Thanks for the reply @lucasbento! I tried commenting that line out, and once again the build finished perfectly. However, when launching the app I got a different fatal error:
I tried running with both |
Update Commenting out these lines fixed it, and my app runs successfully (with Hermes enabled):
|
Beginner in React Native :- So, I just created the folder: and ran the command: (Found here) And then when I run |
@Ayyanchira I'm not completely sure, but I think it might have something to do with the fact that you've set Try using this instead:
Again, I'm not too sure about this. In debug mode, I usually do this:
and then launch the app on the phone/emulator. This seems to work fine and was unaffected by the update to 0.62.x |
The However the
And a bunch of error like: Then it works if I go to android/app/src/res/ and delete all drawable-hdpi,mdpi,xhdpi,xxhdpi,xxxhdpi and raw folders. Does anyone knows any ticket to fix this? I didn't find. Thank you |
Pessoal, essa solução funcionou para mim: Unable to load script from assets 'index.android.bundle'. Make sure... 1- Para resolver comece criando uma pasta assets dentro da pasta android/app/src/main. 2- Logo após, execute o comando: npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/ 3- Agora, feche as abas do terminal e execute novamente o comando: npx react-native run-android |
Facing this issue even in debug build. Any solid solution yet? |
Currently facing this issue on 0.62.2, the bundle created from |
@duncte123 Did you find a solution to this? |
Yes I did, I compiled on java 11 for some reason. Switching to java 8 solved the issue. |
Still seeing the issue and confirmed we're using Java 8 to compile |
I had this issue last week and the root cause was that it was using node 13 (the system version on my Mac - Big Sur) to bundle rather than node 10. Once I forced it to use node 10, it finally stopped crashing for release bundles. For some reason nvm stopped working 🤷♂️. |
You did not find a solution? |
Same problem, java 8 version |
Which node version are you using when you put |
v13.11.0 |
That’s the same issue I had. It doesn’t work. If you change it to use 10.16.3, does it work? That was my issue and it resolved once I used that older node version. |
Switch to v10.21.0, nothing has changed |
I did have one other thing that might be required as well. I set the metro preset to exactly 0.58. |
I have a similar problem. When i launch ./gradlew bundleDevRelease i don't find into the app.bundle the index.android.bundle. Has something changed with the new gradle? |
I solved the problem when changing the build tools version from 4.0.1 to 3.5.3 |
After creating the next bundle, everything repeated |
Not working yet, Only works with It's hard to test for this to fail when the package.json: node v10.16.3 Crashlytics Report Fatal Exception: java.lang.RuntimeException: Unable to load script. Make sure you're either running a Metro server (run 'react-native start') or that your bundle 'index.android.bundle' is packaged correctly for release. |
This issue appears to crop up when using |
Same issue here guys ... |
I found a temp solution I tried to change "react-native": "0.67.4" |
Work for me! But before i must Clean Project from Android Studio > Build. |
Got for a second time the same issue
|
This works for me! React native
|
Any solid solution here that aren't hacks? |
For me helped proper versioning according to RN changelog. to 0.69.4
|
For me this problem appear with React Native 0.68 and JDK 11 i hava checked the im a little confused and depressed when my last project solved many build problems finaly published to store but when create a new project use |
Got it working by launching Yes... a bit hacky ... |
My release build crashed on launch after upgrading React Native to This article helped me.. https://articles.wesionary.team/react-native-android-release-build-crashes-fa93f07a2ba4 at first,
steps:
|
same issue after upgrading react-native from 0.64.3 to 0.68.2.
running this command before each build gets the job done, but it seem like a quick workaround.
is there a more solid solution for this issue? |
Seems this has resurfaced |
face this issue while upgrading react native version from 0.65.3 to 0.70.9. do any have solid steps to resolve this issue ? |
Thanks for putting this information here. you saved my day. 😍😍😍 |
Same issue here, build work fine but when downloading from playstore I get this error, any idea ? |
In my case, it was an issue related to gradle version. |
this worked!! |
I'm not sure which of these things really fixed it for me, but after 3 days of trying to figure this out here's what I changed to make it work without hacks and allowing to make hot reloading still work in dev:
|
I was having this issue with RN cheers! |
In my case on Windows I had 8081 already occupied due to a portproxy config I did .. removing that fixed it |
this is what worked for me as well, for :"react-native": "0.73.4", but had to manually create the folder assets first with: then |
got the same error, did this.. but now my app does start on my emulator but it is not connected with metro.. hence its of no use.. |
Try these steps:
|
Same here when upgrading target sdk to 34 for RN 0.69. Upgraded as well gradle to 7.4.2 and got this issue. The final changes in my 0.69 app to get thing done for the current google play requirments (2024 november):
MainApplication.java
|
Environment
Upgrading version
0.61.5->0.62.1
Description
I built my app for debug on Android, and everything works perfectly. However, when I build it for release, the build succeeds but upon launching the app it creates the following error:
I used this command to build my app:
Here is my
build.gradle
: https://gist.github.com/palkerecsenyi/1434ce9340c167b80847ea2dcee30528app/build.gradle
: https://gist.github.com/palkerecsenyi/6c09728996c4f982dc3bd11ad757c45bpackage.json
: https://gist.github.com/palkerecsenyi/d42eb7f1af6a6d3a83db9e271e720aecindex.js
(not sure if that's fully relevant): https://gist.github.com/palkerecsenyi/90274eadedb9ca9c8f4ebb0ec42f10caReproducible demo
I'm not sure if this happens with all upgrades, and I'm not sure how to reproduce it. I know at least one other person has experienced this issue: facebook/react-native#25348 (comment).
Thanks in advance!
The text was updated successfully, but these errors were encountered: