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.

how to get the Page instance?

See original GitHub issue
...
var page = await browser.targets()[0].page();
...

when I ran the code, I got:

$ node app.js
(node:7716) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejec
tion id: 1): Error: Protocol error (Page.getFrameTree): 'Page.getFrameTree' wasn
't found undefined
(node:7716) [DEP0018] DeprecationWarning: Unhandled promise rejections are depre
cated. In the future, promise rejections that are not handled will terminate the
 Node.js process with a non-zero exit code.

My environment:

  • Puppeteer 0.13.0
  • Node V8.1.1
  • Window 7 64bit

I tried to use Targets to instead of , but still no work.

I wonder that this kind of functions still can’t to use for now, right?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
paulirishcommented, Dec 8, 2017

just checked… Puppeteer 0.13.0 requires a Chromium version that is equivalent to Chrome 64.0.3265.0.


And here’s how to get a chrome version if you have a chromium revision number or a git sha:

  1. get the chromium_revision in the puppeteer package.json
  2. look it up on https://omahaproxy.appspot.com/ in the “Find Releases” box. (prefix it with an r)
  3. A few API calls and redirects later, you’ll see the Chrome version.

image image

1reaction
benschwarzcommented, Dec 8, 2017

@ebidel Arrived here from seeing this error and doing a bit of testing. It appears that puppeteer using Page.getFrameTree is a little problematic in some cases (I think it’s only available in Canary), so beta or stable builds of chrome will not work with puppeteer at this point in time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Access current instance of Page from a static class
You can use HttpContext.CurrentHandler to return the current HttpHandler for the request. A Page class is simply ...
Read more >
How to get an instance of a page when you navigate to it in UWP
<summary> · Navigates to a page and returns the instance of the page if it succeeded, · otherwise returns null. · </summary> ·...
Read more >
How to get the instance of current page on elsewhere in project
To get your application's current working page instance from elsewhere in your project, you can use the currentRouter object from the Router. import...
Read more >
Solved: Display the current URL of my servicenow instance
Display the current URL of my servicenow instance from an ui page. Go to solution.
Read more >
Amazon EC2 Reserved Instances
There are five ways to pay for Amazon EC2 instances: On-Demand, ... To learn how to buy an RI, visit the Amazon EC2...
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