React Native Expo building standalone app - react-native

I use Expo for development. I don't know how to build .apk for Android. I checked out Building Standalone Apps documentation. It says:
This will take a few minutes, you can check up on it by running exp
build:status. When it’s done, you’ll see the url of a .apk (Android)
or .ipa (iOS) file — this is your app.
exp build:android
I tried a few times. It's been a while. No errors, no links. Nothing on the web portal. Am I doing something wrong?

expo has it's integrated system if you are using their building structure.
The building takes a while as stated. (Around 5-10mins) your build process starts with the command;
exp build:android
After a while, check the status of your build with command;
exp build:status
If your build it done, this comman will give you your .apk file url. If not, it will say your build is still in progress and try in a little bit later again.

Expo build take some time (6-15min). You can see build progress log using link
https://expo.io/builds
Web link show all builds of your accounts. You can download old build or see log
or in short you can
exp build:status

Your options are
wait, until your build is completed
Note! If you get the following error:
Cannot start a new build, as there is already an in-progress build.
error Command failed with exit code 1.
then your Expo.io build is stuck. Please go to https://expo.io -> Builds and look for the latest (IOS/Android) build. If it's in "Queued" state (after 17 days as in my case), open the details and click Cancel Build.
Subscribe to the paid Expo.io account so you get priority in build queue.
Install turtle-cli and build the app locally, see https://docs.expo.io/distribution/turtle-cli/
If it normally takes from 15-30minutes for Expo.io to build the app, turtle-cli can do it in 2-3mins.

Related

Where can I source help for native crashes of an expo EAS apk build

I am building an app using react-native on Expo and making sure to build with EAS every few days or whenever I add a new dependency.
After every build, I install the apk on an Android device and run the ios build on a simulator.
On my latest build, the build completes successfully but after installing the apk on android 10, the app opens and crashes once I navigate to a certain page.
It works fine on 3 other android phones.
The code difference between the last successful build that doesn't crash to the current one is minimal however very necessary for the app.
How can I see logs from the native crash in order to find the cause of the problem and hopefully find a fix?
I tried to install sentry but at the bottom of the page, it explains it only follows js issues and is not native.
Any ideas will be helpful
Thanks

Impossible to update expo project inside Expo Go after switching to EAS Build

I have the need to run a project from Expo Go without being connected to PC. We are developing an app that require GPS and needs to be tested in open field.
Before EAS became the standard to create projects i used
expo build:android
ad this created not only the apk, but uploaded the project to my account and i was able to start it from Expo Go projects section just like the app was installed on phisical device. That worked also fo iOS and was a great testing feature.
After i moved to EAS Build
eas build -p android --profile preview --clear-cache
my project inside Expo Go does not update anymore and its stucked at sdk 44 even if now i'm working (and creating builds) with sdk 46.
I went through the official documentation many times but i don't get how to make the app start from Expo Go (project sction) as i did before. Maybe i'm missing some configuration.
Thank you all for any kind reply.
Have a good day.
EDIT
I found the solution to this problem and now my builds are working and uploading to Expo Go.
Check out this information: https://github.com/expo/fyi/blob/main/eas-build-archive.md
Basically EAS Updates will not bundle anything inside your .gitignore, in my case it needed specific config files. Did a quick test by taking them off the .gitignore and now it's working. Will move to GitHub SECRETS in the future.
Hope that helps.

Expo not publishing

When I try to publish my Expo apps, it seems to have problems with apps that have un-optimized assets. I try to run expo optimize on these but sometimes I can't get this to work so I try publishing anyway, from the browser console, and it never finishes. I tried this earlier today and it got through Optimizing assets... in the publish process, and then go stuck on Building Javascript Bundle. Right now I'm trying again and it appears to be stuck on Optimizing /Users/TuzMacbookPro2017/Development/QMG-local/APPS/ELECTRO/assets/electro-icon-1024.png.
Even with this un-optimized asset I can get through expo build:ios without any apparent problems.
Any solutions?
I had the same problem. Could not publish from the web console.
I am using: Expo SDK 35, expo-cli 3.1.0
I managed to publish the app from the command line at my project root.
first, run:
expo optimize
second run:
expo publish
When the process finishes, the cli will then output an URL that you can visit to check the published app.
Something like this:
https://exp.host/#profileUsername/appName
I hope this helps.

react-native create app hangs while create

I use react-native with actual version and have tried to create a simple project. But while trying to create it by using
expo init AwesomeProject
the whole process hangs.
I have tried to look for a solution by searching on the internet but without any luck.
The error could be seen in the following screenshot:
That error generally means that a file is being accessed by two different things at 'around' the same time. And 90% of those times it is because of an anti-virus or similar.
Its a permission error, so my advice, try to do it after a fresh reboot and boot the powershell as admin, disable antivirus etc..
If still does not work reinstall nodejs/npm.
I had the same experience. The project gets created using React-native. When you try to run it, the 'Metro' interface comes up. There is an android phone on the USB drive which has previously been used to run Android Studio created projects successfully. However, on the command shell the app hangs in Metro.
While trying to run the project from Android Studio snow cat, there are build errors (red) in the App manifest file and there is this exception.
Build failed due to java.lang.NullPointerException
Installed expo-cli (C:\Reactive-native>npm install -g expo-cli). The app fails to run and hangs on the connected Android phone(Samsung 21) using the Expo Go client. This client has no problem having been tested in Snackbar.
I have a question in the Expo forum and probably someone will answer!

React-Native Expo Built App Doesn't Get the Latest Javascript

Ok, I have a problem with expo build. Please let me know if you need more details. Basically, the project I am working on is NOT detached. It is just using Expo.
So I publish it. Let's say the javascript bundle version is 0.17, and I am publishing a breaking change to 0.18.
When I load the app from Hockey App, the javascript bundle is clearly not 0.18 because I don't see my breaking changes. Then, I close the app and re-open it, and the JS bundle is updated.
The build script is:
exp build:android
[exp] Android:
[exp] APK: [AWS LINK] apk has been generated, it took 0 seconds
Then, I get an AWS link to the APK, which I download and upload to Hockey Apps.
How should I diagnose this problem?
Exp version is 44.0.0
It is the way it works in Android. First time you open your app after you publish, the code is downloaded in background. Next time it will run the new code.
Quoting the documentation:
Updates are handled differently on iOS and Android. On Android, updates are downloaded in the background. This means that the first time a user opens your app after an update they will get the old version while the new version is downloaded in the background. The second time they open the app they’ll get the new version. On iOS, updates are downloaded synchronously, so users will get the new version the first time they open your app after an update.