Skip to content

Node.js/Socket.io not returning results in IE, using a secure connection #444

@editstudio

Description

@editstudio

I have successfully implemented socket.io, node.js and express to server realtime json data to all browsers except IE (testing on 9) using a secure connection. This worked fine everywhere until I moved it behind https. From the server console output, it shows that an event is received when called from IE:

xhr-polling received data packet 5:::{"name":"lookup_place","args":
[{"place":"Berlin"}]}
However, no response is given and the next 4 lines shown in the console are:

clearing poll timeout
xhr-polling writing 8::
set close timeout for client 27081179790885432
xhr-polling closed due to exceeded duration
When the same is done from FF or Chrome, the line "xhr-polling writing 8::" is appended with the correct response, for example:

xhr-polling writing 5:::{"name":"place_results","args":[{"a":
[{"identifier":"52156","value":"Monschau, 52156"},
{"identifier":"67590","value":"Monsheim, 67590"},
{"identifier":"04617","value":"Monstab, 04617"}]}]}
I am using node.js version 0.4.10, socket.io version 0.7.7 and express version 2.4.3. The same scripts worked perfectly fine in IE 7-9 without an https/ssl/secure connection.

Any help would be greatly appreciated in discovering why no response is delivered in IE but works fine in all others.

Activity

editstudio

editstudio commented on Aug 9, 2011

@editstudio
Author

For more details, you can have a look at the source here: https://gist.github.com/1134193

No magic happening in the server, and the client_snippet.js is just a function that registers the socket events, there is no other socket.io related code in the file but if someone would like the the full script to try and replicate it with their own key/crt let me know and i will send it to you.

Thanks again!

Pita

Pita commented on Aug 9, 2011

@Pita
Contributor

are you using a reverse proxy? Or how do you add https?

editstudio

editstudio commented on Aug 10, 2011

@editstudio
Author

No reverse proxy, just a https server on port 3000 (and express has been removed) providing options as per doc description.

server = https.createServer(options, function (req, res) {
res.writeHead(200);
res.end("hello world\n");
});

io = io.listen(server);
server.listen(process.argv[2]);

Where options, is a dictionary with values for the key, crt and ca file and on the client side secure:true is set on the Socket instance. The setup worked wonders without a secure connection across all browsers however in IE9, with https, no data is emitted to the client but the data is received.

For example:

socket.on('lookup_place', function(data){
console.log('This is output in the log.',data);
socket.emit('place_results',{a:matching_places(data.place)});
});

Output the log message but appears that the socket.emit times out.

editstudio

editstudio commented on Sep 5, 2011

@editstudio
Author

Do not know what exactly happened in the code base since version 0.7.7 till 0.8.2 but the issue no longer comes up.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Pita@editstudio

        Issue actions

          Node.js/Socket.io not returning results in IE, using a secure connection · Issue #444 · socketio/socket.io