Recurring Error When Client Connects to Webserver

If you have a question or need help, this is the place to be.
Post Reply
therealbiglou
Experienced User
Posts: 141
Joined: Sat May 19, 2012 4:33 am

Recurring Error When Client Connects to Webserver

Post by therealbiglou » Wed Jun 10, 2020 2:21 am

I'm getting a new error that's popping up continuously when a client connects to my webserver:

Code: Select all

9:18:33 PM   Webserver.WsClientConnected [('172.221.180.100', 61356)]
9:18:36 PM   Traceback (most recent call last) (0.5.0-rc6):
9:18:36 PM     File "C:\Program Files (x86)\EventGhost\plugins\Webserver\__init__.py", line 1049, in handle_one_request
9:18:36 PM       opcode = self.rfile.read(1)
9:18:36 PM     File "socket.pyc", line 384, in read
9:18:36 PM   timeout: timed out
9:18:39 PM   ----------------------------------------
9:18:39 PM   Exception happened during processing of request from ('::ffff:172.221.180.100', 61356, 0, 0)
9:18:39 PM   Traceback (most recent call last):
9:18:39 PM     File "SocketServer.pyc", line 596, in process_request_thread
9:18:39 PM     File "SocketServer.pyc", line 331, in finish_request
9:18:39 PM     File "SocketServer.pyc", line 652, in __init__
9:18:39 PM     File "BaseHTTPServer.pyc", line 342, in handle
9:18:39 PM     File "C:\Program Files (x86)\EventGhost\plugins\Webserver\__init__.py", line 1071, in handle_one_request
9:18:39 PM       length = self.rfile.read(1)
9:18:39 PM     File "socket.pyc", line 384, in read
9:18:39 PM   timeout: timed out
9:18:39 PM   ----------------------------------------
This happens over and over again but immediately stops when the client closes the connection. Oddly, this does not cause any loss of functionality. Any button I press works in EG and EG is able to update the page through broadcasted values without issue. Any idea what could cause this?

Sem;colon
Plugin Developer
Posts: 697
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Recurring Error When Client Connects to Webserver

Post by Sem;colon » Wed Jun 10, 2020 4:17 am

Are you using a certificate with the webserver?
If you like my work, Image me a drink :wink:

therealbiglou
Experienced User
Posts: 141
Joined: Sat May 19, 2012 4:33 am

Re: Recurring Error When Client Connects to Webserver

Post by therealbiglou » Wed Jun 10, 2020 11:54 am

I am not.

User avatar
kgschlosser
Site Admin
Posts: 5395
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Recurring Error When Client Connects to Webserver

Post by kgschlosser » Fri Jun 12, 2020 10:45 pm

one side or the other is waiting for some kind of a response it seems and not disconnecting until the timeout occurs.
I do not know what your explicit setup is but you can test and see if it is possibly whatever your are connecting from causing the problem by connecting via a browser with ?TestEvent appended onto the URL. you should see an event get generated in EG and ideally no error should occur.
If you like the work I have been doing then feel free to Image

therealbiglou
Experienced User
Posts: 141
Joined: Sat May 19, 2012 4:33 am

Re: Recurring Error When Client Connects to Webserver

Post by therealbiglou » Sat Jun 13, 2020 2:09 pm

Adding ?TestEvent produces the appropriate event in EG. There's no loss of functionality when using the web app, and it does this regardless of the device: desktop browsers, mobile devices, and even a native Android app using gonative.io.

Okay, so I swapped out the index.html with a completely plain html template that just displays Hello World! This has stopped the continuous errors in EG, so it appears there is an issue with my JS somewhere... I'll have to try and narrow things down. I'll report back with my findings in case other people have this issue in the future.

User avatar
kgschlosser
Site Admin
Posts: 5395
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Recurring Error When Client Connects to Webserver

Post by kgschlosser » Sat Jun 13, 2020 6:31 pm

That test was only for the purposes of locating your problem. Which It done! You have to work each part of the problem. testing each and every single step. The problem is going to reveal it's self to you. If you need a hand with the index page post it up here and I am sure that either myself or sem;colon will be able to have a look at it. The more eyes the better with issues like this one because the problem may not pop right out. These kinds of issues can be the frustrating ones to locate.
If you like the work I have been doing then feel free to Image

Post Reply