Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not connect to the engine.io-server-java v1.0.3 using the engine.io-client v3.0.4 #28

Closed
mostekp opened this issue Dec 23, 2020 · 3 comments

Comments

@mostekp
Copy link

mostekp commented Dec 23, 2020

The engine.io-client v3.0.4 does not work with the latest version (1.0.3) of the engine.io-server-java.
There is following sentence in the migration notes from 2.x to 3.x:

"due to several breaking changes, a v2 client will not be able to connect to a v3 server (and vice versa)"
https://socket.io/docs/v3/migrating-from-2-x-to-3-0/index.html

So it looks like engine.io-server-java v1.0.3 in not a v3 server - is there a plan for the upgrade ?

Steps to reproduce:

  1. Below is my client script - in this script I'm using engine.io-client v3.0.4
  2. In the backend I'm using a copy of the io.socket.socketio.server.ServerWrapper from the socket.io-server-test
    Connection is never established - process always exit with code 1.

var io = require('socket.io-client');
var port = process.env.PORT || 3000;

console.log('socket.io port='+port);
var socket = io('http://127.0.0.1:' + port, {
autoConnect: false,
transports: ['websocket']
});
socket.on('connect', function () {
console.log('socket.io connected...')
process.exit(0);
});

socket.on('error', function (err) {
console.log('socket.io error', err);
process.exit(1);
});
socket.connect();

setTimeout(function () {
console.log('socket.io timeout...')
process.exit(1);
}, 20000);

@mostekp
Copy link
Author

mostekp commented Dec 23, 2020

I want to add that everything works fine when I downgrade the engine.io-client from v3.0.4 to v2.3.1

@trinopoty
Copy link
Collaborator

v3 is a protocol upgrade. I'm working on the changes to get the java server compatible with v3 protocol.
Expect a new version soon.

@mostekp mostekp changed the title can not connect to the can not connect to the engine.io-server-java v1.0.3 using the engine.io-client v3.0.4 Dec 23, 2020
@trinopoty
Copy link
Collaborator

I've been sitting on this for a while now. Mostly because I'm lazy.
Updated version of socket.io and engine.io are now published and should be available on maven in a few hours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants