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

NetworkError: failed to connect to WebSocket: Invalid status code #81

Closed
pting-me opened this issue May 7, 2023 · 3 comments
Closed

Comments

@pting-me
Copy link

pting-me commented May 7, 2023

System: Intel macOS 12.6.5

Chrome downloaded via:

PUPPETEER_PRODUCT=chrome deno run -A --unstable https://deno.land/x/puppeteer@16.2.0/install.ts

Simple script:

import puppeteer from 'https:/deno.land/x/puppeteer@16.2.0/mod.ts';
const browser = await puppeteer.launch({
  defaultViewport: { width: 1200, height: 675 },
});

Full error dump:

ErrorEvent {
  bubbles: false,
  cancelable: false,
  composed: false,
  currentTarget: null,
  defaultPrevented: false,
  eventPhase: 0,
  srcElement: null,
  target: WebSocket {
  url: "ws://127.0.0.1:58347/devtools/browser/b767004f-f789-426e-a294-256b9b49c1ed",
  readyState: 3,
  extensions: "",
  protocol: "",
  binaryType: "blob",
  bufferedAmount: 0
},
  returnValue: true,
  timeStamp: 1683480676254,
  type: "error",
  message: "NetworkError: failed to connect to WebSocket: Invalid status code",
  filename: "",
  lineno: 0,
  colno: 0,
  error: DOMException: failed to connect to WebSocket: Invalid status code
}
@EvinceMoi
Copy link

Got the same issue, the only thing I know for now is that there is some breaking changes in Deno 1.33. as I downgraded to 1.32.5, there was no problem, you can try it

@pting-me
Copy link
Author

Awesome! That seems to work, thanks! I guess I'll leave this open until it's officially resolved in Deno.

@pting-me
Copy link
Author

Actually, upgraded to 1.33.2 and seems to be working now. Closing.

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

2 participants