Open taniibarra opened 2 months ago
I'm using this library on React Native 0.74 without issues. There must be some problem with your code.
Have you checked if the problem also occurs in RELEASE mode?
i'm getting the same problem in "react-native": "0.71.8" and "react-native-sse": "^1.1.0". I have tried using version 1.2.1 but it still doesn't work.
i tried creating a new project "react-native": "0.74.3" and used "react-native-sse": "^1.2.1" for this one worked fine. are there any changes that need to be adjusted for previous versions of react native?
@NurRachman In version 0.74 of react-native, the Flipper plugin was removed. That's why react-native-sse is now working right out of the box.
In older versions of react-native, you need to manually disable Flipper. As long as Flipper is enabled, SSE won't work in debug builds.
@EmilJunker I've tried it, and it works. Thanks.
any updates on this? Need a fix for this issue. Here are my package version information
"react": "18.2.0",
"react-native": "^0.73.6",
"react-native-sse": "^1.2.1",
@amit13091992 You need to disable Flipper, see https://stackoverflow.com/questions/69235694/react-native-cant-connect-to-sse-in-android/69235695#answer-69235695
As long as Flipper is enabled, SSE won't work in debug builds on Android.
@amit13091992 You need to disable Flipper, see https://stackoverflow.com/questions/69235694/react-native-cant-connect-to-sse-in-android/69235695#answer-69235695
As long as Flipper is enabled, SSE won't work in debug builds on Android.
@EmilJunker this file is not available in my project, as I am using the new version of react-native.
this file is not available in my project, as I am using the new version of react-native.
Just search your project for the word "Flipper". I assure you that you will find it somewhere.
Hello everyone,
I checked the case yesterday and in the latest version of React Native (0.74.3), the issue does not occur. I also checked version React Native (0.73.6) and I have to confirm that the problem occurs. In Expo 51, event-stream
is blocked by the dev tools interceptor. Theoretically, the problem has been resolved, but for some reason, events are not dispatched until the stream ends.
In Expo 51,
event-stream
is blocked by the dev tools interceptor.
There is supposedly a fix for the Expo dev tools interceptor, available here: https://github.com/MartinHarkins/expo-sse-patch Did you try it?
Hi, @EmilJunker – Have you guys considered adding a note to the README telling people to disable Flipper for RN < 0.74, specifically for Android in debug? I ran into this problem myself and fortunately found this thread relatively quickly. Others might not be so lucky if they're working purely from the install instructions in the README. Just a suggestion :)
My application does not receive events in android but it does in ios. We don't have the Flipper java plugign and still in DEBUG mode it is only in [EventSource] Will open new connection in 500 ms. After that nothing else arrives. In IOS it works correctly and events continue to arrive.