kadiraydinli / react-native-system-navigation-bar

React Native lets you customize the navigation bar for Android.
https://www.npmjs.com/package/react-native-system-navigation-bar
MIT License
270 stars 19 forks source link

Error in Sentry: Attempt to invoke virtual method 'android.view.Window android.app.Activity.getWindow()' on a null object reference #57

Closed nmalzieu closed 9 months ago

nmalzieu commented 12 months ago

Description

In com.reactnativesystemnavigationbar.SystemNavigationBarModule in setModeStyle at line 472 I think it's because you are rejecting the promise but still moving on with the code here: https://github.com/kadiraydinli/react-native-system-navigation-bar/blob/master/android/src/main/java/com/reactnativesystemnavigationbar/SystemNavigationBarModule.java#L519

You need to return after rejecting the promise like you do in many other places. Actually there are 3 or 4 places in the code where the return is missing after the reject I think.

Thanks a lot!

react-native-system-navigation-bar version

2.6.3

React Native version

0.72.5

Snack, code example, screenshot, or link to a repository

No response

kadiraydinli commented 9 months ago

A PR has been opened for this issue. For this reason, I published it with a new version. I am closing this issue. If the problem persists, feel free to reopen it.