Grok WebSocket connection fails inside Panelize on Chrome
Bug Description
Grok loads successfully inside Panelize, but it cannot start or complete a conversation because its WebSocket connection repeatedly fails.
Grok works normally when opened directly at https://grok.com/ in the same Chrome browser.
Environment
- OS: Windows
- Browser: Google Chrome
- Panelize version: 1.3.2
- Provider affected: Grok
- Other providers: ChatGPT, Doubao, DeepSeek, and Kimi have worked in Panelize during previous tests.
Steps to Reproduce
- Open Panelize in Chrome.
- Add Grok as a provider.
- Open the Grok panel and dismiss the cookie consent banner.
- Send a simple message directly from Grok's own input box, such as "Hello, please reply with OK."
- Wait for Grok to generate a response.
Actual Behavior
Grok fails to generate a reply and displays messages such as:
- "Unable to start conversation"
- WebSocket connection blocked or unavailable
- Error codes:
timeoutorsocket_closed
Chrome DevTools also repeatedly logs:
WebSocket connection to wss://grok.com/ws/mgw/ failed
In the Network panel, several requests associated with /ws/mgw/ returned HTTP 400 with the response:
Connection header did not include 'upgrade'
These HTTP 400 responses may be related to fallback or non-WebSocket requests, so I cannot confirm that they are the root cause.
Troubleshooting Already Performed
- Confirmed Grok works normally when opened directly in Chrome.
- Confirmed Panelize is enabled and running version 1.3.2.
- Confirmed third-party cookies are allowed in Chrome.
- Tested after dismissing the Grok cookie banner.
- Tested sending directly through Grok's own input, without using Panelize's "Send All" button.
- Closed all other AI panels and tested Grok as the only provider in Panelize.
- Tested refreshing and retrying the connection.
The issue persists even when Grok is the only open Panelize panel.
Expected Behavior
Grok should establish its required connection and generate responses inside Panelize, just as it does on the standalone Grok website.
Request
Could you please investigate whether the iframe-based embedding or extension-related request handling affects Grok's WebSocket connection?
If this is caused by Grok's restrictions on embedded pages, is there a compatible workaround or an alternative integration approach?
Thank you for maintaining Panelize!