Any way to "debug" react native archive - react-native

I'va a react native app in development, it work without any problems on ios and android in debug, but when i try to make a signed apk or a archive with the jsbundle direclty in the app instead of the dev server, the app is stuck on my first screen (custom loading screen). it work fine in debug with the jsbundle directly in the app.
I'm using react-native 0.24.1. tried to upgrade to 0.28 and it still stuck.
in short
DEBUG : code in react server console => Work fine
DEBUG : jsbundle in the app => Work fine
RELEASE : code in react server console => Work fine
RELEASE : jsbundle in the app => stuck on first screen (no crash)
If anyone has a idee how i can debug this.

Related

React native app to react native web problem (typescript, babel)

Hello so I'm working on an app for android and iOS which is quite developed by now and I'd like to activate react-native-web on it. the problem is that I have a bug when I try to run the script to launch the web development server :
The first error at the top is the one I'm struggling with I've tried updating my babel config :
I tried deleting the babel config at the root of my project and it changed nothing like the babel config has no importance
It is being used though to build the android app i know that, but for the react native web build it seems he has no importance
But is still get the same error again and again
please let me know if you need any more information's on this issue

react native expo building javascript bundle multiple times and fail

I'm currently developing react native app and kinda new to it. Sometimes when I open my app in expo(usually using my iPhone device to debug app) it building javascript bundle multiple times very rapidly and it's unavailable to open app in my phone while the expo bundler is keep building javascript.
Indeed I need to force server to stop and restart, sometimes it works but not always.
It's not a big issue since I restart the app It's okay but why is this happening?
this is my screenshot of building javascript in expo. green one is from terminal and white one is from expo...

how can I change web application without changing the app with expo

I have an expo react native project which works perfectly fine on every android device that I have tried.
but when I tried to build a pwa version of the project with expo build:web , the components renders in a totally wrong position and the output is not acceptable at all.
I want to know if anyone has the same problem with expo web builds, and how you manage to fix this problem.
is there any way that I change the implementation of the web application without changing the output of android app?
thank you all.
Did you try to use Platform Specific Code with https://reactnative.dev/docs/platform-specific-code
With your situation, it will be something like this
HeaderBar.js # Webpack, Rollup or any other Web bundler
HeaderBar.native.js # React Native bundler for both Android and iOS (Metro)
HeaderBar.android.js # Android only

Expo Stopped ( expo client app is not working )

I had been working with react native for few days and I used to run my app in my own android phone through LAN. But recently the expo client app is not supporting. When I open it it shows all the recent project as well as working project. when I click on working once it shows all the normal stuffs like Dowloading javascript bundles and in metro bundler also it shows Building JavaScript bundle: finished in 5380ms. No problem there. But when it finishes a pop up came and show Expo stopped
like this :
I cleared the cashe and atlast reinstalled expo client app in android device and expo-cli in my system. Still the problem persisting. How to resolve it... :(

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.