Coder Social home page Coder Social logo

[💡 Feature]: Support configuring NODE_OPTIONS for ChromeDriver separately from NODE_OPTIONS for WDIO itself about webdriverio HOT 5 OPEN

tanin47 avatar tanin47 commented on September 26, 2024 1
[💡 Feature]: Support configuring NODE_OPTIONS for ChromeDriver separately from NODE_OPTIONS for WDIO itself

from webdriverio.

Comments (5)

tanin47 avatar tanin47 commented on September 26, 2024 1

Sounds good. I'm happy to make the change!

from webdriverio.

christian-bromann avatar christian-bromann commented on September 26, 2024

Today NODE_OPTIONS for WDIO is carried over to ChromeDriver; in turn, it is carried over to Electron (dev mode), and Electron crashes because of it.

Can you be more specific on this section? I don't quite get why certain environment variables available when starting Chromedriver cause Electron to crash.

I would also consider adding shell: true, so it closely resembles when the Electron is started directly from command line.

How is starting Electron related to starting Chromedriver?

from webdriverio.

tanin47 avatar tanin47 commented on September 26, 2024

Thank you.

How is starting Electron related to starting Chromedriver?

ChromeDriver starts Electron, and I think the shell env is likely carried over to Electron when ChromeDriver starts Electron, but I don't have a way to confirm this.

I also added in the below to the post:

Specifically, WDIO sets NODE_OPTIONS=' --loader ts-node/esm/transpile-only --no-warnings' (ref), which is carried over to ChromeDriver and, thus, Electron.

To verify the impact of this env, we can run: NODE_OPTIONS=' --loader ts-node/esm/transpile-only --no-warnings' ./node_modules/.bin/electron in Terminal, and Electron will crash.

from webdriverio.

christian-bromann avatar christian-bromann commented on September 26, 2024

Thanks for clarifying! I think the best solution would be to just filter out NODE_OPTIONS as you mentioned in your alternative approach. Until we don't really have a reason why someone would need to control extra env vars for Chrome/Electron we shouldn't add any complexity.

Any contributions would be appreciated.

from webdriverio.

wdio-bot avatar wdio-bot commented on September 26, 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!

from webdriverio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.