Skip to content
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

websocket-client vs websockify>0.8 error: Text frames are not supported #2120

Closed
totaam opened this issue Jan 23, 2019 · 2 comments
Closed
Labels

Comments

@totaam
Copy link
Collaborator

totaam commented Jan 23, 2019

See #2104#comment:4.

Let's make it work and improve the error messages so we can see the reason for the failure without using tcpdump..

Server log:

2019-01-23 23:58:26,107 new_websocket_client() calling <function new_websocket_client at 0x7f479687a398>, request=<websockify.websocket.WebSocket object at 0x7f47a07269d0(<class 'websockify.websocket.WebSocket'>)
2019-01-23 23:58:26,108 new_websocket_client(<xpra.server.websocket.WSRequestHandler instance at 0x7f47969761b8>) socket=<socket._socketobject object at 0x7f47a08a64b0>
2019-01-23 23:58:26,201 waiting for data: 
2019-01-23 23:58:26,201 waiting for data: 
2019-01-23 23:58:26,202 waiting for data: 
2019-01-23 23:58:26,202 waiting for data: 
2019-01-23 23:58:26,202 waiting for data: 
2019-01-23 23:58:26,202 waiting for data: 
2019-01-23 23:58:26,202 waiting for data: 
2019-01-23 23:58:26,202 waiting for data: 
2019-01-23 23:58:26,206 waiting for data: 
2019-01-23 23:58:26,206 Warning: websocket connection already closed:
2019-01-23 23:58:26,206  1000: Locally initiated close
2019-01-23 23:58:26,207 error closing <websockify.websocket.WebSocket object at 0x7f47a07269d0>
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/xpra/server/websocket.py", line 348, in close
    request.close()
  File "/usr/lib/python2.7/site-packages/websockify-0.8.0-py2.7.egg/websockify/websocket.py", line 497, in close
    self._close()
  File "/usr/lib/python2.7/site-packages/websockify-0.8.0-py2.7.egg/websockify/websocket.py", line 695, in _close
    self.socket.close()
AttributeError: 'NoneType' object has no attribute 'close'

Client log:

2019-01-23 23:58:26,375 websocket ws://localhost:10000/.close() for socket=<websocket._core.WebSocket object at 0x7f4965f3e310>
2019-01-23 23:58:26,376 websocket ws://localhost:10000/.close() done
2019-01-23 23:58:26,376 Error: failed to receive anything, not an xpra server?
2019-01-23 23:58:26,376   could also be the wrong protocol, username, password or port
2019-01-23 23:58:26,376   or the session was not found
2019-01-23 23:58:26,377 Connection lost

ngrep capture:

T 127.0.0.1:10000 -127.0.0.1:47424 [AP] #12
  88 2c 03 eb 55 6e 73 75    70 70 6f 72 74 65 64 3a    .,..Unsupported:
  20 54 65 78 74 20 66 72    61 6d 65 73 20 61 72 65     Text frames are
  20 6e 6f 74 20 73 75 70    70 6f 72 74 65 64           not supported  
####
T 127.0.0.1:47424 -127.0.0.1:10000 [AP] #16
  88 82 cc 4c 22 6a cf a4                               ...L"j..
@totaam
Copy link
Collaborator Author

totaam commented Jan 24, 2019

Alternatively, we could switch to using websockify in client mode instead of websocket-client - which would also reduce the number of dependencies.

@totaam
Copy link
Collaborator Author

totaam commented Feb 7, 2019

Fixed by not using websockify or websocket-client!
See #2121

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant