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
Android build fails on createReleaseExpoManifest #8374
Comments
hello! yeah, you need to have metro running when you do a release build. if you run |
@brentvatne I am trying to have my builds automated with AppCenter. Currently AppCebter works fine with a regular react native app. But, with Expo bare it fails with the error above. how would we have metro running in this case or what would be a workaround in this case? |
Hey @dondragon2 - we will add a clearer error message here but unfortunately, builds with expo-updates installed do currently require that the metro bundler server is running in another process. The templates from If you can customize how you start your build and/or have a separate process running in App Center, it shouldn't be a problem, but if not, you may need to uninstall expo-updates to get the build to run. It's on our roadmap to get builds with expo-updates running without the need for a packager server. But that's unfortunately not the case right now 😞 Sorry for the trouble! |
@esamelson Thanks for your input. What is the best way to remove expo-updates? The reason is that after I uninstall the module I notice there is some dependencies required in the android classes. If I remove this the app doesn't launch even those the package manager downloads the js files. How should I go about this? |
I can confirm that appcenter builds work with expo-updates uninstalled. |
@creimers do you mind sharing what changes, if any, you had to do in the MainActivity to get this working? Also, did you have to install unimodules? |
@dondragon2 Sure. I followed the uninstall guide 100%. Other than that, I did not do anything. Additional info: my project in question was bootstrapped with create react native app. |
@creimers Thanks for the direction to look. I totally missed that when looking at this issue. I followed the guide and now it is working as expected. Thanks everyone |
@sbecker I have also encountered this problem. I solve this problem by updating my |
Running a react-native start in another terminal fix the issue. Also make sure to run in Administrator, it will resolve most of problems |
@brentvatne I have installed expo update. When trying to build the app I am getting this error.
If I run react-native start in another tab and than build the app it successfully builds. why my build is having a dependency on react-native start to create build now. Is this expected? |
Yes. They are working very hard to make expo updates run without this but it will take some more time. Till then this is the only choice |
@shubhamdeol - i assume you're following the guide here? https://reactnative.dev/docs/signed-apk-android#generating-the-release-apk i think that page should be updated to let users know that they need to have the react-native server running :) maybe you could open a PR to clarify that |
Ok, basically, I looks like I can't run a separate process with bundler when using Bitrise. |
just get rid of |
Goes onwards to build the app (for development) At some point - I am going to assume this is windows related - the node.js (react native) is killed, most likely because a file is being editted by the build process, and when the dev build finishes, the bundler is dead.
(The above is what causes the bundler to die -- this issue has been present for longer). You can still "fix" this flow by just running Now the bundler runs, and you can do When |
this should be fixed in |
@brentvatne since 0.2.12 , I am required to have the "expo" in my dependencies. Otherwise, (on iOS) Im having |
This problem is solved in latest version, but if you can't migrate smoothly, try |
So am I... (I'm migrating from 0.2.7 to 0.2.8) Try this service description file on your CI machine.
start-ci-packager.sh #!/bin/bash
export RCT_METRO_PORT="${RCT_METRO_PORT:=8081}"
export YOUR_PROJECT_HOME="${YOUR_PROJECT_HOME}"
echo "export RCT_METRO_PORT=${RCT_METRO_PORT}" > "${YOUR_PROJECT_HOME}/node_modules/react-native/scripts/.packager.env"
if [ ! -d "${YOUR_PROJECT_HOME}" ]; then
echo "YOUR_PROJECT_HOME is required!"
exit 1
fi
if [ -z "${RCT_NO_LAUNCH_PACKAGER+xxx}" ] ; then
if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then
if ! curl -s "http://localhost:${RCT_METRO_PORT}/status" | grep -q "packager-status:running" ; then
echo "Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly"
exit 2
fi
else
cd ${YOUR_PROJECT_HOME} && npx react-native start || echo "Can't start packager automatically"
fi
fi |
same/similar problem here. I have
EditProblem resolved with |
@arberK - can you help me to reproduce this? it works as expected on my machine. it would be best to do that in a new issue. |
I've been debugging this with @brentvatne via slack. I'm loading SVGs
to pass to {
plugins: [
['babel-plugin-inline-import', {extensions: ['.svg']} ],
]
} After removing all of the SVG imports the iOS build runs fine. EditProblem resolved with |
@rodneyrehm - i tried to reproduce this locally in a minimal example and it works for me: https://github.com/brentvatne/svg-example |
I also faced this issue after updating to Solution: Update to |
Still fails on expo-updates@0.2.14 for me |
@ryanbabbly - please create a new issue with a mcve |
🐛 Bug Report
A brand new expo bare-minimum app fails to build for release on Android. It fails during the
:app:createReleaseExpoManifest
task, because it cannot connect to 127.0.0.1:8081A workaround is to run
react-native start
in a separate terminal / process so that the Metro bundler is running. Build will succeed.Environment
App target: Android
Steps to Reproduce
First, switch to recent node LTS (12.16.2), and install expo CLI and react-native CLI:
Then run the following commands to create a fresh bare minimum app and attempt to create an android bundle release:
Expected Behavior
BUILD SUCCESSFUL
Actual Behavior
Workaround
Run
react-native start
in a separate terminal / process so that the Metro bundler is running. Build will succeed.The text was updated successfully, but these errors were encountered: