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

Misconfiguring devServer for CT causes browser launching to fail silently #21948

Closed
sync-by-unito bot opened this issue May 31, 2022 · 3 comments · Fixed by #22927
Closed

Misconfiguring devServer for CT causes browser launching to fail silently #21948

sync-by-unito bot opened this issue May 31, 2022 · 3 comments · Fixed by #22927
Assignees
Labels
CT Issue related to component testing type: bug

Comments

@sync-by-unito
Copy link

sync-by-unito bot commented May 31, 2022

If you provide a value to the devServer configuration param that doesn't actually start up a dev server, you can't launch a browser from the runner, and theres no indication to the developer that anything is wrong.

module.exports = defineConfig({
  component: {
    devServer: () => { }
  },
});

We should provide a meaningful message when the devServer doesn't start successfully so the developer can know where to investigate what might be wrong in their config.

Also, the specPattern option appears to be required even though there should be a default value set for it. If the specPattern is missing, the browser won’t launch as well. Video example: Loom

Can.t.launch.browser.when.spec.pattern.is.not.defined.mp4

┆Issue is synchronized with this Jira Bug by Unito
┆author: Ely Lucas
┆epic: CT Architecture
┆friendlyId: UNIFY-874
┆priority: Low
┆sprint: Unification Release Backlog
┆taskType: Bug

@sync-by-unito sync-by-unito bot added CT Issue related to component testing jira-migration type: bug labels May 31, 2022
@sync-by-unito
Copy link
Author

sync-by-unito bot commented May 31, 2022

➤ Tim Griesser commented:

Initially thought this would have been addressed by #19572 but realized this is a slightly different issue, basically checking if a PID for the devServer exists in the way that we might for spawning a browser.

@sync-by-unito
Copy link
Author

sync-by-unito bot commented May 31, 2022

➤ Chris Baus commented:

We should log an error to the launch pad.

@lmiller1990
Copy link
Contributor

devServer needs to return a value. If it doesn't, we could log an error to that meaning, using the packages/errors to have a nice, informative message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CT Issue related to component testing type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants