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

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

Related

Issue with Expo Image Picker at build time

This is the error I am facing at the time of building the ios for my expo app.
Here is the code for Image Picker I used
This is working great in my simulator expo app as well as in iphone expo as well but giving this error while building using eas build -p=ios
I try doing different things and after trying many things I get to know it's because of outdated verions I updated everything in my package.json with the help of expo doctor I see compatible and install them and it's fixed.

Creating Android and iOS app from react-native

I have created one react-native app using expo and atom editor. It's running fine in android device and iOS simulator but with the help of expo. What I want is to generate Apk(debug) so that I can directly run on device. How can I do it ? I followed this(Dmitry Mugtasimov's answer). should I run all those command inside project folder ? Also I don't find index.js file inside my project folder. Also if someone know how to run on iOS simulator by creating app like file(don't know what is that in Ios because from android background). Please help, thanks
Since you have used Expo to develop your react-native app you can build the android app by going to the project folder and running the bellow command in the terminal
expo build:android
The building process will take around 5-10 minutes. When your build is done, expo build:status will give you your .apk file url. If not, it will say your build is still in progress and to try again later.
Also to build the iOS app you can run,
expo build:ios
To build the iOS standalone app you will need to have an Apple Developer account, but for Android standalone app you don't need a Google Play Developer account.
For the above commands to work you need to have expo-cli installed, For this you can run the bellow command,
npm install -g expo-cli
More Info: https://docs.expo.io/versions/latest/distribution/building-standalone-apps/
If you don't have an Apple Developer Account. You can build the iOS
standalone simulator build using the command,
expo build:ios -t simulator
And then wait for build to finish then download and unpack YourAppName.tar.gz. Then, start the iOS simulator and run xcrun simctl install booted YourAppName.app to run the .ica file.
More info: Expo / React-Native, Is it there a way to test-run standalone iOS apps on a device/simulator?

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.

App in production crashes immediately after showing splash screen (Android only)

Yesterday I release my app but I have problem on Android. When the app starts it shows the splash screen and crashes immediately (before actually showing any part of the app) with the message “Unfortunately App has stopped”. I build the release with the following
./gradlew assembleRelease
and everything was successful. I tested the app with
react-native run-android —variant=release
on my device and there wasn’t any problem. But in production it’s not working… What can be the problem?
Actually It turns out that the problem was with managing my production releases in the Google Play Store. My first release was build from the Android Studio and not from the console with ./gradlew assembleRelease (I thought that this is just another way and did it in the standard way of building release for android app). Because of that all the JavaScript needed to run my app wasn't bundled in the APK and it was showing only the splash screen. After fixing that and releasing the new APK with the bundled JavaScript and fixing the right release on the Google Play Console everything is fine now.
The documentation is very good and clear: Releasing on Android documentation

IOS emulator app stay in background

I have a problem when running react-native run-ios on my project.
The IOS emulator launch well.
Then the application start (react-native white splash screen) and immediately after that, it return me to the Iphone home screen.
If I Cmd-Shift-H (with pressing H two times) I saw the app in the background (still with the react-native white splash screen).
When I click on it, it return me to the home screen again.
If I launch the Xcode project and run the app, it work fine and I can navigate in my application.
I've had some troubles with my app before, the IOS version was 'abandoned' and I've installed a lot of modules and changed the name of the project in the mean time, before trying to make it work on IOS.
Then I've decided to create a new project with react-native init myNewProject (because I couldn't figured out how to fix the IOS, something with a workspace not configured) and copy paste my old src and index.ios/android.js inside.
So now Android is still working and IOS is only working if I launch the app from Xcode.
I've tried to reset the emulator but it don't change anything.
I don't have any logs about app crash or something.
The Android app version is working fine.
Any idea ?
Logs
I've put the device logs after running react-native run-ios on a gist
https://gist.github.com/ansmonjol/f6fa1e71a20b944bf67429c57d081165
Additional Information
React Native version: 0.35
Platform: IOS
Operating System: macOS El capitan
Xcode: Version 8.0
I ran into this problem, and solve it:
In my case i install third-party native component in my project and link it using command react-native link <component-name>. Than i have a problem about you wrote:
Running project by Xcode - works fine. Bundling start, after loading dependency graph.
But runnig project by react-native run-ios app hide immediately and bundling not started after loading dependency graph. And not any errors happened.
I tried reinstall all, clean npm cache, react-native upgrade, delete build folder, delete derived data... nothing helped.
I found one way that helped me:
I remove that problem library not manyally from Xcode, but from terminal using command react-native unlink <component-name>. Its way to resolve this problem for me, maybe for you too.
Sorry for my english.