flipper icon indicating copy to clipboard operation
flipper copied to clipboard

FlipperOkhttpInterceptor making SSE not working

Open tmirun opened this issue 4 years ago • 8 comments

🐛 Bug Report

in the reactNativeFlipper.java, the following lines making EventSource (SSE) not working.

....
NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
      NetworkingModule.setCustomClientBuilder(
          new NetworkingModule.CustomClientBuilder() {
            @Override
            public void apply(OkHttpClient.Builder builder) {
              builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
            }
          });

Environment

Android, Flipper 0.93, react native 0.64.0

tmirun avatar Jun 21 '21 16:06 tmirun

I am not sure if this is a bug or is normal behavior.

we discovered it in the following conversation: https://github.com/facebook/react-native/issues/28835

tmirun avatar Jun 21 '21 17:06 tmirun

any news about this ?

axwell avatar Sep 10 '21 10:09 axwell

@axwell in production mode SSE/EventSource it is working, that networkFlipperPlugin is only applied in development mode, for you can intercept the network calls and show it in Flipper.

tmirun avatar Sep 10 '21 12:09 tmirun

We don't really use the OkHttpClient interceptor internally, so if anybody wants to investigate if this could be wired better, PRs are welcome!

mweststrate avatar Sep 14 '21 10:09 mweststrate

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

stale[bot] avatar Jan 08 '22 22:01 stale[bot]

I'll like to keep this issue open :) We still have the same problem on our side too.

KillianH avatar Jan 11 '22 23:01 KillianH

You're interested in investigating it further? Otherwise there is little value in keeping issues open that no one is willing to invest in.

mweststrate avatar Jan 12 '22 09:01 mweststrate

Yeah, ran into this issue at work today. Works fine on release versions of Android apps, but not debug.

What does this specific snippet of code do? Is it required to use Flipper in normal debugging practices?

forkball avatar Feb 15 '23 21:02 forkball

Still looking for some insight into this code snippet.

What does this specific snippet of code do? Is it required to use Flipper in normal debugging practices?

forkball avatar Apr 24 '23 18:04 forkball

Same here. @forkball Did you find any solution?

fa2id avatar May 10 '23 04:05 fa2id

Same here. @forkball Did you find any solution?

I just commented the snippet in question out for the time being.

forkball avatar May 10 '23 14:05 forkball