Puppeteer: browser.close not returning a Promise

Created on 18 Sep 2017  Â·  1Comment  Â·  Source: puppeteer/puppeteer

Steps to reproduce

Tell us about your environment:

  • Puppeteer version: 0.10.2
  • Platform / OS version: MacOS 10.12.6
  • URLs (if applicable):

What steps will reproduce the problem?

_Please include code that reproduces the issue._

$ node
> let browser;
> const puppeteer = require('puppeteer');
> puppeteer.launch().then(t => browser = t).then(() => console.log('launched'))
Promise { <pending> }
launched
> browser.close().then(() => console.log('closed'))
TypeError: Cannot read property 'then' of undefined

What is the expected result?

browser.close to return a Promise, as per documentation

What happens instead?

browser.close returns undefined

Most helpful comment

browser.close() returns promise in the latest v0.11.0-alpha (see the version in the top of the doc) — unlike v0.10.2

>All comments

browser.close() returns promise in the latest v0.11.0-alpha (see the version in the top of the doc) — unlike v0.10.2

Was this page helpful?
0 / 5 - 0 ratings