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

Websocket error on M1 iMac Monterey #4746

Closed
amancevice opened this issue Jul 9, 2021 · 9 comments · Fixed by #5082
Closed

Websocket error on M1 iMac Monterey #4746

amancevice opened this issue Jul 9, 2021 · 9 comments · Fixed by #5082
Assignees
Labels
bug Something isn't working

Comments

@amancevice
Copy link

Expected Behavior

tilt up [space] should open the Tilt GUI

Current Behavior

UI is a blank page with the text Loading...

Inspecting the console there is an error connecting to the websocket:

WebSocket connection to 'ws://localhost:10350/ws/view' failed: The operation couldn’t be completed. (kNWErrorDomainPOSIX error 100 - Protocol error)

Steps to Reproduce

  1. Use M1 iMac with macOS Monterey beta
  2. install tilt
  3. create simple Tiltfile
  4. run tilt up [space]

Context

tilt doctor Output

$ tilt doctor
Tilt: v0.21.2, built 2021-07-06
System: darwin-arm64
---
Docker
- Host: [default]
- Server Version: 20.10.7
- API Version: 1.41
- Builder: 2
---
Kubernetes
- Env: none
- Context: 
- Cluster Name: Unknown
- Namespace: default
- Container Runtime: unknown
- Version: Error: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable
- Cluster Local Registry: none
---
Thanks for seeing the Tilt Doctor!
Please send the info above when filing bug reports. 💗

The info below helps us understand how you're using Tilt so we can improve,
but is not required to ask for help.
---
Analytics Settings
--> (These results reflect your personal opt in/out status and may be overridden by an `analytics_settings` call in your Tiltfile)
- User Mode: default
- Machine: cccd0cd5bc37bdcb11c3db0a89a68e9d
- Repo: 

About Your Use Case

Not an urgent issue as Tilt works fine on my work machine, just raising as a potential issue for future users

@amancevice amancevice added the bug Something isn't working label Jul 9, 2021
@nicks
Copy link
Member

nicks commented Jul 12, 2021

Thanks for filing! Will be useful if anyone else runs into it. Sounds like Websockets are broken on the MacOS beta

@amancevice have you tried using a different browser? Wondering if they're broken on Safari, or if macOS Monterey beta has some kind of new security firewall that accidentally broke websockets. Might also be good to poke around in the macOS issue tracker

@amancevice
Copy link
Author

@nicks thanks & sorry for the delay — I was out of town for a while but am back in front of my M1 iMac — I just upgraded to the latest macOS public beta and can confirm that:

  • Using a different browser seems to work! (in my case Firefox)
  • The issue is still happening in Safari

I'll poke around and see what I can find

@henriquebremenkanp
Copy link

henriquebremenkanp commented Sep 10, 2021

@nicks Looks like something changed when handling websockets in Safari 15.
It still works on other websites, tested on socket.io website.


Edit: works fine on Safari 15 / BigSur 11.6 (Intel)

@redvex
Copy link

redvex commented Oct 22, 2021

JS console reports:

WebSocket connection to 'ws://localhost:10350/ws/view' failed: The operation couldn’t be completed. (kNWErrorDomainPOSIX error 100 - Protocol error)

It doesn’t work on the iPad (all browsers using port forward to access localhost:10350)

@jazzdan
Copy link
Contributor

jazzdan commented Oct 27, 2021

Also seeing this:

WebSocket connection to 'ws://localhost:10350/ws/view' failed: The operation couldn’t be completed. (kNWErrorDomainPOSIX error 100 - Protocol error)

Safari 15.0 macOS 12.0

@nicks
Copy link
Member

nicks commented Oct 27, 2021

i can repro after upgrading to Monterey! though not sure what's going on yet 🤔

@nicks nicks self-assigned this Oct 27, 2021
@nicks
Copy link
Member

nicks commented Oct 27, 2021

Looks like a bug in Safari's new NSURLSession Websocket feature, which got turned on by default in Monterey.

You can go to Develop -> Experimental Features -> NSURLSession Websocket to turn it off, and the tilt UI will work OK.

@nicks
Copy link
Member

nicks commented Oct 27, 2021

Here's some interesting discussion on this:
gorilla/websocket#696
gorilla/websocket#731 (comment)

Not super familiar with websocket messaging, but looks like they now declare they support Sec-WebSocket-Extensions: permessage-deflate, but didn't actually implement it correctly 😠

@redvex
Copy link

redvex commented Oct 27, 2021

Looks like a bug in Safari's new NSURLSession Websocket feature, which got turned on by default in Monterey.

You can go to Develop -> Experimental Features -> NSURLSession Websocket to turn it off, and the tilt UI will work OK.

Works on the iPad too 😬

nicks added a commit that referenced this issue Oct 27, 2021
btwiuse pushed a commit to webteleport/ufo that referenced this issue Oct 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants