[🐛 Bug]: <NODE_TLS_REJECT_UNAUTHORIZED environment>
Have you read the Contributing Guidelines on issues?
- [X] I have read the Contributing Guidelines on issues.
WebdriverIO Version
9.2.8
Node.js Version
20.10.0
Mode
WDIO Testrunner
Which capabilities are you using?
platformName: 'Android',
'appium:app': getCIAppID(appIdValue) || process.env.BROWSERSTACK_APP_ID_ANDROID,
'appium:autoGrantPermissions': 'true', //Auto accept Push Notification
'appium:interactiveDebugging': 'true',
'bstack:options': {
buildName: getCIAppID(appIdValue) || `Manual Android Execution - ${new Date().toLocaleString('en-gb')}`,
projectName: 'App Android',
networkLogs: true,
networkLogsOptions: {
captureContent: true,
},
idleTimeout: 120,
debug: true,
appiumVersion: '1.22.0',
},
What happened?
When run locally
(node:92107) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
[1-0] (Use `node --trace-warnings ...` to show where the warning was created)
When run on CI pipeline
Error only on Pipeline run -
(node:47) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
(Use `node --trace-warnings ...` to show where the warning was created)
Error while trying to execute binary Error: Command failed: /root/.browserstack/BrowserStackLocal --daemon start --log-file /tmp/build/ffa2fcdb/repo/tests/e2e/local.log --source nodejs-1.5.5 --key ((redacted)) --force-local --local-identifier 2681f2a5-d789-49f9-a9c2-b311bdfa5644
/root/.browserstack/BrowserStackLocal: --import is not allowed in NODE_OPTIONS
12:47:02
What is your expected behavior?
no node error, and it should work smoothly as with @wdio/cli - v 8.40.6
How to reproduce the bug.
platformName: 'Android',
'appium:app': getCIAppID(appIdValue) || process.env.BROWSERSTACK_APP_ID_ANDROID,
'appium:autoGrantPermissions': 'true', //Auto accept Push Notification
'appium:interactiveDebugging': 'true',
'bstack:options': {
buildName: getCIAppID(appIdValue) || Manual Android Execution - ${new Date().toLocaleString('en-gb')},
projectName: 'App Android',
networkLogs: true,
networkLogsOptions: {
captureContent: true,
},
idleTimeout: 120,
debug: true,
appiumVersion: '1.22.0',
},
Relevant log output
platformName: 'Android',
'appium:app': getCIAppID(appIdValue) || process.env.BROWSERSTACK_APP_ID_ANDROID,
'appium:autoGrantPermissions': 'true', //Auto accept Push Notification
'appium:interactiveDebugging': 'true',
'bstack:options': {
buildName: getCIAppID(appIdValue) || `Manual Android Execution - ${new Date().toLocaleString('en-gb')}`,
projectName: 'Appv3 Android',
networkLogs: true,
networkLogsOptions: {
captureContent: true,
},
idleTimeout: 120,
debug: true,
appiumVersion: '1.22.0',
},
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Is there an existing issue for this?
- [X] I have searched the existing issues
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!
cc @amaanbs
@christian-bromann Lemme check this out.
@webdriverio/browserstack can someone here take a look?
Hi there,
Our CI pipeline is facing the same issue here. BS tests work locally but they fail with v9+ on Jenkins using BrowserStack with a similar error to the above:
ERROR @wdio/browserstack-service: Build creation failed TypeError: fetch failed
/app/.browserstack/BrowserStackLocal: --import is not allowed in NODE_OPTIONS.
Any updates or workarounds to this? Thanks.
HI, any update with browserstack supporting webdriverIO IO libraries version 9?