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 log "page" events in v1.9.0

See original GitHub issue

Puppeteer: 1.9.0 macOS: 10.14 Node: 8.12.0

Code that reproduces the issue:

const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch();
  const page = await browser.newPage();
  await page.goto('https://example.com');
  await page.screenshot({path: 'example.png'});

  await browser.close();
})();

Steps:

  1. Install Puppeteer v1.8.0
  2. Run a puppeteer script with DEBUG='puppeteer:page'
  3. In the terminal you’ll see all the page events logged.
  4. Install Puppeteer v1.9.0
  5. Run the script the same way with DEBUG='puppeteer:page'
  6. No logs are shown in the terminal

Note: If you run with DEBUG='puppeteer:*' you will get logs for session and protocol but nothing else.

Expected: I should be able to get logs of all the page events.

Actual: I can only get logs for session and protocol.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
patrickeakincommented, Nov 1, 2018

@aslushnikov That does the trick. Thanks a ton for your help. I really appreciate it.

1reaction
patrickeakincommented, Oct 29, 2018

@jasonswearingen Thought you’d like to see an example of what I get when I log out page events in the way I described. Below is the output of a script where I go to Google, search for ‘sup’ and take a screenshot.

Output like this is really helpful when a before hook or something in my tests takes a 💩and I want to see where the hang up happened.

$ DEBUG='puppeteer:page' node puppeteerTest.js
  puppeteer:page page.setViewport({"width":"800","height":"600"}) +0ms
  puppeteer:page page.goto("https://google.com") +252ms
  puppeteer:page page.waitForSelector("input[aria-label=\"Search\"]") +876ms
  puppeteer:page page.mainFrame() +0ms
  puppeteer:page page.type("input[aria-label=\"Search\"]", "sup") +508ms
  puppeteer:page page.mainFrame() +1ms
  puppeteer:page page.click("input[value=\"Google Search\"]") +3s
  puppeteer:page page.mainFrame() +0ms
  puppeteer:page page.waitForSelector("#hdtb-msb") +1s
  puppeteer:page page.mainFrame() +0ms
  puppeteer:page page.screenshot({"path":"\"example.png\""}) +735ms
Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot · Crossplane v1.9
Troubleshoot · Requested Resource Not Found · Resource Status and Conditions · Resource Events · Crossplane Logs · Provider Logs · Pausing Crossplane...
Read more >
4625(F) An account failed to log on. (Windows 10)
Describes security event 4625(F) An account failed to log on. This event is generated if an account logon attempt failed for a locked...
Read more >
event log show - Product documentation - NetApp
It displays all events that occurred between 1:45pm and 1:50pm on November 9, 2010. cluster1::> event log show -time "11/9/2015 13:45:00".."11/9 ...
Read more >
Cisco Bug: CSCvy96944 - libssh2 v1.9.0 and earlier ...
Why Is Login Required? Bug Details Include. Full Description (including symptoms, conditions and workarounds); Status; Severity; Known Fixed Releases; Related ...
Read more >
Event Resource and Types - OneLogin Developers
7, %user% logged out of onelogin. 8, %user% logged into %app%. 9, %user% failed to log into %app%. 10, %user% requested new password....
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