Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 30346

React-native Android release build broken (UI navigation breaks with out error) - works correctly in debug build

$
0
0

I have a react-native app which works correctly in Android debug builds but doesn't work in Android the release builds.

The app is using redux, axios and react-navigation:

  • Search input box on the home screen
  • Pressing the "Search button" calls a redux thunk, which makes an API request via axios which updates the redux reducer state
  • The home screen monitors redux reducer state and when we have new search results it navigates to the results screen using react-navigation 

All of this works fine in debug mode both on a real Android device and on the emulator (react-native run-android). 

When I run a release build (react-native run-android --variant=release), it compiles and installs and loads the home screen as before but when I press the search button it doesn't navigate to the search results. There is no error.

Things I have tested:

  • Is the app triggering and exception/error?

    • No there is no error. The app continues to run. Running adb logcat shows allot of log data but i dont see any any new error when launching/testing the app.
  • Is the API request being triggered?

    • Yes. By enabling none SSL traffic (cleartextTrafficPermitted="true") I was able to run Reactotron with the release build and I could see the API request is made and the response data is received. But the log output stops at this point. There is no error.
  • Does the API SSL cert meet android requirements?

    • Yes it does. I have tested it (ssllabs.com). It works in debug mode on a real device so it should work in the release also. 
  • Is an outdated dependancy causing the failure?

    • I tried updating my dependancies to the latest versions. The app continues to work fine in debug mode but breaks in the release.

How do I work out what is causing the failure?


Viewing all articles
Browse latest Browse all 30346

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>