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: false - in Release Mode #32

Closed huseyintamer closed 1 year ago

huseyintamer commented 1 year ago

Error is triggered by this function

await SystemNavigationBar.setNavigationColor(theme.colors.barColor);

Error Message in Sentry

Error: false
  at promiseMethodWrapper(node_modules/react-native/Libraries/BatchedBridge/NativeModules.js:105:60)
  at setNavigationColor(node_modules/react-native-system-navigation-bar/src/index.tsx:84:7)
  at next(native)
  at asyncGeneratorStep(node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
  at _next(node_modules/@babel/runtime/helpers/asyncToGenerator.js:22:57)
  at anonymous(node_modules/@babel/runtime/helpers/asyncToGenerator.js:20:14)
  at tryCallTwo(node_modules/promise/setimmediate/core.js:44:3)
  at tryCallTwo$argument_1(node_modules/promise/setimmediate/core.js:204:6)
  at Promise(node_modules/promise/setimmediate/core.js:66:3)
  at anonymous(node_modules/@babel/runtime/helpers/asyncToGenerator.js:19:24)
  at apply(native)
  at <global>(node_modules/react-native-system-navigation-bar/src/index.tsx:75:25)
  at show(src/infrastructure/navigation/Navigation.js:88:62)
  at next(native)
  at asyncGeneratorStep(node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
  at _next(node_modules/@babel/runtime/helpers/asyncToGenerator.js:22:57)
  at anonymous(node_modules/@babel/runtime/helpers/asyncToGenerator.js:20:14)
  at tryCallTwo(node_modules/promise/setimmediate/core.js:44:3)
  at tryCallTwo$argument_1(node_modules/promise/setimmediate/core.js:204:6)
  at Promise(node_modules/promise/setimmediate/core.js:66:3)
  at anonymous(node_modules/@babel/runtime/helpers/asyncToGenerator.js:19:24)
  at apply(native)
  at Nav(src/infrastructure/navigation/Navigation.js:87:13)
  at Nav(src/infrastructure/navigation/Navigation.js:121:5)
  at commitHookEffectListMount(node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:5827:31)
  at flushPassiveEffects(node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:7532:23)
  at commitRootImpl(node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:7371:7)
  at G(node_modules/scheduler/cjs/scheduler.production.min.js:13:205)
  at J(node_modules/scheduler/cjs/scheduler.production.min.js:14:128)
  at apply(native)
  at queueReactNativeMicrotask(node_modules/react-native/Libraries/Core/Timers/JSTimers.js:248:35)
  at _callTimer(node_modules/react-native/Libraries/Core/Timers/JSTimers.js:114:15)
  at _callReactNativeMicrotasksPass(node_modules/react-native/Libraries/Core/Timers/JSTimers.js:162:41)
  at callReactNativeMicrotasks(node_modules/react-native/Libraries/Core/Timers/JSTimers.js:413:12)
  at __callReactNativeMicrotasks(node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:390:42)
  at __guard$argument_0(node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:132:39)
  at __guard(node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:366:7)
  at flushedQueue(node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:131:18)
  at callFunctionReturnFlushedQueue(node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:116:29)

Error Detail link: https://sentry.io/share/issue/766768c8245e48a797726dcad8bca33f/

My Dependencies

 "react-native-system-navigation-bar": "^2.0.0",
 "react": "18.1.0",
 "react-native": "0.70.0",

Some Affected devices Xiaomi Redmi S2 (Android 9) Nokia 3.4 (Android 12) vivo 1806 (Android 10) Xiaomi Redmi 9 (Android 10)

I look forward to your help, thanks.

kadiraydinli commented 1 year ago

Hi @huseyintamer, I tested it on a few devices but could not reproduce the issue. Can you check again with the latest version of the package? In the last version, I made the reject texts more understandable.

When you run your application, can you follow it on Logcat and share the error here?

Also do you use hermes in your project? There may be an issue with it.

huseyintamer commented 1 year ago

Yeah I'm using hermes.

huseyintamer commented 1 year ago

I can't tested it because it happen some of users.

kadiraydinli commented 1 year ago

I checked again in the Android versions of the device you shared, but I could not reproduce the problem. Also, can you share the color you used? And if you have can you share more error logs?

kadiraydinli commented 1 year ago

I made improvements in the last version. You can check the latest version.