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.

Is there a way to catch switching to download mode?

See original GitHub issue
  • Puppeteer version: v0.12.0-alpha
  • Platform / OS version: Windows 7 x64
  • URLs (if applicable): any with non-openable content type

A stright attempt just throws a timeout (the file is downloaded successfully though):

const puppeteer = require('puppeteer');

(async function main() {
  try {
    const browser = await puppeteer.launch();
    const page = await browser.newPage();

    const response = await page.goto('https://nodejs.org/dist/v8.6.0/node-v8.6.0.tar.gz');

    console.log(response.status);

    await browser.close();
  } catch (err) {
    console.error(err);
  }
})();
Error: Navigation Timeout Exceeded: 30000ms exceeded
    at NavigatorWatcher.waitForNavigation (puppeteer\lib\NavigatorWatcher.js:73:20)
    at <anonymous>

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
aslushnikovcommented, Jan 12, 2018

@vsemozhetbyt ah makes sense, thank you for sharing.

0reactions
aslushnikovcommented, May 31, 2018

This behaves much better now. Chromium aborts navigation to resource if it causes a download. With pptr 1.4.0, this kind of navigation results in ERR:Aborted being thrown; with #299 in place we’ll also get a download event.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Get In & Out of Download Mode on Samsung Galaxy ...
I show you how to get in and get out of download mode on the Samsung Galaxy S20, S20+ and S20 Ultra. Hope...
Read more >
3 Ways to Boot into Samsung Download Mode - Technastic
On such devices, you can get into the Download Mode as follows. Turn off your smartphone. Press and hold the Volume Down +...
Read more >
How to Enter or Exit Android Download Mode - Tenorshare
Step 1. Hold down the Power key to switch off Samsung J7. Step 2. ReBoot your device by pressing Volume Down + Home...
Read more >
How to Enter and Exit Android Download Mode/Odin Mode?
Part 4. Enter Samsung Download Mode using Key Combinations · Step 1: Switch off your device. Step 2: Press and hold down the...
Read more >
How to get out of Safe Mode or Android Recovery Mode
If your device is stuck on a page that says Downloading.. you'll need to press and hold both the Volume Down and Power...
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