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

I see some `IllegalViewOperationException: current activity is null` errors in Sentry #55

Closed nmalzieu closed 11 months ago

nmalzieu commented 12 months ago

Description

Hi,

I see some errors in Sentry : Capture d’écran 2023-11-17 à 11 32 17

From the code, I see that there are many places where there is

promise.reject("Error: ", "current activity is null");
 return;

But two places where you actually throw:

throw new IllegalViewOperationException("current activity is null");

Would that make sense to only reject so this can be catched by RN and not crash?

react-native-system-navigation-bar version

2.6.1

React Native version

0.72.5

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

No response

kadiraydinli commented 11 months ago

Hi @nmalzieu, I removed exception handling. You can use the latest version.

nmalzieu commented 11 months ago

@kadiraydinli thanks, will try it out!