@wdio/local-runner: Failed launching test session: TypeError: Cannot read property 'toLowerCase' of undefined
See original GitHub issueDescribe the bug
We have our WebdriverIO(Mocha) project integrated with Azure Devops pipeline and also Browserstack as a cloud. When i run it locally with browserstack - everything works well, however when i run on Azure - for some reason i get this error
@wdio/local-runner: Failed launching test session: TypeError: Cannot read property 'toLowerCase' of undefined
Tests are still passing but for some reason it is failing pipeline due to this error. Also i do not even see any ‘toLowerCase’ in my code as well as node-modules to even debug it or figure out why it is happening.
Environment:
- WebdriverIO version: 6.1.25
- Node.js version: 13.10.1
- NPM version: 6.14.5
- Platform name and version: iOS cloud latest (browserstack)
- Additional wdio packages used (if applicable):
"@wdio/appium-service": "^6.1.16",
"@wdio/cli": "^6.1.25",
"@wdio/junit-reporter": "^6.1.25",
"@wdio/local-runner": "^6.1.25",
"@wdio/mocha-framework": "^6.1.19",
"@wdio/selenium-standalone-service": "^6.1.14",
"@wdio/sync": "^6.1.14",
"webdriverio": "^6.1.25",
"@wdio/spec-reporter": "^6.1.23",
"appium": "^1.17.1",
"browserstack-local": "^1.4.5",
"chai": "^4.2.0"
Config of WebdriverIO
process.env.PLATFORM = "IOS"
exports.config = {
runner: 'local',
user: process.env.BROWSERSTACK_USERNAME || '*****',
key: process.env.BROWSERSTACK_ACCESS_KEY || '**********',
updateJob: false,
specs: [
'./spec/tests/*_spec.js'
],
exclude: [],
framework: 'mocha',
mochaOpts: {
timeout: 99999999
},
logLevel: 'trace',
reporters: [
'spec',
['junit', {
outputDir: './reportsIOS/',
outputFileFormat: function(options) { // optional
return 'test-ios.xml'
}
}]
],
capabilities: [{
'name': 'My company',
'build': 'IOS',
'project': 'UI tests',
'device': 'iPhone 11 Pro',
'app': "my_app_custom_id",
'os_version': '13',
'browserstack.debug': true,
"browserstack.appium_version" : "1.17.0",
}],
}
[0-0] 2020-07-08T13:33:42.073Z ERROR @wdio/local-runner: Failed launching test session: TypeError: Cannot read property 'toLowerCase' of undefined
at JunitReporter.buildJunitXml (/home/vsts/work/1/s/node_modules/@wdio/junit-reporter/build/index.js:152:122)
at JunitReporter.onRunnerEnd (/home/vsts/work/1/s/node_modules/@wdio/junit-reporter/build/index.js:23:22)
at JunitReporter.WDIOReporter.on.runner (/home/vsts/work/1/s/node_modules/@wdio/reporter/build/index.js:145:12)
at JunitReporter.emit (events.js:198:13)
at JunitReporter.EventEmitter.emit (domain.js:448:20)
at reporters.forEach.reporter (/home/vsts/work/1/s/node_modules/@wdio/runner/build/reporter.js:38:49)
at Array.forEach (<anonymous>)
at BaseReporter.emit (/home/vsts/work/1/s/node_modules/@wdio/runner/build/reporter.js:38:20)
at Runner.run (/home/vsts/work/1/s/node_modules/@wdio/runner/build/index.js:166:19)
at process._tickCallback (internal/process/next_tick.js:68:7)
2020-07-08T13:33:42.078Z DEBUG @wdio/local-runner: Runner 0-0 finished with exit code 1
[0-0] FAILED in mycustomid - /spec/tests/login_spec.js
2020-07-08T13:33:42.079Z INFO @wdio/cli:launcher: Run onComplete hook
Expected behavior
I expect it to generate the report the same way as it does on local and do not fail pipeline
Log
Azure pipeline logs: logs.txt
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (9 by maintainers)
Top Results From Across the Web
TypeError: Cannot read property 'watch' of undefined at ...
I am using WebdriverIO for automation when the test ...
Read more >webdriverio/webdriverio - Gitter
Question, I am running a test in react native with webdriver, ... TypeError: Cannot read property 'toLowerCase' of undefined at launch ...
Read more >typeerror: cannot read properties of undefined ... - You.com
But while running the command 'react-native run-android', it is giving me this error. I wanted to start my android emulator. But getting this...
Read more >Cannot read property 'toLowerCase' of undefined (Example)
Uncaught TypeError: Cannot read property 'toLowerCase' of undefined. Help , why i receive this error ?
Read more >TypeError: Cannot read property 'toLowerCase' of null
Only T && T will pass. Note that we have to test for null first, since it has no length property and will...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m picking this task up.
This is a known issue #9288