diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index c9c1a912c2a..e478959bd24 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -182,21 +182,6 @@ const browser = await puppeteer.launch({ }); ``` -## Chrome is downloaded but fails to launch on Node.js 14 - -If you get an error that looks like this when trying to launch Chromium: - -``` -(node:15505) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process! -spawn /Users/.../node_modules/puppeteer/.local-chromium/mac-756035/chrome-mac/Chromium.app/Contents/MacOS/Chromium ENOENT -``` - -This means that the browser was downloaded but failed to be extracted correctly. -The most common cause is a bug in Node.js v14.0.0 which broke `extract-zip`, the -module Puppeteer uses to extract browser downloads into the right place. The bug -was fixed in Node.js v14.1.0, so please make sure you're running that version or -higher. - ## Setting Up Chrome Linux Sandbox In order to protect the host environment from untrusted web content, Chrome uses diff --git a/packages/browsers/src/install.ts b/packages/browsers/src/install.ts index 6b2160ad8b7..2a050d4b4b4 100644 --- a/packages/browsers/src/install.ts +++ b/packages/browsers/src/install.ts @@ -103,6 +103,9 @@ export interface InstallOptions { export function install( options: InstallOptions & {unpack?: true} ): Promise; +/** + * @public + */ export function install( options: InstallOptions & {unpack: false} ): Promise; diff --git a/packages/puppeteer-core/src/api/api.ts b/packages/puppeteer-core/src/api/api.ts index 13b50badb83..c3fb4d93ec9 100644 --- a/packages/puppeteer-core/src/api/api.ts +++ b/packages/puppeteer-core/src/api/api.ts @@ -17,12 +17,14 @@ export * from './Browser.js'; export * from './BrowserContext.js'; export * from './Dialog.js'; -export * from './Page.js'; -export * from './JSHandle.js'; export * from './ElementHandle.js'; -export * from './Input.js'; +export * from './Environment.js'; export * from './Frame.js'; -export * from './HTTPResponse.js'; export * from './HTTPRequest.js'; +export * from './HTTPResponse.js'; +export * from './Input.js'; +export * from './JSHandle.js'; export * from './locators/locators.js'; +export * from './Page.js'; +export * from './Realm.js'; export * from './Target.js'; diff --git a/packages/puppeteer-core/src/api/locators/locators.ts b/packages/puppeteer-core/src/api/locators/locators.ts index 7270bd35dc1..0a762b62ad7 100644 --- a/packages/puppeteer-core/src/api/locators/locators.ts +++ b/packages/puppeteer-core/src/api/locators/locators.ts @@ -14,10 +14,14 @@ * limitations under the License. */ +/** + * Order of exports matters + * Don't sort + */ export * from './Locator.js'; -export * from './NodeLocator.js'; -export * from './FilteredLocator.js'; -export * from './RaceLocator.js'; export * from './DelegatedLocator.js'; -export * from './MappedLocator.js'; +export * from './FilteredLocator.js'; export * from './FunctionLocator.js'; +export * from './MappedLocator.js'; +export * from './NodeLocator.js'; +export * from './RaceLocator.js'; diff --git a/packages/puppeteer-core/src/common/ExecutionContext.ts b/packages/puppeteer-core/src/common/ExecutionContext.ts index 779c9c8bf9c..3c037fe4717 100644 --- a/packages/puppeteer-core/src/common/ExecutionContext.ts +++ b/packages/puppeteer-core/src/common/ExecutionContext.ts @@ -54,7 +54,7 @@ const getSourceUrlComment = (url: string) => { * * - Each {@link Frame} of a {@link Page | page} has a "default" execution * context that is always created after frame is attached to DOM. This context - * is returned by the {@link Frame.executionContext} method. + * is returned by the {@link Frame.realm} method. * - Each {@link https://developer.chrome.com/extensions | Chrome extensions} * creates additional execution contexts to isolate their code. * diff --git a/packages/puppeteer-core/src/common/NetworkManager.ts b/packages/puppeteer-core/src/common/NetworkManager.ts index fa7a17f8b1a..08a00d7837d 100644 --- a/packages/puppeteer-core/src/common/NetworkManager.ts +++ b/packages/puppeteer-core/src/common/NetworkManager.ts @@ -69,7 +69,7 @@ export const NetworkManagerEmittedEvents = { /** * @internal */ -interface FrameProvider { +export interface FrameProvider { frame(id: string): Frame | null; } diff --git a/packages/puppeteer-core/src/common/bidi/bidi.ts b/packages/puppeteer-core/src/common/bidi/bidi.ts index c980168aaaa..c71ed6e5a16 100644 --- a/packages/puppeteer-core/src/common/bidi/bidi.ts +++ b/packages/puppeteer-core/src/common/bidi/bidi.ts @@ -14,8 +14,8 @@ * limitations under the License. */ +export * from './BidiOverCDP.js'; export * from './Browser.js'; export * from './BrowserContext.js'; -export * from './Page.js'; export * from './Connection.js'; -export * from './BidiOverCDP.js'; +export * from './Page.js'; diff --git a/packages/puppeteer-core/src/common/common.ts b/packages/puppeteer-core/src/common/common.ts index 643773fbba4..b981c2a937a 100644 --- a/packages/puppeteer-core/src/common/common.ts +++ b/packages/puppeteer-core/src/common/common.ts @@ -56,6 +56,7 @@ export * from './PredefinedNetworkConditions.js'; export * from './Product.js'; export * from './Puppeteer.js'; export * from './PuppeteerViewport.js'; +export * from './QueryHandler.js'; export * from './SecurityDetails.js'; export * from './Target.js'; export * from './TargetManager.js'; @@ -67,4 +68,3 @@ export * from './USKeyboardLayout.js'; export * from './util.js'; export * from './WaitTask.js'; export * from './WebWorker.js'; -export * from './QueryHandler.js';