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

When using browser.restart() in tests, intermittently get invalid session id #16

Open
chrisreed-sag opened this issue Mar 9, 2021 · 0 comments

Comments

@chrisreed-sag
Copy link

Some of our tests use browser.restart(). Such tests intermittently fail after the last test has run with:

[14:19:16] I/plugins - �[31m 	 Fail:  protractor-console Plugin Tests �[39m
[14:19:16] E/plugins - 		Failure during postTest: invalid session id
[14:19:16] E/plugins - 		NoSuchSessionError: invalid session id
		    at Object.throwDecodedError (/work/teamcity/work/93e4422f8744bcca/src/output-amd64-rhel7/web-app/build/node_modules/selenium-webdriver/lib/error.js:514:15)
		    at parseHttpResponse (/work/teamcity/work/93e4422f8744bcca/src/output-amd64-rhel7/web-app/build/node_modules/selenium-webdriver/lib/http.js:519:13)
		    at doSend.then.response (/work/teamcity/work/93e4422f8744bcca/src/output-amd64-rhel7/web-app/build/node_modules/selenium-webdriver/lib/http.js:441:30)
		    at process._tickCallback (internal/process/next_tick.js:68:7)

We have worked around this by wrapping the plugin and adding .catch(_ => null) to ignore exceptions.

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

1 participant