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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

browserVersion: insiders fails #124

Open
kgartland-rstudio opened this issue Jun 21, 2024 · 1 comment
Open

browserVersion: insiders fails #124

kgartland-rstudio opened this issue Jun 21, 2024 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@kgartland-rstudio
Copy link

kgartland-rstudio commented Jun 21, 2024

Version: wdio-vscode-service": "^6.1.0

When running with browserVersion: "insiders" I hit the following error:

2024-06-21T15:19:35.831Z INFO @wdio/local-runner: shutting down
SevereServiceError in "onPrepare"
SevereServiceError:
A service failed in the 'onPrepare' hook
SevereServiceError: Couldn't set up VSCode: Invalid version main
at VSCodeServiceLauncher._downloadVSCode (file:///Users/kgartland/work/publishing-client/test/vscode-ui/node_modules/wdio-vscode-service/src/launcher.ts:192:19)
at async VSCodeServiceLauncher._setupVSCodeDesktop (file:///Users/kgartland/work/publishing-client/test/vscode-ui/node_modules/wdio-vscode-service/src/launcher.ts:175:47)
at async VSCodeServiceLauncher.onPrepare (file:///Users/kgartland/work/publishing-client/test/vscode-ui/node_modules/wdio-vscode-service/src/launcher.ts:95:17)
at async file:///Users/kgartland/work/publishing-client/test/vscode-ui/node_modules/@wdio/cli/build/utils.js:42:17
at async Promise.all (index 0)
at async Launcher.run (file:///Users/kgartland/work/publishing-client/test/vscode-ui/node_modules/@wdio/cli/build/launcher.js:93:13)
Stopping runner...
at file:///Users/kgartland/work/publishing-client/test/vscode-ui/node_modules/@wdio/cli/build/utils.js:58:35
at async Launcher.run (file:///Users/kgartland/work/publishing-client/test/vscode-ui/node_modules/@wdio/cli/build/launcher.js:93:13)

Running with browserVersion: "stable" works as expected.

@christian-bromann christian-bromann added bug Something isn't working help wanted Extra attention is needed labels Jun 21, 2024
@sij1nk
Copy link

sij1nk commented Aug 1, 2024

browserVersion: "insiders" similarly does not work if browserName: "chrome"

Using the following wdio.conf.ts (only the capabilities object is really relevant here):

import type { Options } from "@wdio/types";
export const config: Options.Testrunner = {
  runner: "local",
  autoCompileOpts: {
    autoCompile: true,
    tsNodeOpts: {
      project: "./tsconfig.json",
      transpileOnly: true,
    },
  },
  specs: ["./test/specs/**/*.ts"],
  exclude: [],
  maxInstances: 10,
  capabilities: [
    {
      browserName: "chrome",
      browserVersion: "insiders",
      "wdio:vscodeOptions": {
        userSettings: {
          "editor.fontSize": 14,
        },
      },
    },
  ],
  logLevel: "info",
  bail: 0,
  waitforTimeout: 10000,
  connectionRetryTimeout: 120000,
  connectionRetryCount: 3,
  services: ["vscode"],

  framework: "mocha",

  reporters: ["spec"],

  mochaOpts: {
    ui: "bdd",
    timeout: 60000,
  },
};

Produces the following error:


> wdio
> wdio run ./wdio.conf.ts


Execution of 1 workers started at 2024-08-01T09:21:17.153Z

2024-08-01T09:21:17.361Z INFO @wdio/cli:launcher: Run onPrepare hook
2024-08-01T09:21:17.804Z INFO @wdio/local-runner: Shutting down spawned worker
2024-08-01T09:21:18.055Z INFO @wdio/local-runner: Waiting for 0 to shut down gracefully
2024-08-01T09:21:18.055Z INFO @wdio/local-runner: shutting down
SevereServiceError in "onPrepare"
SevereServiceError: 
A service failed in the 'onPrepare' hook
SevereServiceError: Couldn't start server for VSCode Web: Couldn't set up VSCode Web: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
    at VSCodeServiceLauncher._setupVSCodeWeb (file:///home/rg/repos/@webdriverio/vscode-web-latest/node_modules/wdio-vscode-service/src/launcher.ts:133:19)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async VSCodeServiceLauncher.onPrepare (file:///home/rg/repos/@webdriverio/vscode-web-latest/node_modules/wdio-vscode-service/src/launcher.ts:102:13)
    at async file:///home/rg/repos/@webdriverio/vscode-web-latest/node_modules/@wdio/cli/build/utils.js:42:17
    at async Promise.all (index 0)
    at async Launcher.run (file:///home/rg/repos/@webdriverio/vscode-web-latest/node_modules/@wdio/cli/build/launcher.js:93:13)



Stopping runner...
    at file:///home/rg/repos/@webdriverio/vscode-web-latest/node_modules/@wdio/cli/build/utils.js:58:35
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Launcher.run (file:///home/rg/repos/@webdriverio/vscode-web-latest/node_modules/@wdio/cli/build/launcher.js:93:13)

I traced this back to https://github.com/webdriverio-community/wdio-vscode-service/blob/main/src/launcher.ts#L267 : the string insiders is inserted into VSCODE_WEB_STANDALONE, but the resulting URL leads nowhere. It works if we insert the string insider

https://update.code.visualstudio.com/api/update/web-standalone/insiders/latest
https://update.code.visualstudio.com/api/update/web-standalone/insider/latest

Not sure if there's anything else, I did not debug this extensively

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants