-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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] error: RSV1 set, bad opcode 7, bad MASK #886
Comments
Similarly on occasion I am getting:
|
Similar error, happened today.
|
Thank you @GreenMarmot. I am aware of that and both read and writes are guarded with mutexes. I have also ran the application with the go race detector and haven't hit any results pointing in that direction. But will continue to explore that angle. |
Hi where any one able to find any solution to the issue I'm getting a similar error on my M1 machine I've tried running in docker, VM (UTM) Ubuntu server (ARM version) without any success, I've also tried to to reset the MAC to factory without any success. This specific issue seems isolated to M1 since the code works without any issue on m2 also tried using on my AMD cpu and no issues. Failing EnvironmentMacBook Pro Apple M1 Sonoma 14.4 16GB Ram
Successful environment
ErrorRSV1 set, bad opcode 7, bad Mask
Hint
|
SolutionFor those who get the following error using Apple MacBook: RSV1 set, bad opcode 7, bad Mask when trying to connect from any client within the system can try and disable Content & Privacy that can be found in settings > Screen time > Content & Privacy and then disable Content & Privacy. This solved my issue on my MacBook M1 running Sonoma 14.4. ps: do disable share across device before disabling to not disable on other devices and then restart the laptop and web filter service should be gone. Command to view servicessudo lsof -i -P | grep LISTEN Possible reasonPossible reason is that the WebFilter service was filtering the payload modifying the Frame leading to malformed frames unaware if this is intentional of a bug from apple. |
Thank you @Nasar165 , using your method also solved my problem |
Happy to be of help @jiangbo202 |
Got a similar panic, is it
My logic is quite simple:
In my case, read/write might be concurrent, but there's only one reader for a connection. |
Yes, @tubzby, it was. @GreenMarmot was spot on. In your case I believe if you changed your code to do something to the spirit of the following, the issue will be addressed: go func(ws *websocket.Conn) {
for {
// read until error
// panic here
ws.ReadMessage()
send to channel
}
}(ws) Instead of having your goroutine capture |
@canselcik Thanks for your suggestion, will try that, I'm convinced this was the root cause. |
Is there an existing issue for this?
Current Behavior
I will follow this example( https://github.com/gorilla/websocket/tree/main/examples/chat )Start the machine locally, then open it through Google Chrome, enter "test" and click send, but it will directly display: Connection closed.
By adding the print on line 70 of the client.go file, log Println ("xxxX:", err)
Result: websocket: RSV1 set, bad opcode 7, bad MASK
I checked #797 , but it worked fine after restarting the computer. However, I have restarted the computer multiple times and it still hasn't worked
I tried other people's computers, and the systems such as Win and Mac Intel chips were all working properly. I also closed all proxy software on my computer, but it didn't work
The error is happening on a MacBook Pro 2021 M1 Pro.
go version: go version go1.20.6 darwin/arm64
Expected Behavior
No response
Steps To Reproduce
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: