HTML5 Websocket Script working in Ubuntu, not working in Win7 or WinXP - html

I've installed lemmingzshadow / php-websocket on my Win7 machine, which was pretty simple to do:
unzipped the content into my htdocs folder.
executed server.php from command line.
requested the file /client/status.html from a browser that supports Websockets.
Now here's what I get on the local machine running Google Chrome 19 / Windows 7
click to enlarge
It says "connected" for 30 seconds (displaying no info from the server) then says "disconnected", and here's the related command line output:
Exact same issue when accessing the script through LAN from another computer with Firefox 12 / WinXP
click to enlarge
It only seems to work when accessing it from my VirtualBox Ubuntu, using either Firefox 7.0.1 or Chromium
click to enlarge
It's been days since I've trying to figure out why this is happening, tried other Websocket scripts and they only work when I access them from Ubuntu. I even installed this same script on Ubuntu / XAMPP and was still stuck with the same issue (script running fine on Ubuntu but not on the other operating systems).
I'm going crazy over this, any idea why it's happening??

In that code (lemmingzshadow), the default behavior is for the server to mask the data it sends to the client:
Connection.php:
public function send($payload, $type = 'text', $masked = true)
For some reason this will work in Chrome 18, but it is against the latest websocket spec and does not work in Chrome 19.
RFC 6455 Sec 5.1:
A server MUST NOT mask any frames that it sends to
the client. A client MUST close a connection if it detects a masked
frame.

Related

Chrome request not making it to server

I have a Windows 2016 Server with IIS 10.0.14393.0 installed that is maintained within an isolated VM environment. (The entire VM environment is isolated from the real-world.)
The web server is configured with three websites through IIS, and each website is assigned a dedicated IP. The contents in each of these websites is a single "hello world" html page that can be accessed via a browser from from my development workstation using Microsoft Edge, but I cannot access these pages using Chrome. The simple hello world html page was created only to assist in troubleshooting this issue.
The error received in Chrome is ERR_TIMED_OUT and based on the IIS logs, the request is never reaching the web server. IIS logs do indicate the request/reponse when accessing using Edge.
From my workstation, I can successfully ping the web server, traceroute output does not indicate any unexpected hops, etc. From all indications, the problem appears to be isolated to Chrome and only when accessing the sites on that server. I have other servers (W2016 and W2019) in the real-world with a similar configurations and real applications deployed there that work as expected with any browser.
I am using the latest Chrome Version 105.0.5195.102 (Official Build) (64-bit) and can access other web based content within this VM environment using Chrome, just not on that one server.
I am almost to the point of deleting that VM instance and starting over so any ideas/suggestions are appreciated.
The error received in Chrome is ERR_TIMED_OUT
This is a communication problem indication that there is a problem with the user's local network connection. It can appear when your internet is too slow or your connection is taking too long, or the page or website you are visiting may be too busy, or when the website in question is not set up correctly, or even if the website is trying to perform more than your server can manage.
I'm not sure if you've seen the following methods, but you can try.
Method 1: Browse in Incognito Mode and Remove Extensions.
You should first browse the website in incognito mode to check if you
can open the website normally, if so then the culprit of the
ERR_TIMED_OUT error may be your plugin or extension. Therefore, you
need to enable extensions one by one to check for errors, and if there
is an error enabling an extension, you need to remove it from your
browser.
Method 2: Delete the Default Chrome Folder
Press Win + R keys at the same time to open the Run
Type %LOCALAPPDATA%\Google\Chrome\User Data\ in the box and click OK.
Close your Chrome if it is opened.
A new window pops out, find the folder named Default. Backup the folder anywhere else, then right-click the folder to choose Delete.
After you have deleted the folder successfully, open your Chrome and
then visit the webpage again that you searched before to check if the
error still appears.
Method 3: Update Network Drivers
If your network driver is out of date, you may encounter ERR_TIMED_OUT
errors. Here's how to update network drivers.
Right-click the Start button to select Device Manager.
Scroll down to find Network Adapters and click on it to expand it.
Right-click on your network device and select Update Driver.
Select Search automatically for updated driver software option to start to search and update your network driver to a new version.
After that, restart your computer and open the sites again with Chrome
to see if you can open them.
Method 4: Disable Firewall & Antivirus Software
Sometimes, your firewall or antivirus software may cause trouble.
Therefore, you should try to disable them and check if the problem can
be solved. If you find it helpful to disable these programs, you can
check the firewall settings. Allow Chrome to connect to public or
private networks. If it doesn't work. Permanently delete these
programs, and then use other antivirus software or firewalls.
Method 5: Check Hosts File
When you meet the ERR_TIMED_OUT error accessing a specific website,
you can check the Hosts file to see if the website has been blocked.
Here is the way to do that:
Press Win + E keys at the same time to open File Explorer and then go to the Local Disk C: > Windows > System32 > Drivers > etc.
Open the host file with notepad. If you see the web address that you cannot visit, delete that entire line from the host file and save.
After that, open the Chrome and see if you can open the specific
website.
Method 6: Reinstall Chrome Browser
If none of the methods above fix the ERR_TIMED_OUT error, then you
should try reinstalling Chrome. Here is the tutorial:
Press Win + R keys at the same time to open the Run box, then type appwiz.cpl and click OK to open a new window.
Find Google Chrome in the list, and then right-click it to choose Uninstall.
After uninstalling Google Chrome successfully, you also need to delete its leftover files. Open the Run box again, then type %appdata%
and click OK to open a new window.
Find the Google folder and then right-click it to choose Delete.
Go to Google Chrome’s site to download the latest version of the browser, and then install it.
The above methods are from the web article. To avoid link being unavailable, I have also presented the details. I am not sure if the above methods can help you, but I hope you can solve the problem soon.

Cocos2d-x (JS) Android JavaScript Remote Debugging

http://www.cocos2d-x.org/wiki/Javascript_Remote_Debugging
As per above doc, I tried the same for Android, but didnt work. From firefox, on clicking 'connect', connect to remote device screen came pre-filled with ip 127.0.0.1 and port 5086. After running the app on device and trying to connect, it shows unexpected error.
Has anyone made it working?
Remote debugging of Cocos2d-x version 3.x games only works with Firefox version 36. Luckily, it is still available at https://ftp.mozilla.org/pub/firefox/releases/36.0/.
The current Firefox happily lives with version 36, just remember to keep both versions when your o/s asks. To keep them straight, I named version 36, "Firefox36".

Geolocation not working on Chrome even from a host server

I was working on a html5 file which uses geolocation. It was working fine in Chrome version 38.0.2125.111m from both loading the file locally and from a host server. Now, Chrome does not work for geolocation from either resource. I understand the security issue when running the file locally, but it still happens from any website that is running geolocation. I get the error message of "geocode service failed". BUT runs fine from both resources using Firefox. I have a windows 7 x64 laptop. The code that I am using is right off of Google geolocation example...
I've also went to the chrome's privacy-security-location settings and checked to use allow all sites to check location and still the problem continues... Help!
I think I found a clue. I copied the geolocaton file to another website and ran fine using the same chrome version which makes me believe that it is the google api keys that was causing the problem. I deleted the keys for both local and web host and will see in a few days if indeed this was the case. If it is, then I suggest not to establish api keys during development until app is ready for production.

Chrome - Vagrant box issue, can't reconnect after a connection with IE/Firefox

I have a vagrant (Debian 7 + LAMP) box available via http://localhost:8087 I use it to develop a site.
I start the box connect to it via Chrome (v37.0.2062.120 m)
Then I connect to it via IE and browse the site normally.
After this, if I go back to Chrome and refresh the page I get Error code: ERR_NAME_NOT_RESOLVED , and I can't connect back to it (via Chrome) meantime, the site works fine in IE or Firefox.
If I do a restart all goes back to normal. However I can reproduce the issue every time.
BTW: I am on windows 7 with vagrant 1.6.3

Windows Phone 8 Emulator Deployment Issue with Internet

I am facing an issue with windows 8 phone emulator.
Windows Phone emulator wasnt able to connect to Windows Phone
operating system. Phone didnt respond to connect request
This is the error that I get. When the emulator starts with internet but my application doesnot deploy. The ip that gets assigned is 192.168.137.1. Previously it worked fine,
but then suddenly it started giving this issue.
Below is the list of troubleshooting that I have performed:
169.254.xxx.xxx address set to internal emulator via dhcp, Application deployed successfully with NO internet connection
Have tried MAC address spoofing but nothing works when I use these settings.
Have changed External Virtual Switch in Sharing mode this starts the internet with ip 192.168.137.1 but application doesnot deploy
In debugger errors shown are:
Invalid pointer error
App deployment failed
Have tried Network bridging but still it doesnt work.
Created all settings manually including the internal switch and external swithch. But same issue faced when it gets 192.168.137.1 ip then internet works but application doesnt deploy.
And when it gets 169.254.xxx.xxx ip series application deploys but no internet connection.
No firewall are turned on or no antivirus is blocking any connections.
Wireless router used for network connectivity, still not successfully
Have also tried clean installation of everything but still no go.
Need help with this issue as I have been trying to get it resolved since a week.
This issue is not faced if installation is done on the same pc through a virtual machine.
What I did was :
Have allotted 4gb ram, 60gb hdd & 4 cores to the VM.
1)I installed a virtual machine with default settings.
2)Then I stopped your virtual machine (shut Windows 8 down, DO NOT suspend it).
3)At the VMWare Virtual Machine list, right click Windows 8 machine then click "Show in Finder".
4)Right click the file then click "Show package contents", then find and open with a text editor a file with the extension .vmx
5)Go till the end of the file and add this two lines (first check whether they were previously added):
hypervisor.cpuid.v0 = "FALSE"
vhv.enable = "TRUE"
6)At the VMWare Virtual Machine list, right click Windows 8, click "Preferences" then "Advanced". Choose "Intel VT-X with EPT" as "Preferred virtualization engine".
And then when I started the windows in the virtual machine it seems to be working fine without any additional setting change. However it is still not running on a physical machine
I recommend if someone is facing a similar issue then to use a Virtual Machine till this kind of issue is resolved.
Struggling with the same problem for 3 days I finally solved my issue by disabling windows firewall for "Guest or public network". I have yet to figure out what application/service to allow through so I can re-enable it.