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

Invalid Frame Header with Skipper reverse proxy and async_mode=aiohttp #300

Closed
nebularazer opened this issue May 22, 2019 · 2 comments
Closed
Labels

Comments

@nebularazer
Copy link

When using the aiohttp example from the examples folder and use Skipper as reverse proxy Chrome logs WebSocket connection to 'ws://localhost:8000/socket.io/?EIO=3&transport=websocket' failed: Invalid frame header' failed: Invalid frame header to the console.

The aiohttp example works with nginx and without any proxy.
The asgi example works with skipper, nginx and without any proxy.
A nodejs test server also works with skipper, nginx and without any proxy.
I am using transports: ['websocket'] to force the client to use websockets only

Versions used:

  • pytohn 3.7.3 (also tested with paython 3.6.8)
  • aiohttp 3.5.4
  • python-engineio 3.5.2
  • python-socketio 4.0.2
  • skipper v0.10.216

How to reproduce:

  • edit app.html to force websockets only. change line 10:
var socket = io.connect('http://' + document.domain + ':' + location.port + namespace, {
    transports: ['websocket']
});
  • run skipper with docker:
docker run --rm -it --network host registry.opensource.zalan.do/pathfinder/skipper:v0.10.216 skipper -experimental-upgrade -experimental-upgrade-audit -application-log-level DEBUG -address :8000 -inline-routes 'r: * -> "http://127.0.0.1:8080/"'
  • run python app.py
  • check console output from skipper (has websocket audit enabled) and chrome console for "invalid frame header" -> ws connection is dropped immediately after it has been established.
@miguelgrinberg
Copy link
Owner

I think this is something that needs to be taken to the aiohttp project, the websocket implementation is theirs. I suggest you try one of their WebSocket examples (maybe this one) to confirm that you see the same problem without this package.

@nebularazer
Copy link
Author

Hey Miguel, thanks for your fast response!

I tested with the example from aiohttp and can confirm this still does not work with skipper.
The error message is a different one: WebSocket connection to 'ws://localhost:8000/' failed: One or more reserved bits are on: reserved1 = 0, reserved2 = 1, reserved3 = 1

I will take this issue to their project or talk to one of the maintainers of skipper, maybe we can figure something out.

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

2 participants