Error happens when using Sockjs


I implemented multi-play sample game 3 years ago, using playcanvas version v0.208.0.
At that time, server and client was running well.
This month, I re-join playcanvas, and restart to develop and test that source code using playcanvas version v1.35.1.
And then I get some below error. I can’t figure out the reason for this error.

TypeError: Cannot read property 'error' of undefined
    at Socket._addCallback (playcanvas-stable.dbg.js:529)
    at Socket.on 

Here is the point that error happens:

            var socket = this.socket = new Socket({ url: '<server url>' });

            socket.on('error', function(err) {

I think this code is normal source code using Sockjs.
When I use playcanvas version v0.208.0, there is no problem.
Please let me know my mistakes.


Hi @Shin_Jecheol and welcome,

I think with the latest version of you need to boot the connection like this:

var socket = io.connect('server_url');

Check this forum post for a working version:

Thanks for reply.
But I wonder why Sockjs module is not working in playcanvas latest version.