kanzitelli / rnn-starter

🤹 React Native Starter - Powered by cli-rn, React Native Navigation, Expo Modules, RNN Screens, RN UI lib, MMKV, Mobx, Reanimated 2, Dark Mode, Splash Screen, Localization, Notifications, Permissions, and much more.
https://starters.dev
MIT License
550 stars 72 forks source link

Updating to RN 0.65.1 #48

Closed kanzitelli closed 3 years ago

kanzitelli commented 3 years ago

Everything works well, except for the crash on Android causing by RNN (however, works on iOS).

So, now waiting for RNN v8 :)

kanzitelli commented 3 years ago
kanzitelli commented 3 years ago

It crashes on Android when I toggle the theme 2-3 times in the Settings tab and shows this error (from logcat):

E/libc++abi: terminating with uncaught exception of type std::runtime_error: Unable to retrieve jni environment. Is the thread attached?

Not sure from which library this is coming, needs more investigation. My first thought was bc of MMKV but I have tried Async Storage and it crashed as well. So maybe it happens because of the RNN's setDefaultOptions or mergeOptions.

Mohamed-kassim commented 3 years ago

@kanzitelli current crash is related to react-native-reanimated compatibility issues with rn65 You can check these issues

https://github.com/software-mansion/react-native-reanimated/issues/2256#issue-960679169

https://github.com/software-mansion/react-native-reanimated/issues/2290#issue-973048083

kanzitelli commented 3 years ago

Thank you @Mohamed-kassim for the links!

kanzitelli commented 3 years ago

I have dig into more and found out that this error

E/libc++abi: terminating with uncaught exception of type std::runtime_error: Unable to retrieve jni environment. Is the thread attached?

happens when I try to change key of a Root component (when changing ui.themeMode) from utils/designSystem.tsx-->withThemeModes(). Also, when I try to call Navigation.setRoot() second time (not sure if I can do that) during an app launch.