question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot connect to existing Chrome Page

See original GitHub issue

When trying to connect to a Chrome (Version 75.0.3770.80 (Official Build) (64-bit)) Page using the following. I get: Error: Protocol error (Target.getBrowserContexts): Not allowed at Promise

const puppeteer = require('puppeteer-core');

(async () => {
  const browserWSEndpoint = 'ws://127.0.0.1:9222/devtools/page/500056D65CF0AEE17C01DF068E34B21E';

  try {
    const browser = await puppeteer.connect({browserWSEndpoint, ignoreHTTPSErrors: true});
  } catch (error) {
    console.error(error);
  }
  console.log('hello')
})();

Thank You

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

20reactions
dheerajbhaskarcommented, Sep 10, 2019

For anyone else who encounters this, you need to go to the following url to get the browserWSEndpoint:

http://127.0.0.1:<debugging port>/json/version
0reactions
one10commented, Jan 29, 2020

It seems like this has changed in some point in history because I have some code based on Puppeteer 1.4.0 where you can connect to a page just fine. Breaks for me after upgrading to anything after 1.10.0. Just saying. If you’re struggling with an older code base, this may be why.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix connection errors - Google Chrome Help
Fix most connection errors · Check the web address for typos. · Make sure your internet connection is working normally. · Contact the...
Read more >
Google Chrome Won't Load Web Pages
Issues related to Google Chrome and Web pages that won't load can be caused by problems with your Internet connection or with the...
Read more >
Chrome can't connect to internet (but other browsers can)
Try check portable chrome for make sure its only issue with your current installed Chrome. People says help if reinstall or update wi-fi...
Read more >
Chrome Browser Privacy Policy - Google
When you can't connect to a web page, you can get suggestions for ... For example, the web app will appear in your...
Read more >
Selenium can't connect to existing Chrome browser on ...
It also won't throw any error. So validate chrome indeed opened in that port by opening http://localhost:9014 in any browser or tab.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found