-
Notifications
You must be signed in to change notification settings - Fork 83
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
websockets 14.0 support #1769
websockets 14.0 support #1769
Conversation
Some types changed, and process_request is totally different. However, this still leaves a spurious, scary-looking error when using the Run App button from the current version of the Shiny VS Code extension.
If we're OK with requiring |
No need to pass through to the background thread, we can just change the loglevel on the main thread.
Oh I forgot to mention how I solved the scary error message: by defaulting the websocket logger to You can set |
It's hard to set this environment variable when you're debugging in VS Code, but I spent a while looking at both sides and I think ultimately this is the right choice, at least for now. I doubt Shiny users need to see any of the websockets debug messages; in fact, I'd think these messages are more likely to be noise or intimidating than useful. And in the edge cases where we or power users need to see them we still can. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
@karangattu A note for QA: we should do some quick smoke tests in GitHub Codespaces, Posit Workbench, etc. before release just to be sure.
Yes, I can test it as soon as it is merged. Or. do you want me to checkout the branch and test it against that? |
@gadenbuie Yeah, I ended up setting the environment variable in my Wonder if websockets would be open to a PR that silences this particular case... |
They might be open to it. It's very similar to another case where this kind of error appears that was fixed in 14.1 released last night. python-websockets/websockets#1513 |
See #1766
The websockets package released 14.0 which breaks us when using
shiny run --reload
.process_requests
callback has changed.EOFError: stream ends after 0 bytes, before end of line
andEOFError: connection closed while reading HTTP request line
. I think this is happening because Shiny's VS Code extension connects via a raw socket just to see if a newly launched Shiny process is listening for requests yet, and if the connection is successful, it immediately closes the connection. The new websockets seems not to like this.Once we get this working, I think we also need to decide whether to require 14.0, or to allow older versions and adapt to whatever version is being used.