stream closed react native 1

stream closed react native

upgrading flipper version solves the issue for me, If upgrading flipper version doesn't solve for you then try this solution.

Whoever is still struggling with this issue. it's happening because of Flipper network plugin. I disabled it and things work just fine.

My workaround to make this work is commenting outline number 43

38      NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
39      NetworkingModule.setCustomClientBuilder(
40          new NetworkingModule.CustomClientBuilder() {
41            @Override
42            public void apply(OkHttpClient.Builder builder) {
43      //        builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
44            }
45          });
46      client.addPlugin(networkFlipperPlugin);
in this file android/app/src/debug/java/com/maxyride/app/drivers/ReactNativeFlipper.java

Here is what the above code is Doing:
1. It’s creating a new NetworkFlipperPlugin object.
2. It’s creating a new NetworkingModule.CustomClientBuilder object.
3. It’s adding a new network interceptor to the OkHttpClient.Builder object.
4. It’s adding the networkFlipperPlugin object to the client object.

The problem is that the networkFlipperPlugin object is null.

The solution is to comment out line 43.

Similar Posts