-
Notifications
You must be signed in to change notification settings - Fork 75
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
wss not working with cordova 3.4.0 #43
Comments
i use cordova 3.4.0 and working :) |
Im also having a problem here. Its just with SSL/wss. Version 3.5.0 |
I am also experiencing this issue |
guys please share your index.html with me on jsfiddle or somewhere else so I can take a closer look. |
I think maybe this is related to the ssl cert. |
I'm experiencing the same issue. My app is on SSL also. What I got so fare is that if I use the following code (actually tried it in my app): function init() {
var socket = new WebSocket("wss://echo.websocket.org");
socket.onopen = function(){
alert("opend");
};
socket.onclose = function(){
alert("closed");
};
}
document.addEventListener("deviceready", init, false); It does open a connection. If I switch to my own domain, it does not work and the closed alert will fire. This does not work: function init() {
var socket = new WebSocket("wss://m.ladestasjoner.no/primus/");
socket.onopen = function(){
alert("opend");
};
socket.onclose = function(){
alert("closed");
};
}
document.addEventListener("deviceready", init, false); I use primus and ws for web socket transport. If I run the web socket code above which does not work in ex Chrome, it does connect and the opened alert fire. Iow, the example does work from a browser with web socket support but not from our phonegap app with this plugin. To feed the theory about certificate problems: our certificate is a RapidSSL SHA256 CA - G3 certificate. websockets.org seems to be using a Go Daddy Secure Certificate Authority - G2. There is also a difference between TLS versions on our servers (node.js) and the one a websocket.org. Can this problem be bound to TLS versions? I had this working before we had to update our certificates due to them expiring. |
I was able to debug this a bit more (and found a workaround for me). Our servers are at the moment hosted at nodejitsu and there the app is exposed on our own domain and on an additional *.jit.su domain owned by nodejitsu. The *.jit.su domain which our app is exposed at is available at SSL but with a SSL certificate owned by nodejitsu (its a DigiCert Global Root CA). So, my server app code is running on two domains with two different certificates. I am able to connect to the *.jit.su domain over SSL, but not able to connect to the same app on my own domain over SSL. iow: this does not work: function init() {
var socket = new WebSocket("wss://m.ladestasjoner.no/primus/");
socket.onopen = function(){
alert("opend");
};
socket.onclose = function(){
alert("closed");
};
}
document.addEventListener("deviceready", init, false); This does work: function init() {
var socket = new WebSocket("wss://ladestasjoner-mobile.jit.su/primus/");
socket.onopen = function(){
alert("opend");
};
socket.onclose = function(){
alert("closed");
};
}
document.addEventListener("deviceready", init, false); Any ideas what can be causing this? |
i used mkuklis/phonegap-websocket like example but work on genymotion but when i install in my android mobile it is not install (App not install) |
function init() {
var socket = new WebSocket("wss://echo.websocket.org");
socket.onopen = function(){
alert("opend");
};
socket.onclose = function(){
alert("closed");
};
}
I also tried ripple to test the project. Hope the result is helpful:
We seem to be missing some stuff :(
What is kinda cool though you can fill in the textarea to pass a json object to the callback you want to execute
The text was updated successfully, but these errors were encountered: