Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash production on Galaxy S10 5G (SM-G977N) #48

Open
tudiantuan opened this issue Mar 5, 2021 · 4 comments
Open

Crash production on Galaxy S10 5G (SM-G977N) #48

tudiantuan opened this issue Mar 5, 2021 · 4 comments

Comments

@tudiantuan
Copy link

I recive report ErrorNavigationBarColorModule.java:8
Tried to change the navigation bar while not attached to an Activity.
Model Galaxy S10 5G (SM-G977N)

@felipegmg
Copy link

+1

@MorganTrudeau
Copy link

This shows as unhandled for me in bugsnag but it's not a crash. It's because the promise is not returned from js.

patch...

diff --git a/node_modules/react-native-navigation-bar-color/src/index.js b/node_modules/react-native-navigation-bar-color/src/index.js
index eeab32f..edc4ce0 100644
--- a/node_modules/react-native-navigation-bar-color/src/index.js
+++ b/node_modules/react-native-navigation-bar-color/src/index.js
@@ -9,7 +9,7 @@ const changeNavigationBarColor = (
 ) => {
   if (Platform.OS === 'android') {
     const LightNav = light ? true : false;
-    NavigationBarColor.changeNavigationBarColor(color, LightNav, animated);
+    return NavigationBarColor.changeNavigationBarColor(color, LightNav, animated);
   }
 };
 const hideNavigationBar = () => {
@@ -21,7 +21,7 @@ const hideNavigationBar = () => {
 };
 const showNavigationBar = () => {
   if (Platform.OS === 'android') {
-    NavigationBarColor.showNavigationBar();
+    return NavigationBarColor.showNavigationBar();
   } else {
     return false;
   }

@chmiiller
Copy link

shall we open a PR with this change @MorganTrudeau ? I can do it

@chmiiller
Copy link

oh, I see that there's a PR already (#37 ) and an issue #36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants