React Native Uikit is crashing upon initialization

React Native Uikit crashes when initialized
I’m trying to integrate Sendbird UIKit v3.8.6 in my React Native 0.78.0 app, but it crashes on both iOS and Android when initializing SendbirdUIKitContainer.

iOS Crash

  • Error in FlatListInternal.tsx
  • Line causing issue:
require('react-native').FlatList;
  • Error Message:
requiring unknown module ‘undefined’
  • Possible Cause:
    It seems like require('react-native') is not resolving correctly.

Android Crash

  • Error in react-native-create-thumbnail
  • Line causing issue in CreateThumbnailModule.java:
import com.facebook.react.bridge.GuardedResultAsyncTask;
  • Error Message:
cannot find symbol
  • Possible Cause:
    GuardedResultAsyncTask was removed in React Native 0.78.0, and this dependency is not updated yet.

Steps to Reproduce

:one: Follow the Sendbird UIKit for React Native Tutorial.
:two: On Step 6, wrap the app in <SendbirdUIKitContainer>.
:three: Run the app.
:four: iOS crashes immediately.
:five: Android crashes due to react-native-create-thumbnail.

Environment Information

  • UIKit Version: @sendbird/uikit-react-native 3.8.6
  • React Native Version: 0.78.0
  • Platforms Affected: iOS & Android
  • Package Manager: npm / yarn
  • Using MMKV for local caching? :white_check_mark: Yes

[UIKit Version 3]

// What version of the SDK are you using?
@sendbird/uikit-react-native 3.8.6

[Frequency]
100%

[Current impact]
Blocked

I have the same issue with require('react-native').FlatList; in Android

The problem GuardedResultAsyncTask with the 0.77.1 you don’t have any problem but if you prefer 0.78.X in the repo have a pending push request to fix.

To use the 0.78.0 you can replace the CreateThumbnailModule.java with patch-package