Issue with running multiple test scripts w/ WebDriverIO. Unhandled promise rejection
When running all of my test scripts, the first Feature will pass, but the rest will receive the following error:
A session id is required for this command but wasn't found in the response payload
(node:11) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: A session id is required for this command but wasn't found in the response payload
(node:11) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1)
NPM - 3.10.3
codeceptjs - 0.4.6
node - 6.7.0
WebDriverIO - 4.2.16
This was previously working on codeceptjs 0.4.5, And works if I roll back to codeceptjs 0.4.5
Running a single test script, (e.g. codeceptjs run . --grep "@header" ) Works perfectly fine.
Any thoughts?
Do you use restart:false option?
If yes, there is an issue and PR, please check https://github.com/Codeception/CodeceptJS/pull/240
Yes, I have that option set in the codeceptjs config. Seems to be the issue... I'll way for the request to be merged, and report any issues if they persist. Thanks!
Issue has been fixed in version 0.4.7 with the merging of PR #240. Thanks a bunch guys! Keep up the awesome work!
Hello,
Got here by google and it seems the problem is back as i encountered it today. :)
same here. I do not use the restart option (neither restart: false nor restart:true)
nodejs: 4.4.1 webdriverio: 4.6.2 codeceptjs: 0.5.1
config-file:
exports.config = {
"helpers": {
"WebDriverIO": {
// load variables from the environment and provide defaults
"url": process.env.CODECEPT_URL || 'http://www.ad.nl',
"browser" : process.profile || "phantomjs"
}
},
"tests": "./*_test.js",
"timeout": 120000,
"output": "./output",
"include": {
"I": "./steps_file.js",
"functions": "./pages/global_functions.js",
"globals":"./globals.js"
},
"bootstrap": false,
"mocha": {
"reporterOptions": {
"mochaFile": "output/result.xml",
"reportDir": "output",
"reportFilename": "check",
"enableCharts": true,
"autoOpen": true,
"quiet": true
}
},
};
I am also getting
[6] Error | Error: A session id is required for this command but wasn't found in the response payload
on tests after the first test. I am using restart:false
Please, provide your test to reproduce the issue
@APshenkin I'll link you to our tests. If I get some free time I might try to make a trimmed down reproducible case.
codecept.conf.js saucelabs_helper.js steps_file.js codeceptjs-init.js login_test.js resource_test.js
Travis CI log with error and codeceptjs verbose: https://travis-ci.org/ole-vi/BeLL-Apps/builds/210193040#L1159
I only have this issue when the tests are running on Travis, not when running them locally.
@thesupad @joelgrimberg Did either you figure out what the problem was? Do you run into this error when running the tests locally or only on a CI build system?
I have the same issue with when i am using it with Browserstack:
NPM - 3.10.10 codeceptjs - 0.6.2 node - 6.10.0 WebDriverIO - 4.8.0
Just reproduced it again
Still face the same err "Error: A session id is required for this command but wasn't found in the response payload". Can someone guide me what the err actually means? Thanks!