Raspberry Pi not receiving Spark events

I developed a Node application that works fine on my windows laptop, but when I tried running it on my raspberry pi, no events were being received on the pi.

This is the code that I’m having problems with

spark.on('login', function() {
    console.log("logged in to spark api");
    alert("logged into spark api");
   
    
    //Get updates for every event from our devices
    spark.getEventStream(false, 'mine', function(data) {
       alert("got event");
        var rawData = JSON.stringify(data);
        console.log("event stream event: " + rawData + "\n");
        var data = JSON.parse(rawData);
                //code continues....

So the raspberry pi is actually able to the connect to the spark cloud because alert("logged into spark api"); pops up on the screen.
But alert("got event"); never appears.

I’m using the Epiphany web browser.

Does anyone know why it’s not working.

The code is running in the client?

Some browsers don’t support Server Sent Events. I think even IE doesn’t, but Chrome and Safari do. So what may be happening is the underlying spark library uses SSE but the browser simply can’t handle.it.

Actually, in my previous code, I only used HTML and javascript and SSE, but with this new code, I’m using Node and the spark javascript library and not any SSE.
So I think I’ll have to go back to using my SSE code.