86
Views
4
Comments
Solved
[SSE Push Event Hub] Problem using component with events
sse-server-event-hub-and-client
Service icon
Forge asset by Nuno Damaso
Application Type
Service

Hi,

This componente works fine, but i have an issue that when i try to use events to just send message for a given user it gives me an error.
For example, i have a page where i send messages and i have a event name, in another page i insert the same event name and it gives me the following error when i try to send a message.

I went to your JS and i changed this:
To this:

And this way it works fine, just the pages where i have the same event name receives the message that i sent, but, when i redirect to another page it's giving me an error on the ondestroy:

Any solution?

2024-09-08 11-13-40
Nuno Damaso
 
MVP
Solution

Hi António, 

Thank you for your effort pin-pointing this.

If you want a quick-fix, a little bellow on the correction you made, add this to the return statement:


I've been giving more love to the MSFTFetchEventSource implementation and this was overlooked. 

You can check the Chess App on a full implementation with events using MSFT's Fetch: https://www.outsystems.com/forge/component-overview/13711/chess


I will be uploading a new version with this issue fixed in the next couple of days.


Thanks again

UserImage.jpg
Matt Geiger

@Nuno Damaso  Can I ask where this fix was done?    I cannot find the JS file anywhere.    I am getting the same error on a client with named event.

UserImage.jpg
Matt Geiger

Disregard the previous message.    The module is SSE_Lib and the script is SSEEventSource.

The code you added DID resolve the issue.   Thanks!

UserImage.jpg
António Ribeiro

Perfect, thank you

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.