I have added user side error logging on my site. Some times it logs this kind of error coming from socket.io code:
TypeError: this.transport is undefined
The error have only been seen from users with Firefox 15th version on Windows.
On server side I define my transports like this:
this.io.configure(function(){
self.io.set('transports', ['websocket', 'flashsocket', 'htmlfile', 'xhr-polling', 'jsonp-polling']);
self.io.set('log level', 0);
});
Socket.io version is 0.9.10.
Can you please tell me what could be the reasons for this error?
Any help appreciated.
The configure
method is used for setting configuration for a specific environment. You are not specifying an environment, so you can remove the configure
callback function and simply do:
this.io.set('transports', ['websocket', 'flashsocket', 'htmlfile', 'xhr-polling', 'jsonp-polling']);
this.io.set('log level', 0);