webdriverio-community / wdio-vscode-service

A service to test VSCode extensions from end to end using WebdriverIO
https://webdriverio-community.github.io/wdio-vscode-service/
MIT License
29 stars 23 forks source link

Bug fix for import('vscode-uri').default #93

Closed mikhail-g closed 8 months ago

mikhail-g commented 8 months ago

Fix for issue #81 and #88

Fresh wdio-vscode-service project is not starting because of import('vscode-uri').default Error message: TypeError: Cannot destructure property 'URI' of '(intermediate value).default' as it is undefined

mikhail-g commented 8 months ago

Fixed failing tests

mikhail-g commented 8 months ago

hey @christian-bromann could you please approve the workflow, the CI tests have been fixed and should pass now

mikhail-g commented 8 months ago

The failure on CI for test:e2e:run seems to doesn't relate to my changes

2023-11-16T01:08:24.540Z INFO @wdio/cli:launcher: Run onPrepare hook
2023-11-16T01:08:24.543Z INFO wdio-vscode-service/launcher: Fetch releases from https://update.code.visualstudio.com/api/releases/stable
2023-11-16T01:08:24.628Z DEBUG @wdio/cli:utils: Finished to run "onPrepare" hook in 87ms
2023-11-16T01:08:24.629Z INFO @wdio/local-runner: Shutting down spawned worker
2023-11-16T01:08:24.880Z INFO @wdio/local-runner: Waiting for 0 to shut down gracefully
2023-11-16T01:08:24.881Z INFO @wdio/local-runner: shutting down
SevereServiceError in "onPrepare"
SevereServiceError: 
A service failed in the 'onPrepare' hook
SevereServiceError: Couldn't fetch latest VSCode: read ECONNRESET
    at VSCodeServiceLauncher._fetchVSCodeVersion (file:///Users/runner/work/wdio-vscode-service/wdio-vscode-service/dist/launcher.js:196:19)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async VSCodeServiceLauncher._setupChromedriver (file:///Users/runner/work/wdio-vscode-service/wdio-vscode-service/dist/launcher.js:130:25)
    at async VSCodeServiceLauncher._setupVSCodeDesktop (file:///Users/runner/work/wdio-vscode-service/wdio-vscode-service/dist/launcher.js:110:72)
    at async VSCodeServiceLauncher.onPrepare (file:///Users/runner/work/wdio-vscode-service/wdio-vscode-service/dist/launcher.js:47:17)
    at async file:///Users/runner/work/wdio-vscode-service/wdio-vscode-service/node_modules/@wdio/cli/build/utils.js:[43](https://github.com/webdriverio-community/wdio-vscode-service/actions/runs/6884575889/job/18728289538?pr=93#step:6:44):17
    at async Promise.all (index 0)
    at async Launcher.run (file:///Users/runner/work/wdio-vscode-service/wdio-vscode-service/node_modules/@wdio/cli/build/launcher.js:94:13)
mikhail-g commented 8 months ago

when running locally it downloads the versions:

INFO wdio-vscode-service/launcher: Download Chromedriver (v114.0.5735.90)
INFO wdio-vscode-service/launcher: Download VSCode binary (1.84.2)

I guess on CI it tries to download the same

christian-bromann commented 8 months ago

The issue relates to the fact that Chrome moved to Chrome for Testing and has changed the way how driver are supposed to be downloaded. This service should rely on the wdio-chromedriver-service anymore and instead should rely on WebdriverIO to download the right driver. I haven't had time to make that change yet.

mikhail-g commented 8 months ago

Thank you @christian-bromann !