Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

waitForFirstXHR is not closing the clientPoll function call when waitForXHR times out #70

Open
kretschmannj opened this issue Mar 23, 2022 · 1 comment

Comments

@kretschmannj
Copy link

kretschmannj commented Mar 23, 2022

I'm calling waitForFirstXHR in my test and when the XHR request is not found the request times out as expected. However, the clientPoll function is apparently not being closed so when the Nightwatch test completes and the session is closed, I get 'invalid session id' errors followed by ECONNREFUSED errors. I was able to validation the open clientPoll call by running with 'trace' level logging enabled ...

1648056368066	geckodriver::browser	DEBUG	Browser process stopped: exit code: 0
1648056368318	webdriver::server	DEBUG	<- 200 OK {"value":null}
1648056368318	webdriver::server	DEBUG	-> POST /session/c48a059b-58de-4ecf-a4a4-71b3db843224/execute/sync {
  "args": [
  ],
  "script": "var passedArgs = Array.prototype.slice.call(arguments,0); return (function clientPoll() {\n    \u002f\u002f console.log('\\n*** running clientPoll ***\\n')\r\n    return window.xhrListen || [];\n}).apply(window, passedArgs);"
}
1648056368318	webdriver::server	DEBUG	<- 404 Not Found {"value":{"error":"invalid session id","message":"Tried to run command without establishing a connection","stacktrace":""}}

I'm running Nightwatch version 1.7.13 on Firefox v 98

@Pieras2
Copy link

Pieras2 commented Mar 23, 2022 via email

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

No branches or pull requests

2 participants