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

Twisted 16.3 appears to never call onMessage in Websocket protocol #31

Closed
andrewgodwin opened this issue Jul 8, 2016 · 8 comments
Closed
Labels

Comments

@andrewgodwin
Copy link
Member

The symptom is that the websocket.receive channel never gets anything sent to it when people send in websocket frames.

What's happening as far as Daphne is concerned is that onMessage never gets called on the WebsocketProtocol class. I've tested on Python 2 and 3 and both aren't working. Reverting to 16.2 fixes it, so I've pinned Daphne to that for now in the latest patch release while this is investigated.

@andrewgodwin
Copy link
Member Author

Verified that Autobahn itself works fine by running the echo server on 16.3, so it's something in daphne.

@AlexejStukov
Copy link

The new version of twisted (16.3.1) fixed the issue for me. Maybe this can be closed?

@andrewgodwin
Copy link
Member Author

When I get a working dev laptop I will verify and remove the pin if true :)

@imaurer
Copy link

imaurer commented Aug 19, 2016

FYI - Daphne on Twisted 16.2.0 works for us. But fails on 16.3.1 and 16.3.2 for us.

Ping me if you need more details. We are reverting Twisted back to 16.2.0 for now.

@andrewgodwin
Copy link
Member Author

I have also verified that Twisted 16.3.2 does not fix this, so leaving the pin in place.

@AlexejStukov Could you say what versions of autobahn and daphne you have installed? Would like to know how it's working for you.

@bpeschier
Copy link
Contributor

Ran into this issue today while picking up a side-project and wondered why I left it broken. Turns out updating dependencies is not as harmless as I thought :-)

Running channels 0.17.2, daphne 0.14.3 and autobahn 0.16.0

Twisted 16.2.0 runs fine, 16.3.0 and above (up to todays current, which is 16.4.0) do not.

@bpeschier
Copy link
Contributor

This took some digging.

Twisted 16.3 implemented some changes to the http handling, one of which is shutting down (pausing) the producer when all content is thought to be received.

If my reasoning is correct, we only need to resume the producer after we handled the upgrade in process() of WebRequest. Seems to work in 16.2 and up.

@andrewgodwin
Copy link
Member Author

OK, fix finally released in daphne 0.15.0.

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

4 participants