mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
fix: Chrome for Testing downloads have a new URL (#11923)
This commit is contained in:
parent
e35aff81e2
commit
f00a94a809
@ -17,11 +17,11 @@ export interface Configuration
|
|||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
| Property | Modifiers | Type | Description | Default |
|
| Property | Modifiers | Type | Description | Default |
|
||||||
| ------------------------------- | --------------------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------------------------- | --------------------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| browserRevision | <code>optional</code> | string | <p>Specifies a certain version of the browser you'd like Puppeteer to use.</p><p>Can be overridden by <code>PUPPETEER_BROWSER_REVISION</code>.</p><p>See [puppeteer.launch](./puppeteer.puppeteernode.launch.md) on how executable path is inferred.</p><p>Use a specific browser version (e.g., 119.0.6045.105). If you use an alias such <code>stable</code> or <code>canary</code> it will only work during the installation of Puppeteer and it will fail when launching the browser.</p> | The pinned browser version supported by the current Puppeteer version. |
|
| browserRevision | <code>optional</code> | string | <p>Specifies a certain version of the browser you'd like Puppeteer to use.</p><p>Can be overridden by <code>PUPPETEER_BROWSER_REVISION</code>.</p><p>See [puppeteer.launch](./puppeteer.puppeteernode.launch.md) on how executable path is inferred.</p><p>Use a specific browser version (e.g., 119.0.6045.105). If you use an alias such <code>stable</code> or <code>canary</code> it will only work during the installation of Puppeteer and it will fail when launching the browser.</p> | The pinned browser version supported by the current Puppeteer version. |
|
||||||
| cacheDirectory | <code>optional</code> | string | <p>Defines the directory to be used by Puppeteer for caching.</p><p>Can be overridden by <code>PUPPETEER_CACHE_DIR</code>.</p> | <code>path.join(os.homedir(), '.cache', 'puppeteer')</code> |
|
| cacheDirectory | <code>optional</code> | string | <p>Defines the directory to be used by Puppeteer for caching.</p><p>Can be overridden by <code>PUPPETEER_CACHE_DIR</code>.</p> | <code>path.join(os.homedir(), '.cache', 'puppeteer')</code> |
|
||||||
| defaultProduct | <code>optional</code> | [Product](./puppeteer.product.md) | <p>Specifies which browser you'd like Puppeteer to use.</p><p>Can be overridden by <code>PUPPETEER_PRODUCT</code>.</p> | <code>chrome</code> |
|
| defaultProduct | <code>optional</code> | [Product](./puppeteer.product.md) | <p>Specifies which browser you'd like Puppeteer to use.</p><p>Can be overridden by <code>PUPPETEER_PRODUCT</code>.</p> | <code>chrome</code> |
|
||||||
| downloadBaseUrl | <code>optional</code> | string | <p>Specifies the URL prefix that is used to download the browser.</p><p>Can be overridden by <code>PUPPETEER_DOWNLOAD_BASE_URL</code>.</p> | Either https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing or https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central, depending on the product. |
|
| downloadBaseUrl | <code>optional</code> | string | <p>Specifies the URL prefix that is used to download the browser.</p><p>Can be overridden by <code>PUPPETEER_DOWNLOAD_BASE_URL</code>.</p> | Either https://storage.googleapis.com/chrome-for-testing-public or https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central, depending on the product. |
|
||||||
| executablePath | <code>optional</code> | string | <p>Specifies an executable path to be used in [puppeteer.launch](./puppeteer.puppeteernode.launch.md).</p><p>Can be overridden by <code>PUPPETEER_EXECUTABLE_PATH</code>.</p> | **Auto-computed.** |
|
| executablePath | <code>optional</code> | string | <p>Specifies an executable path to be used in [puppeteer.launch](./puppeteer.puppeteernode.launch.md).</p><p>Can be overridden by <code>PUPPETEER_EXECUTABLE_PATH</code>.</p> | **Auto-computed.** |
|
||||||
| experiments | <code>optional</code> | [ExperimentsConfiguration](./puppeteer.experimentsconfiguration.md) | Defines experimental options for Puppeteer. | |
|
| experiments | <code>optional</code> | [ExperimentsConfiguration](./puppeteer.experimentsconfiguration.md) | Defines experimental options for Puppeteer. | |
|
||||||
| logLevel | <code>optional</code> | 'silent' \| 'error' \| 'warn' | Tells Puppeteer to log at the given level. | <code>warn</code> |
|
| logLevel | <code>optional</code> | 'silent' \| 'error' \| 'warn' | Tells Puppeteer to log at the given level. | <code>warn</code> |
|
||||||
|
@ -13,8 +13,8 @@ export interface InstallOptions
|
|||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
| Property | Modifiers | Type | Description | Default |
|
| Property | Modifiers | Type | Description | Default |
|
||||||
| ------------------------ | --------------------- | -------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------------------ | --------------------- | -------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| baseUrl | <code>optional</code> | string | Determines the host that will be used for downloading. | <p>Either</p><p>- https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing or - https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central</p> |
|
| baseUrl | <code>optional</code> | string | Determines the host that will be used for downloading. | <p>Either</p><p>- https://storage.googleapis.com/chrome-for-testing-public or - https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central</p> |
|
||||||
| browser | | [Browser](./browsers.browser.md) | Determines which browser to install. | |
|
| browser | | [Browser](./browsers.browser.md) | Determines which browser to install. | |
|
||||||
| buildId | | string | Determines which buildId to download. BuildId should uniquely identify binaries and they are used for caching. | |
|
| buildId | | string | Determines which buildId to download. BuildId should uniquely identify binaries and they are used for caching. | |
|
||||||
| cacheDir | | string | Determines the path to download browsers to. | |
|
| cacheDir | | string | Determines the path to download browsers to. | |
|
||||||
|
@ -25,7 +25,7 @@ function folder(platform: BrowserPlatform): string {
|
|||||||
export function resolveDownloadUrl(
|
export function resolveDownloadUrl(
|
||||||
platform: BrowserPlatform,
|
platform: BrowserPlatform,
|
||||||
buildId: string,
|
buildId: string,
|
||||||
baseUrl = 'https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing'
|
baseUrl = 'https://storage.googleapis.com/chrome-for-testing-public'
|
||||||
): string {
|
): string {
|
||||||
return `${baseUrl}/${resolveDownloadPath(platform, buildId).join('/')}`;
|
return `${baseUrl}/${resolveDownloadPath(platform, buildId).join('/')}`;
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ function folder(platform: BrowserPlatform): string {
|
|||||||
export function resolveDownloadUrl(
|
export function resolveDownloadUrl(
|
||||||
platform: BrowserPlatform,
|
platform: BrowserPlatform,
|
||||||
buildId: string,
|
buildId: string,
|
||||||
baseUrl = 'https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing'
|
baseUrl = 'https://storage.googleapis.com/chrome-for-testing-public'
|
||||||
): string {
|
): string {
|
||||||
return `${baseUrl}/${resolveDownloadPath(platform, buildId).join('/')}`;
|
return `${baseUrl}/${resolveDownloadPath(platform, buildId).join('/')}`;
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ function folder(platform: BrowserPlatform): string {
|
|||||||
export function resolveDownloadUrl(
|
export function resolveDownloadUrl(
|
||||||
platform: BrowserPlatform,
|
platform: BrowserPlatform,
|
||||||
buildId: string,
|
buildId: string,
|
||||||
baseUrl = 'https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing'
|
baseUrl = 'https://storage.googleapis.com/chrome-for-testing-public'
|
||||||
): string {
|
): string {
|
||||||
return `${baseUrl}/${resolveDownloadPath(platform, buildId).join('/')}`;
|
return `${baseUrl}/${resolveDownloadPath(platform, buildId).join('/')}`;
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ export interface InstallOptions {
|
|||||||
*
|
*
|
||||||
* @defaultValue Either
|
* @defaultValue Either
|
||||||
*
|
*
|
||||||
* - https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing or
|
* - https://storage.googleapis.com/chrome-for-testing-public or
|
||||||
* - https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central
|
* - https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -18,23 +18,23 @@ describe('chrome-headless-shell', () => {
|
|||||||
it('should resolve download URLs', () => {
|
it('should resolve download URLs', () => {
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
resolveDownloadUrl(BrowserPlatform.LINUX, '118.0.5950.0'),
|
resolveDownloadUrl(BrowserPlatform.LINUX, '118.0.5950.0'),
|
||||||
'https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/118.0.5950.0/linux64/chrome-headless-shell-linux64.zip'
|
'https://storage.googleapis.com/chrome-for-testing-public/118.0.5950.0/linux64/chrome-headless-shell-linux64.zip'
|
||||||
);
|
);
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
resolveDownloadUrl(BrowserPlatform.MAC, '118.0.5950.0'),
|
resolveDownloadUrl(BrowserPlatform.MAC, '118.0.5950.0'),
|
||||||
'https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/118.0.5950.0/mac-x64/chrome-headless-shell-mac-x64.zip'
|
'https://storage.googleapis.com/chrome-for-testing-public/118.0.5950.0/mac-x64/chrome-headless-shell-mac-x64.zip'
|
||||||
);
|
);
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
resolveDownloadUrl(BrowserPlatform.MAC_ARM, '118.0.5950.0'),
|
resolveDownloadUrl(BrowserPlatform.MAC_ARM, '118.0.5950.0'),
|
||||||
'https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/118.0.5950.0/mac-arm64/chrome-headless-shell-mac-arm64.zip'
|
'https://storage.googleapis.com/chrome-for-testing-public/118.0.5950.0/mac-arm64/chrome-headless-shell-mac-arm64.zip'
|
||||||
);
|
);
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
resolveDownloadUrl(BrowserPlatform.WIN32, '118.0.5950.0'),
|
resolveDownloadUrl(BrowserPlatform.WIN32, '118.0.5950.0'),
|
||||||
'https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/118.0.5950.0/win32/chrome-headless-shell-win32.zip'
|
'https://storage.googleapis.com/chrome-for-testing-public/118.0.5950.0/win32/chrome-headless-shell-win32.zip'
|
||||||
);
|
);
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
resolveDownloadUrl(BrowserPlatform.WIN64, '118.0.5950.0'),
|
resolveDownloadUrl(BrowserPlatform.WIN64, '118.0.5950.0'),
|
||||||
'https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/118.0.5950.0/win64/chrome-headless-shell-win64.zip'
|
'https://storage.googleapis.com/chrome-for-testing-public/118.0.5950.0/win64/chrome-headless-shell-win64.zip'
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -22,23 +22,23 @@ describe('Chrome', () => {
|
|||||||
it('should resolve download URLs', () => {
|
it('should resolve download URLs', () => {
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
resolveDownloadUrl(BrowserPlatform.LINUX, '113.0.5672.0'),
|
resolveDownloadUrl(BrowserPlatform.LINUX, '113.0.5672.0'),
|
||||||
'https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/113.0.5672.0/linux64/chrome-linux64.zip'
|
'https://storage.googleapis.com/chrome-for-testing-public/113.0.5672.0/linux64/chrome-linux64.zip'
|
||||||
);
|
);
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
resolveDownloadUrl(BrowserPlatform.MAC, '113.0.5672.0'),
|
resolveDownloadUrl(BrowserPlatform.MAC, '113.0.5672.0'),
|
||||||
'https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/113.0.5672.0/mac-x64/chrome-mac-x64.zip'
|
'https://storage.googleapis.com/chrome-for-testing-public/113.0.5672.0/mac-x64/chrome-mac-x64.zip'
|
||||||
);
|
);
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
resolveDownloadUrl(BrowserPlatform.MAC_ARM, '113.0.5672.0'),
|
resolveDownloadUrl(BrowserPlatform.MAC_ARM, '113.0.5672.0'),
|
||||||
'https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/113.0.5672.0/mac-arm64/chrome-mac-arm64.zip'
|
'https://storage.googleapis.com/chrome-for-testing-public/113.0.5672.0/mac-arm64/chrome-mac-arm64.zip'
|
||||||
);
|
);
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
resolveDownloadUrl(BrowserPlatform.WIN32, '113.0.5672.0'),
|
resolveDownloadUrl(BrowserPlatform.WIN32, '113.0.5672.0'),
|
||||||
'https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/113.0.5672.0/win32/chrome-win32.zip'
|
'https://storage.googleapis.com/chrome-for-testing-public/113.0.5672.0/win32/chrome-win32.zip'
|
||||||
);
|
);
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
resolveDownloadUrl(BrowserPlatform.WIN64, '113.0.5672.0'),
|
resolveDownloadUrl(BrowserPlatform.WIN64, '113.0.5672.0'),
|
||||||
'https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/113.0.5672.0/win64/chrome-win64.zip'
|
'https://storage.googleapis.com/chrome-for-testing-public/113.0.5672.0/win64/chrome-win64.zip'
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -198,7 +198,7 @@ describe('Chrome install', () => {
|
|||||||
true
|
true
|
||||||
);
|
);
|
||||||
assert.deepStrictEqual(proxiedRequestUrls, [
|
assert.deepStrictEqual(proxiedRequestUrls, [
|
||||||
getServerUrl() + '/113.0.5672.0/linux64/chrome-linux64.zip',
|
getServerUrl() + `/${testChromeBuildId}/linux64/chrome-linux64.zip`,
|
||||||
]);
|
]);
|
||||||
assert.deepStrictEqual(proxiedRequestHosts, [
|
assert.deepStrictEqual(proxiedRequestHosts, [
|
||||||
getServerUrl().replace('http://', ''),
|
getServerUrl().replace('http://', ''),
|
||||||
@ -223,7 +223,7 @@ describe('Chrome install', () => {
|
|||||||
assert.strictEqual(browser.path, expectedOutputPath);
|
assert.strictEqual(browser.path, expectedOutputPath);
|
||||||
assert.ok(fs.existsSync(expectedOutputPath));
|
assert.ok(fs.existsSync(expectedOutputPath));
|
||||||
assert.deepStrictEqual(proxiedRequestUrls, [
|
assert.deepStrictEqual(proxiedRequestUrls, [
|
||||||
getServerUrl() + '/113.0.5672.0/linux64/chrome-linux64.zip',
|
getServerUrl() + `/${testChromeBuildId}/linux64/chrome-linux64.zip`,
|
||||||
]);
|
]);
|
||||||
assert.deepStrictEqual(proxiedRequestHosts, [
|
assert.deepStrictEqual(proxiedRequestHosts, [
|
||||||
getServerUrl().replace('http://', ''),
|
getServerUrl().replace('http://', ''),
|
||||||
|
@ -18,23 +18,23 @@ describe('ChromeDriver', () => {
|
|||||||
it('should resolve download URLs', () => {
|
it('should resolve download URLs', () => {
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
resolveDownloadUrl(BrowserPlatform.LINUX, '115.0.5763.0'),
|
resolveDownloadUrl(BrowserPlatform.LINUX, '115.0.5763.0'),
|
||||||
'https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/115.0.5763.0/linux64/chromedriver-linux64.zip'
|
'https://storage.googleapis.com/chrome-for-testing-public/115.0.5763.0/linux64/chromedriver-linux64.zip'
|
||||||
);
|
);
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
resolveDownloadUrl(BrowserPlatform.MAC, '115.0.5763.0'),
|
resolveDownloadUrl(BrowserPlatform.MAC, '115.0.5763.0'),
|
||||||
'https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/115.0.5763.0/mac-x64/chromedriver-mac-x64.zip'
|
'https://storage.googleapis.com/chrome-for-testing-public/115.0.5763.0/mac-x64/chromedriver-mac-x64.zip'
|
||||||
);
|
);
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
resolveDownloadUrl(BrowserPlatform.MAC_ARM, '115.0.5763.0'),
|
resolveDownloadUrl(BrowserPlatform.MAC_ARM, '115.0.5763.0'),
|
||||||
'https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/115.0.5763.0/mac-arm64/chromedriver-mac-arm64.zip'
|
'https://storage.googleapis.com/chrome-for-testing-public/115.0.5763.0/mac-arm64/chromedriver-mac-arm64.zip'
|
||||||
);
|
);
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
resolveDownloadUrl(BrowserPlatform.WIN32, '115.0.5763.0'),
|
resolveDownloadUrl(BrowserPlatform.WIN32, '115.0.5763.0'),
|
||||||
'https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/115.0.5763.0/win32/chromedriver-win32.zip'
|
'https://storage.googleapis.com/chrome-for-testing-public/115.0.5763.0/win32/chromedriver-win32.zip'
|
||||||
);
|
);
|
||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
resolveDownloadUrl(BrowserPlatform.WIN64, '115.0.5763.0'),
|
resolveDownloadUrl(BrowserPlatform.WIN64, '115.0.5763.0'),
|
||||||
'https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/115.0.5763.0/win64/chromedriver-win64.zip'
|
'https://storage.googleapis.com/chrome-for-testing-public/115.0.5763.0/win64/chromedriver-win64.zip'
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export const testChromeBuildId = '113.0.5672.0';
|
export const testChromeBuildId = '121.0.6167.85';
|
||||||
export const testChromiumBuildId = '1083080';
|
export const testChromiumBuildId = '1083080';
|
||||||
export const testFirefoxBuildId = '124.0a1';
|
export const testFirefoxBuildId = '124.0a1';
|
||||||
export const testChromeDriverBuildId = '115.0.5763.0';
|
export const testChromeDriverBuildId = '121.0.6167.85';
|
||||||
export const testChromeHeadlessShellBuildId = '118.0.5950.0';
|
export const testChromeHeadlessShellBuildId = '121.0.6167.85';
|
||||||
|
@ -57,7 +57,7 @@ export interface Configuration {
|
|||||||
* @remarks
|
* @remarks
|
||||||
* This must include the protocol and may even need a path prefix.
|
* This must include the protocol and may even need a path prefix.
|
||||||
*
|
*
|
||||||
* @defaultValue Either https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing or
|
* @defaultValue Either https://storage.googleapis.com/chrome-for-testing-public or
|
||||||
* https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central,
|
* https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central,
|
||||||
* depending on the product.
|
* depending on the product.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user