Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event Listeners Not Triggering in Expo Environment #68

Open
sudo2801 opened this issue Nov 8, 2024 · 2 comments
Open

Event Listeners Not Triggering in Expo Environment #68

sudo2801 opened this issue Nov 8, 2024 · 2 comments

Comments

@sudo2801
Copy link

sudo2801 commented Nov 8, 2024

I'm facing an issue where event listeners for 'message' and 'error' aren't being invoked when using the library within an Expo app, despite the EventSource connection being established.

Environment:

Expo SDK Version: 51.0.0
Platform: Android, iOS

Expected Behavior:
The 'message' event listener should be invoked when the server sends an event, and the 'error' event listener should be triggered in case of connection errors.

I kindly request your assistance in resolving this issue. Please let me know if you require further information or have any suggestions.

@EmilJunker
Copy link
Contributor

It's possible that Expo's dev tools interceptor is blocking the event-stream. See expo/expo#27526

Here is a possible fix: https://github.com/MartinHarkins/expo-sse-patch

@amit13091992
Copy link

@EmilJunker The Same issue is there with React-Native-CLI as well.

It was working around a week ago, but suddenly it is not working.

    "react": "^18.2.0",
    "react-native": "^0.73.9",
    "react-native-sse": "^1.2.1"
And in android it is not triggering due to that using workaround with

"react-native-oksse": "^0.2.0",

Please someone help around on this issue fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants