-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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 HTTP/1.1 405 error (sui release >= 1.28) #18429
Comments
Thanks for flagging this. I'll have a look as soon as possible. Just to verify, you are running a local network, correct? |
Correct. |
Cool, thanks. I will try to look at it a bit later today and get back to you. |
Found something. It seems that websocket support is being deprecated for JSON-RPC and the change 0fba424 defaults to "HTTP only" service. I assume this is to nudge people to integrate with GraphQL instead. Once you confirm, you can close this issue (my solution being to make GraphQL works for localnet...). |
Yes, I suspected that might be the case but had a few things on my plate until now. Feel free to open another issue if you are encountering issues with GraphQL. |
Steps to Reproduce Issue
Expected Result
Successful Websocket connection to "sui start" process from Rust code.
Actual Result
HTTP status code 405 is always returned when trying to open the connection.
This was working for a long time, and it started to fail with release 1.28
The following tests were all done today with the same Rust backend code, the only change is the sui binary version
Verified Broken
sui 1.28.0-6a179c58a848 (devnet branch, pre-compiled Mysten assets)
sui 1.29.0-45877014d1e2 (today's Mysten main branch, my own cargo build)
Verified No Problem
sui 1.27.0-19df63a5441d (devnet branch, pre-compiled Mysten assets)
sui 1.27.2-9e2be6ad4185 (testnet branch, pre-compiled Mysten assets)
System Information
Ubuntu, rustc 1.73
tokio-tungstenite 0.21 (websocket library)
Code and Logs
Related code calling into tungstenite::connect:
[2024-06-26T20:19:22Z INFO suibase_daemon::workers::websocket_worker] Connecting to "ws://0.0.0.0:9000"
[2024-06-26T20:19:23Z ERROR suibase_daemon::workers::websocket_worker] connect_async error: Http(Response { status: 405, version: HTTP/1.1, headers: {"access-control-allow-origin": "*", "vary": "origin", "vary": "access-control-request-method", "vary": "access-control-request-headers", "allow": "POST", "content-length": "0", "date": "Wed, 26 Jun 2024 20:19:22 GMT"}, body: Some([]) })
The text was updated successfully, but these errors were encountered: