I am building a react native app, using react-native-camera
, after some dependencies upgrade I've encountered a problem with the Camera API, when you click a button in my app it navigates you to a Tab View component where the first tab is the Camera component, but instead the app freezes.
At first I thought I have a specific problem in my code, although I haven't change it, but then I saw that also the Samsung's S10 native camera app shows a black screen (no crash error is shown, image attached). The only fix right now is to restart the device.
How to reproduce:
I don't have an absolute way to reproduce the problem, the camera inside the Tab View component is a main process in my app and people navigate there a lot. After some time it happens and it's not consistent. I did notice that when I navigate to the Tab View if I make the first screen not a camera it does work ok, and that way I understood that the problem is caused by opening the camera no matter where in my app (not specifically inside the tab view, although the root reason to the problem might be the tab view).
No android error logs in logcat, except for Camera Destroyed Surface
Code structure
The Tab View component is used as a flow/stepper like screen (without the page indication at the bottom) and the user doesn't know it's a Tab View. The user flow is always going to the first tab which is the Camera (Using RNCamera), then it moves to another Camera tab - we have a focused mechanism and it does work moving between those Cameras, and the last tab is a component with some details involving the pictures being taken.
React native modules Versions: The main ones
"@react-native-community/async-storage": "^1.7.1",
"@react-native-community/geolocation": "^2.0.2",
"@react-native-community/masked-view": "^0.1.10",
"@react-native-community/netinfo": "^5.3.1",
"@react-navigation/bottom-tabs": "5.8.0",
"@react-navigation/compat": "5.2.3",
"@react-navigation/core": "5.12.3",
"@react-navigation/drawer": "5.8.6",
"@react-navigation/native": "5.7.3",
"@react-navigation/routers": "5.4.11",
"@react-navigation/stack": "5.9.0",
"net": "^1.0.2",
"react": "16.9.0",
"react-dom": "^16.9.0",
"react-native": "0.61.5",
"react-native-camera": "^3.38.0",
"react-native-drop-shadow": "0.0.2",
"react-native-dropdown-picker": "3.0.4",
"react-native-exception-handler": "^2.10.8",
"react-native-extended-stylesheet": "^0.11.1",
"react-native-fs": "^2.14.0",
"react-native-gesture-handler": "^1.6.0",
"react-native-navigation-bar-color": "^2.0.1",
"react-native-orientation": "^3.1.4",
"react-native-ping": "1.1.1",
"react-native-reanimated": "^1.7.0",
"react-native-safe-area-context": "3.1.7",
"react-native-screens": "^2.10.1",
"react-native-shadow": "^1.2.2",
"react-native-sound": "^0.10.12",
"react-native-svg": "9.2.4",
"react-native-tab-view": "^2.15.1",
"react-native-vector-icons": "6.2.0",
"react-redux": "^6.0.0",
"redux": "^4.0.1",
"redux-logger": "^3.0.6",
"redux-saga": "^1.0.1",
Galaxy S10 Camera After the Problem Ocurre: (The app itself just freezes)