First off: I'm really glad you're building this product. I love it and I really want to work with it!
I tried setting up the perry agent both locally in my macbook pro M3 and In my ubuntu-server based homelab, and I'm running into the same issue in both:
When trying to use the web UI to access my terminal, or create an agent session, I see an error in the console indicating that the websocket connection was refused.
I launched OpenCode on this repo to ask about it, and it hinted me the following:
Root Cause: Authentication
The WebSocket connection is failing because browsers cannot send Authorization headers with WebSocket connections. Here's what happens:
1. The web UI stores the auth token in localStorage and uses it for API calls (via fetch)
2. When opening a WebSocket, the browser cannot include the Authorization: Bearer <token> header
3. Your server has config.auth.token set (auth is enabled)
4. The server rejects the WebSocket upgrade request with 401 Unauthorized
5. This causes the 1006 (abnormal closure) error
Same issue happens with brave and safari.
Thanks again for this cool project
First off: I'm really glad you're building this product. I love it and I really want to work with it!
I tried setting up the perry agent both locally in my macbook pro M3 and In my ubuntu-server based homelab, and I'm running into the same issue in both:
When trying to use the web UI to access my terminal, or create an agent session, I see an error in the console indicating that the websocket connection was refused.
I launched OpenCode on this repo to ask about it, and it hinted me the following:
Same issue happens with brave and safari.
Thanks again for this cool project