You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RuntimeException: Illegal callback invocation from native module. This callback type only permits a single invocation from native code.
logs in sentry:
com.facebook.react.bridge.CallbackImpl in invoke at line 26
com.facebook.react.bridge.PromiseImpl in reject at line 231
com.facebook.react.bridge.PromiseImpl in reject at line 70
com.reactnativesystemnavigationbar.SystemNavigationBarModule in fullScreen at line 118
react-native-system-navigation-bar version
2.6.4
React Native version
0.71.13
Snack, code example, screenshot, or link to a repository
// Handle full screem mode
useEffect(() => {
const handleOrientationChange = (orientation: OrientationType) => {
switch (orientation) {
case OrientationType['LANDSCAPE-LEFT']:
toggleFullScreenMode(true);
setTimeout(() => {
Orientation.lockToLandscapeLeft();
SystemNavigationBar.fullScreen(true);
});
break;
case OrientationType['LANDSCAPE-RIGHT']:
toggleFullScreenMode(true);
setTimeout(() => {
Orientation.lockToLandscapeRight();
SystemNavigationBar.fullScreen(true);
});
break;
default:
toggleFullScreenMode(false);
setTimeout(() => {
Orientation.lockToPortrait();
SystemNavigationBar.fullScreen(false);
});
break;
}
Orientation.unlockAllOrientations();
};
// Unlock all orientations at the start
Orientation.unlockAllOrientations();
// Add orientation listener
Orientation.addDeviceOrientationListener(handleOrientationChange);
// Cleanup on component unmount
return () => {
Orientation.removeDeviceOrientationListener(handleOrientationChange);
Orientation.lockToPortrait(); // Ensure the app returns to portrait mode
};
}, []);
The text was updated successfully, but these errors were encountered:
Description
The app crashed with the following error.
RuntimeException: Illegal callback invocation from native module. This callback type only permits a single invocation from native code.
logs in sentry:
com.facebook.react.bridge.CallbackImpl in invoke at line 26
com.facebook.react.bridge.PromiseImpl in reject at line 231
com.facebook.react.bridge.PromiseImpl in reject at line 70
com.reactnativesystemnavigationbar.SystemNavigationBarModule in fullScreen at line 118
react-native-system-navigation-bar version
2.6.4
React Native version
0.71.13
Snack, code example, screenshot, or link to a repository
The text was updated successfully, but these errors were encountered: