I've been programming alot for the Leap Motion lately, writing javascript web apps for it. The Leap sends data through a websocket that you can receive in the browser. I've been using it no problem for months. All of a sudden I can't get data from it through the websocket. I uninstalled and re-installed the software, tried with a different device, tried different versions of their software, restart the computer many times and nothing helps. All the software works fine for everyone else I know with a Leap and it works fine on my other computer. It happens in firefox, chrome, and nodewebkit. It happens for stuff hosted on my server, my desktop, and other peoples servers. I'm on win7.
Now I am thinking that there is something messing with the websocket connection that isn't in their software, some setting or problem on my machine. I've tried using websocket demos I googled for and they don't seem to work either.
I went to http://websocketstest.com/ and I get disconnected on port 80, 443, and 8080, but it works on 443 with SSL.
What could it be?
This ended up being some anti virus software I installed blocking it.
Related
My app, Python/Flask and vanilla Javascript, is running just fine on my Mac's browsers and I have previously also been able, making sure I'm on the right network, to test my app on Safari on my iPhone 6. I did this by pointing my mobile browser to the IP given by ifconfig on my Mac and correct port. However, after adding Flask-SocketIO, which should allow for Websocket support or atleast long polling, I am no longer able to test my app on my iPhone. All is still fine on Macs browsers but all I get on my iPhone is "Safari could not open the page...".
My app is served over port 5000 but Ive also tried over 80 without any success. I've cleared cache and cookies as well, of course.
Has anyone experienced something similar or have any idea what is going on?
Mobile Safari needs a Content-Security-Policy meta tag. See more at https://developers.google.com/web/fundamentals/security/csp/
We are using Guacamole HTML5 Remote Desktop functionality in our application. However once we deployed Guacamole server and our customers tried accessing it from their corporate network, they have been reporting connectivity issues.
It turns out that most of the anti-virus softwares (Bitdefender, AVG etc...) are blocking access to Guacamole server through their SSL scanning feature. If we disable SSL scanning then our customers are able to connect to Guacamole server. However we cannot expect our client to permanently turn off SSL Scanning from their anti-virus software.
We also figured out that Guacamole creates an HTTP tunnel and the JS client constantly sends read and write requests. These read/write requests are of type application/octet-stream. Most of the firewall block application/octet-stream and our guess it that SSL Scanning feature in anti-virus software is also blocking because of this MIME type.
We would like to know if there is any workaround to prevent anti-virus from blocking Guacamole traffic without turning of SSL Scanning feature. We would appreciate any help, feedback or suggestions in this regard.
I was able to figure out a solution with the help from Guacamole support team. We were not using latest version of NGINX and Tomcat on our Guacamole server. Once we upgraded to latest version of these softwares, entire communication started using websockets. This also fixed all issues we were facing with anti-virus softwares.
I think your analysis of the issue is right. I had problems like this in the past with Bit Defender and ended disabling its firewall. I also had issue with fiddler (an http proxy) with long polling requests.
I'm surprised Guacamole uses an HTTP tunnel while it's an HTML5 solution and should use websockets for communication. Perhaps it's to maintain an HTTP session active.
I open sourced last month a solution comparable (Myrtille) to Guacamole. It has about the same features except it's written in C# (uses IIS and the .NET framework) instead of Java and thus is more intended for Windows Servers. If you still have issues and want to give it a try, I'll be curious and glad to have some people feeback :) (sadly few actually, it either means it works great or it's crap ^^)
This line:
var socket = new WebSocket(this.getUrl());
Causes error:
WebSocket connection to 'ws://127.0.0.1:6437/v6.json' failed: Error during WebSocket handshake: Unexpected response code: 400
I'm guessing I could get around it by using SSL but as I’m just playing around locally with MAMP it would be nice not to have to set this up. I get the same from Chrome, Firefox and Safari. The context is that I’m playing with a Leap Motion controller and everything works fine as long as it’s running remotely with SSL.
Do I really need SSL for all local development using web sockets or am I missing something?
You don't need SSL/TLS to use WebSockets unless you are connecting from a page that is also using SSL/TLS -- I'm looking t such a page right now and it works fine. Do the sample apps (Sample.html and JSONViewer.html) in the Leap Motion SDK work for you?
I'm evaluating SignalR technology for use in our new product (mobile web application for the broad audience, among other things it needs a real-time chat on some pages).
I've followed the guide to create a very basic chat demo.
Then I deployed the demo on my IIS, and started chatting to myself.
All clients were on the same WiFi network.
Desktop browsers worked more or less OK.
However, Safari on iOS 4.2, and IE on WP7.10 - they both sucked.
Sometimes nothing happened when I pressed the "post" button.
Sometimes outgoing messages were sent OK to the desktop firefox, however there was no incoming messages.
Maybe I'm missing something obvious? Maybe I need jquery mobile instead of the normal one? Maybe I should just tune the IIS/web.config/whatever, and the SignalR will flourish and start to work flawlessly even through the crappy mobile internet?
Or does it mean that since it doesn't work even while on WiFi within a single hop from the web server, I should throw SignalR away and just write some JavaScript to poll a JSON endpoint for new messages?
Thanks in advance!
I have been developing an app with phonegap (that means that uses the Safari browser) and SignalR for Android and IPhone. The major issue I had was with iOS 6.x because SignalR did not connect with default config. I have found a workaround for that and I had explained it here. Let me know if you find it useful.
This code will simulate a connect, check for messages, disconnect and wait 5 secs to solve the iOS issue.
In js add
$.connection.hub.start({ transport: 'longPolling' }).done(function (myHubConnection) { });
and in Application_Start() add
GlobalHost.Configuration.ConnectionTimeout = TimeSpan.FromSeconds(1);
Microsoft.AspNet.SignalR.Transports.LongPollingTransport.LongPollDelay = 5000;
RouteTable.Routes.MapHubs();
Not all mobile browsers (e.g. android, opera mini) support websockets. You'll find a nice chart of supporting browsers at http://www.hanselman.com/blog/YourUsersDontCareIfYouUseWebSockets.aspx
I am experiencing a problem with accessing an application from the Android-browser.
The application uses DWR to persist connections to the clients that are connected with it.
Everything works fine for me, except that if the application does not send any data to the client on the Android-phone for 2 minutes, the connection seems to be lost and no data arrive at the client. The same scenario works just fine on Firefox, Opera and Chrome. If the pause between two data transfers is less than 2 minutes, it works just fine.
So, now my question:
Is there some timeout setting for the android browser that I am missing? Or is this some built-in bug/feature/whatever that I cannot circumvent?
I know that I could prevent this from happening with some sort of heartbeat, I would just like to why this is happening.
Thanks in advance, Max
btw: Everything (server, clients) runs on my machine and I am testing this on the android emulator with Windows XP
Android emulator version 1.10 (build_id CUPCAKE-150240)
Could it be that the Android system is garbage collecting your activity and thus loosing your web browser and closing the persistent connection?
Perhaps you could check this by looking in you logcat (on android end) or webserver logs (on remote end)?
if this is the case, you would need to add reconnect code into the onresume/onstart method in android.