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

Issue with running multiple test scripts w/ WebDriverIO. Unhandled promise rejection #241

Closed
artiomnist opened this issue Oct 5, 2016 · 12 comments

Comments

@artiomnist
Copy link
Contributor

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?

@APshenkin
Copy link
Collaborator

Do you use restart:false option?
If yes, there is an issue and PR, please check #240

@artiomnist
Copy link
Contributor Author

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!

@artiomnist
Copy link
Contributor Author

Issue has been fixed in version 0.4.7 with the merging of PR #240.
Thanks a bunch guys! Keep up the awesome work!

@adrien-carre
Copy link

Hello,

Got here by google and it seems the problem is back as i encountered it today. :)

@joelgrimberg
Copy link

joelgrimberg commented Mar 10, 2017

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
    }
  },
};

@waryhermit
Copy link

waryhermit commented Mar 13, 2017

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

@APshenkin
Copy link
Collaborator

Please, provide your test to reproduce the issue

@waryhermit
Copy link

@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

@waryhermit
Copy link

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?

@MitkoTschimev
Copy link

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

@mikhailpractice
Copy link

Just reproduced it again

@shamili12
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants