Skip to content
This repository was archived by the owner on Jan 24, 2025. It is now read-only.
This repository was archived by the owner on Jan 24, 2025. It is now read-only.

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

Description

@chrisreed-sag

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions