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

[🐛 Bug]: Specifying browser version does not work when running in a Docker container #12846

Open
3 tasks done
nguyencuongabcxyz opened this issue May 9, 2024 · 1 comment
Labels
Bug 🐛 help wanted Issues that are free to take by anyone interested

Comments

@nguyencuongabcxyz
Copy link
Contributor

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

8.36.1

Node.js Version

18.19.1

Mode

Standalone Mode

Which capabilities are you using?

{
        browserName: 'chrome',
        browserVersion: '120.0.6099.109',
        'goog:chromeOptions': {
          args: [
            '--no-sandbox',
            '--headless',
            '--disable-gpu',
            'window-size=1200,900',
            '--disable-dev-shm-usage',
          ],
        },
    }

What happened?

I'm currently in the process of upgrading my WebdriverIO from version 6 to version 8.
My WebdriverIO setup is running inside a Docker container based on 'almalinux/8-base'. In version 6, my container required a manual installation of a fixed version of Chrome for testing purposes. However, upon upgrading to version 8, I discovered a new feature that allows specifying a browser version, streamlining the process within WebdriverIO.

After implementing this feature and removing the manual Chrome installation from my container, I encountered an error when attempting to start a session. To confirm that this issue wasn't specific to my project setup, I created a simple example to replicate the problem, which indicates that it's a broader issue within WebdriverIO.

What is your expected behavior?

I expect that Webdriverio will automatically download and set up "Chrome" and "Chrome Diver" when the browser version is specified.

How to reproduce the bug.

The reproducible example can be found at https://github.com/nguyencuongabcxyz/reproduced-webdriverio-issue. In this example, I utilized the 'almalinux/8-base' Docker image and Node.js 18, as they closely resemble my actual project setup. However, I also attempted using the 'node:20-alpine' base Docker image and encountered different errors.

Relevant log output

Error [ERR_STREAM_WRITE_AFTER_END]: write after end
    at new NodeError (node:internal/errors:405:5)
    at _write (node:internal/streams/writable:322:11)
    at Writable.write (node:internal/streams/writable:337:10)
    at Socket.ondata (node:internal/streams/readable:809:22)
    at Socket.emit (node:events:517:28)
    at Socket.emit (node:domain:489:12)
    at addChunk (node:internal/streams/readable:368:12)
    at readableAddChunk (node:internal/streams/readable:341:9)
    at Readable.push (node:internal/streams/readable:278:10)
    at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)
Emitted 'error' event on WriteStream instance at:
    at WriteStream.onerror (node:internal/streams/readable:828:14)
    at WriteStream.emit (node:events:529:35)
    at WriteStream.emit (node:domain:489:12)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  code: 'ERR_STREAM_WRITE_AFTER_END'

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues
@nguyencuongabcxyz nguyencuongabcxyz added Bug 🐛 Needs Triaging ⏳ No one has looked into the issue yet labels May 9, 2024
@christian-bromann christian-bromann added help wanted Issues that are free to take by anyone interested and removed Needs Triaging ⏳ No one has looked into the issue yet labels May 9, 2024
@wdio-bot
Copy link
Contributor

wdio-bot commented May 9, 2024

Thanks for reporting!

We greatly appreciate any contributions that help resolve the bug. While we understand that active contributors have their own priorities, we kindly request your assistance if you rely on this bug being fixed. We encourage you to take a look at our contribution guidelines or join our friendly Discord development server, where you can ask any questions you may have. Thank you for your support, and cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐛 help wanted Issues that are free to take by anyone interested
Projects
None yet
Development

No branches or pull requests

3 participants