Skip to content

[Android] Streaming broken in development builds on Expo SDK50 due to ReactNativeFlipper #23

Open
@Vali-98

Description

@Vali-98

As previously pointed out in #13 (comment) , ReactNativeFlipper breaks streaming completely.

With Expo SDK50, the nature of these files have changed:

React Native 0.73 changed from Java to Kotlin for Android Main* classes: MainApplication.java/MainActivity.java are now MainApplication.kt/MainActivity.kt. If you depend on any config plugins that use dangerous modifications to change these files, they may need to be updated for SDK 50 support.

In android/app/src/main/java/com/[name]/[app]/MainApplication.kt, here is the ReactNativeFlipper initialization:

if (BuildConfig.DEBUG) {
    ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager)
}

Simply comment it out and streaming will work once more.

if (BuildConfig.DEBUG) {
    // hacky fix for: https://github.com/react-native-community/fetch
    // ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager)
}

Though the issue is fixed on my end, I am leaving this here for the few people who come across this problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions