First of all, thanks for the new version.
After upgrade to the latest version(3.3.0), I found my socket.on('connect',callback) is not getting called.
And I find that
_this.socket.io().on(io.socket.client.Manager.EVENT_TRANSPORT, new io.socket.emitter.Emitter.Listener({
call: function (transportArgs) {
var transports = transportArgs[0];
if (transports) {
console.log('on EVENT_TRANSPORT');
transports.on(io.socket.engineio.client.Transport.EVENT_REQUEST_HEADERS, new io.socket.emitter.Emitter.Listener({
call: function (requestArgs) {
console.log('on EVENT_REQUEST_HEADERS');
var cookies = options_1['cookie'];
if (cookies) {
var headers = requestArgs[0];
var list = new java.util.ArrayList();
list.add(cookies);
headers.put('Cookie', list);
}
}
}))
}
}
}));
If I comment out these lines, everything starting to working again. I haven't digged deep to figure out the reason tough.
Another thing is I found that I have to manually convert js transports to java Array to make it work. Not sure if everyone is the same cause I'm running on old nativescript v4.2.0
if (Array.isArray(transports) && transports.length > 0) {
var list = new java.util.ArrayList();
transports.forEach(each => list.add(each));
opts.transports = list.toArray();
}
First of all, thanks for the new version. After upgrade to the latest version(
3.3.0
), I found mysocket.on('connect',callback)
is not getting called.And I find that
If I comment out these lines, everything starting to working again. I haven't digged deep to figure out the reason tough.
Another thing is I found that I have to manually convert js transports to java Array to make it work. Not sure if everyone is the same cause I'm running on old nativescript v4.2.0