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

Chrome Extension: WebSocket error: [object Event] #62

Open
jonrosner opened this issue Mar 10, 2025 · 6 comments
Open

Chrome Extension: WebSocket error: [object Event] #62

jonrosner opened this issue Mar 10, 2025 · 6 comments

Comments

@jonrosner
Copy link

Thank you for open sourcing this cool MCP server!

I followed the installation guide, but unfortunately the extension is unable to open a websocket connection. I get:

Chrome Extension: WebSocket error: [object Event]

Context
devtools://devtools/bundled/devtools_app.html?remoteBase=https://chrome-devtools-frontend.appspot.com/serve_file/@f217c2438a8e1f4b9e730de378ce20f754b2c3d0/&targetType=tab&can_dock=true

Stack Trace

devtools.js:600 (ws.onerror)

    console.error("Chrome Extension: WebSocket error:", error);

Thank you for your help!

@sarperdag
Copy link

Having the same problem... Anyone has found a solution yet?

@gerryprocee
Copy link

same problem here, it worked fine for 2 days, then starting having this issue. Anyone?

@bmacer
Copy link

bmacer commented Mar 11, 2025

I'm not sure if this is correct, but have you tested on version 1.2.0?

I can see that you're not on 1.2.0 because back in this commit a71e00d

The error message changed from:

console.error("Chrome Extension: WebSocket error:", error);

to

console.error(`Chrome Extension: WebSocket error for ${wsUrl}:`, error);

As such, it might be worth just testing 1.2.0.

@tedjames
Copy link
Contributor

Thanks @bmacer ! Yes - please upgrade all three components to v1.2 and let us know if you're still having issues!

@marcegl
Copy link

marcegl commented Mar 11, 2025

The service is detected as “active,” but it does not receive the logs.

Chrome Extension: Error processing WebSocket message: TypeError: Cannot read properties of undefined (reading 'captureVisibleTab')

Context
devtools://devtools/bundled/devtools_app.html?remoteBase=https://chrome-devtools-frontend.appspot.com/serve_file/@17bb6c858e818e81744de42ed292b7060bc341e5/&targetType=tab&can_dock=true&panel=elements

      } catch (error) {
        console.error(
          "Chrome Extension: Error processing WebSocket message:",
          error
        );

@mdfu
Copy link

mdfu commented Mar 15, 2025

Note, I locally built from source, from today's Git repo version, 1.2:

I'm still having issues with the Chrome opening websocket. I'm using Edge. I tried also on Chrome. I was able to get Cursor to run the MCP Browser tool See errors below from browser-connector.js:

Browser Connector: Received request to /capture-screenshot endpoint
Browser Connector: Request body: {}
Browser Connector: Active WebSocket connection: false
Browser Connector: Starting captureScreenshot method
Browser Connector: Request headers: {
host: '127.0.0.1:3025',
connection: 'keep-alive',
accept: '/',
'accept-language': '*',
'sec-fetch-mode': 'cors',
'user-agent': 'node',
'accept-encoding': 'gzip, deflate',
'content-length': '0'
}
Browser Connector: Request method: POST
Browser Connector: No active WebSocket connection to Chrome extension

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants