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

[Question] examples/chat seems not working well #966

Open
1 task done
waro163 opened this issue Nov 22, 2024 · 6 comments
Open
1 task done

[Question] examples/chat seems not working well #966

waro163 opened this issue Nov 22, 2024 · 6 comments
Labels

Comments

@waro163
Copy link

waro163 commented Nov 22, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

when i run the example/chat code, it can NOT work as expect, when i open http://localhost:8080/ and send some message, it will show "Connection closed."
then i use Postman(https://www.postman.com/) to test WebSocket connecting, connect localhost:8080/ws is good, but when i send some message to server, it will Disconnected, and get a error: Disconnected from localhost:8080/ws 1002 Protocol Error: RSV1 set, bad opcode 7, bad MASK

Expected Behavior

work good, and can run chat demo

Steps To Reproduce

  1. cd examples/chat
  2. go run *.go
  3. open the chrome, open "http://localhost:8080/"
  4. input some message in form, click "send" button
  5. Connection closed.

Anything else?

No response

@waro163 waro163 added the bug label Nov 22, 2024
@hulkingshtick
Copy link

The chat example works for me. More information is needed to diagnose why the example does not work for you. What version of the package are you testing? Did you modify the package or example code? Which operating system are you using?

@waro163
Copy link
Author

waro163 commented Nov 25, 2024

The chat example works for me. More information is needed to diagnose why the example does not work for you. What version of the package are you testing? Did you modify the package or example code? Which operating system are you using?

thanks for response.
i don't change any code for example code.
my operation system is: MacOS sonoma(14.4.1 (23E224)), Apple M1 Pro
go version is 1.20.8.
i had tested in main branch and v1.5.3 tag, they all don't work well.

@waro163
Copy link
Author

waro163 commented Nov 25, 2024

i run the chat example in my another computer, it works.
i don't know why it can not work in M1 mac book.
if you guys think it is not a bug, just close the issue.
thanks.

@hulkingshtick
Copy link

I borrowed an M1 MacBook and tested the example with Go 1.20.8. The example works as expected.

@waro163
Copy link
Author

waro163 commented Nov 27, 2024

2024-11-27 11 55 33
hello i record a gif, use main branch to test in my macbook

@FZambia
Copy link
Contributor

FZambia commented Nov 27, 2024

Duplicate of #886

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

3 participants