AutoLogin Check() operation is failing
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript, nodejs
- Domain
- testing-qa
Research direction
Read node_modules/codeceptjs/lib/plugin/autoLogin.js around loginAndSave and the failing TestFeature_test.js hook; reproduce the second-test AutoLogin run with the listed CodeceptJS, Node.js, and webdriverio versions. Done means the repeated check() path no longer produces the connection-refused or invalid-session failures and the test completes without duplicate done() calls.
Written by the indexing model from the issue text.
Description
What are you trying to achieve?
I am trying to use the AutoLogin feature to run multiple tests.
What do you get instead?
On the Second test it's failing to preform the check() operation and throwing connection issue as shown below-
Test 2
» [Window Size] [object Object]
[1] Starting session
I am on page "/"
I set cookie [{"domain":".github.com","expiry":1645006954,"httpOnly":true,"name":"dotcom_user","path":"/","sameSite":"Lax","secure":true,"value":"KKTestUser"},{"domain":"github.com","httpOnly":true,"name":"_gh_sess","path":"/","s...
[1] < check login > Error | unknown error: java.net.ConnectException: Connection refused: connect
[1] < check login > Error | unknown error: java.net.ConnectException: Connection refused: connect
» Failed auto login for TestFeature due to unknown error: java.net.ConnectException: Connection refused: connect
» Logging in again
[1] < check login > Starting session
I: login
I am on page "/login"
[1] < auto login > Error | unknown error: java.net.ConnectException: Connection refused: connect
[1] < auto login > Error | unknown error: java.net.ConnectException: Connection refused: connect
[1] < auto login > Error | unknown error: java.net.ConnectException: Connection refused: connect
[1] < auto login > Error | unknown error: java.net.ConnectException: Connection refused: connect
[1] < auto login > Error | unknown error: java.net.ConnectException: Connection refused: connect
[1] < auto login > Error | unknown error: java.net.ConnectException: Connection refused: connect
[1] < auto login > Finalize session
[1] Finalize < check login > session
[1] Starting < teardown > session
[1] < teardown > Finalize < check login > session
» < screenshotOnFail > Test failed, try to save a screenshot
» Screenshot has been saved to C:....\output\TestFeature_be_1613470980.failed.png
» < unknown error: java.net.ConnectException: Connection refused: connect >
× FAILED in 20129ms
I see element "#dashboard-repos-filter-left"
[1] Retrying... Attempt #2
[1] Retrying... Attempt #3
[1] Retrying... Attempt #4
[1] Retrying... Attempt #5
[1] Retrying... Attempt #6
[1] Error | unknown error: java.net.ConnectException: Connection refused: connect
[1] Error | unknown error: java.net.ConnectException: Connection refused: connect
[1] Error | unknown error: java.net.ConnectException: Connection refused: connect
[1] Starting < teardown > session
[1] < teardown > Stopping recording promises
» < screenshotOnFail > Test failed, try to save a screenshot
» Screenshot has been saved to C:....\output\Validate_C_1613471041.failed.png
» < unknown error: java.net.ConnectException: Connection refused: connect >
× FAILED in 69085ms
[2] Starting recording promises
[2] Error | invalid session id: No active session with ID 391b802f8b59b3085111b0ff6fb98ba7
invalid session id: No active session with ID 391b802f8b59b3085111b0ff6fb98ba7
-- FAILURES:
-
TestFeature
"before each" hook: Before in "TestFeature":
done() called multiple times in hook <TestFeature "before each" hook: Before in "TestFeature"> of file C:....\TestFeature_test.js; in addition, done() received error: unknown error: java.net.ConnectException: Connection refused: connect
at Object.getErrorFromResponseBody (C:....\node_modules\webdriver\build\utils.js:189:12)
at WebDriverRequest._request (C:....\node_modules\webdriver\build\request.js:168:31)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Browser.wrapCommandFn (C:....\node_modules@wdio\utils\build\shim.js:79:29)
at async Browser.wrapCommandFn (C:....\node_modules@wdio\utils\build\shim.js:79:29)
at async loginAndSave (C:....\node_modules\codeceptjs\lib\plugin\autoLogin.js:255:23)
Error: done() called multiple times in hook <TestFeature "before each" hook: Before in "TestFeature"> of file C:....\TestFeature_test.js; in addition, done() received error: unknown error: java.net.ConnectException: Connection refused: connect
at Object.getErrorFromResponseBody (node_modules\webdriver\build\utils.js:189:12)
at WebDriverRequest._request (node_modules\webdriver\build\request.js:168:31)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Browser.wrapCommandFn (node_modules@wdio\utils\build\shim.js:79:29)
at async Browser.wrapCommandFn (node_modules@wdio\utils\build\shim.js:79:29)
at async loginAndSave (node_modules\codeceptjs\lib\plugin\autoLogin.js:255:23)
at C:....\node_modules\codeceptjs\lib\scenario.js:117:26
at processTicksAndRejections (internal/process/task_queues.js:93:5) -
TestFeature
Test 2:
java.net.ConnectException: Connection refused: connect
at Object.getErrorFromResponseBody (node_modules\webdriver\build\utils.js:189:12)
at WebDriverRequest._request (node_modules\webdriver\build\request.js:168:31)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Browser.wrapCommandFn (node_modules@wdio\utils\build\shim.js:79:29)
at async Browser.$$ (node_modules\webdriverio\build\commands\browser$$.js:53:17)
at async Browser.wrapCommandFn (node_modules@wdio\utils\build\shim.js:79:29)
at async WebDriver._locate (node_modules\codeceptjs\lib\helper\WebDriver.js:758:19)
at async WebDriver.seeElement (node_modules\codeceptjs\lib\helper\WebDriver.js:1314:17)
Details
- CodeceptJS version: 3.0.5
- NodeJS Version: 14.15.0
- Operating System: Windows 10
- webdriverio 7.0.1
- Dominant language
- JavaScript
- Stars
- 4.2k
- Forks
- 756
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 16
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from codeceptjs/CodeceptJS
-
stale
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
codeceptjs/CodeceptJS#5420 · 1 comment ·
-
stale
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
codeceptjs/CodeceptJS#5358 · 1 comment ·
-
stale
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
codeceptjs/CodeceptJS#4958 · 10 comments · 2 reactions ·
-
stale
Difficulty 1/5 Under an hour Newbie friendliness 72/100
codeceptjs/CodeceptJS#4778 · 3 comments ·
-
stale
Difficulty 4/5 3-5 days Newbie friendliness 38/100
codeceptjs/CodeceptJS#5618 · 1 comment ·
All issues in codeceptjs/CodeceptJS
Similar issues
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Automattic/safe-publish#594 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
dream-num/dsh-univer-office#104 ·
-
comp/dashboard invalid P3
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
NousResearch/hermes-agent#121143 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
avniproject/avni-webapp#1811 ·
-
area/auroraboot area/webui bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100