Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[馃毇 Bug] downloadChromeDriver(latest) is not working with new ExTester(undefined, ReleaseQuality.Insider) #1310

Open
c3wenjiaowang opened this issue May 14, 2024 · 0 comments
Labels
bug Something isn't working new-issue New issue which was not discussed yet

Comments

@c3wenjiaowang
Copy link

Describe the bug

The url to download is giving 404:
Downloading ChromeDriver 122.0.6261.128 from: https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/122.0.6261.128/linux64/chromedriver-linux64.zip

240progress: 0/1449 (0%)

241HTTPError: Response code 404 (Not Found)

242 at Request._onResponseBase (/home/runner/work/c3vsce/c3vsce/c3/c3vsce/test/node_modules/got/dist/source/core/index.js:913:31)

243 at Request._onResponse (/home/runner/work/c3vsce/c3vsce/c3/c3vsce/test/node_modules/got/dist/source/core/index.js:948:24)

244 at ClientRequest. (/home/runner/work/c3vsce/c3vsce/c3/c3vsce/test/node_modules/got/dist/source/core/index.js:962:23)

245 at Object.onceWrapper (node:events:629:26)

246 at ClientRequest.emit (node:events:526:35)

247 at origin.emit

Steps to reproduce

1. Run the following code would show the issue:
import { resolve } from 'path';
const exTester = new ExTester(undefined, ReleaseQuality.Insider, resolve(homedir(), '.vscode/ui_test_extensions'))
await exTester.downloadCode('latest');
await exTester.downloadChromeDriver('latest');

2. With forcing it to download from the correct path: 
In `driverUtil.js`, change `getChromeDriverUrl` to following:
    getChromeDriverURL(version) {
        const majorVersion = this.getMajorVersion(version);
        let driverPlatform = DriverUtil.getChromeDriverPlatformOLD().replace('_', '-');
        let url = `https://storage.googleapis.com/chrome-for-testing-public/${version}/${driverPlatform}/chromedriver-${driverPlatform}.zip`;
        return url;
        // "https://storage.googleapis.com/chrome-for-testing-public/122.0.6261.128/mac-x64/chrome-mac-x64.zip"
    }

then I got this error when running the test:
Detected user defined code settings
browser.js:94
Writing code settings to /var/folders/k5/zy4s2pd56v34sw87bpb05vq40000gn/T/test-resources/settings/User/settings.json
browser.js:100
Launching browser...
browser.js:125
  1) "before all" hook in "{root}"
spec.js:88
  2) "after all" hook in "{root}"
spec.js:88
  0 passing (13s)
base.js:379
  2 failing
base.js:392
  1) "before all" hook in "{root}":
     TypeError: not a chrome.ServiceBuilder object
      at Builder.setChromeService (test/node_modules/selenium-webdriver/index.js:450:13)
      at VSBrowser.start (test/node_modules/vscode-extension-tester/out/browser.js:127:14)
      at async Context.<anonymous> (test/node_modules/vscode-extension-tester/out/suite/runner.js:114:17)

base.js:305
  2) "after all" hook in "{root}":
     TypeError: Cannot read properties of undefined (reading 'manage')
      at VSBrowser.quit (test/node_modules/vscode-extension-tester/out/browser.js:174:44)
      at Context.<anonymous> (test/node_modules/vscode-extension-tester/out/suite/runner.js:123:31)
      at process.processImmediate (node:internal/timers:478:21)
      at process.callbackTrampoline (node:internal/async_hooks:130:17)

Logs

Downloading ChromeDriver 122.0.6261.128 from: https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/122.0.6261.128/linux64/chromedriver-linux64.zip


240progress: 0/1449 (0%)


241HTTPError: Response code 404 (Not Found)


242    at Request._onResponseBase (/home/runner/work/c3vsce/c3vsce/c3/c3vsce/test/node_modules/got/dist/source/core/index.js:913:31)


243    at Request._onResponse (/home/runner/work/c3vsce/c3vsce/c3/c3vsce/test/node_modules/got/dist/source/core/index.js:948:24)


244    at ClientRequest.<anonymous> (/home/runner/work/c3vsce/c3vsce/c3/c3vsce/test/node_modules/got/dist/source/core/index.js:962:23)


245    at Object.onceWrapper (node:events:629:26)


246    at ClientRequest.emit (node:events:526:35)


247    at origin.emit

Operating System

macOs 14.4.1

Visual Studio Code

1.90.0-insider

vscode-extension-tester

8.2.0

NodeJS

20.9.0

npm

10.1.0

@c3wenjiaowang c3wenjiaowang added bug Something isn't working new-issue New issue which was not discussed yet labels May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working new-issue New issue which was not discussed yet
Projects
Status: New
Development

No branches or pull requests

1 participant