mozilla / geckodriver

WebDriver for Firefox
https://firefox-source-docs.mozilla.org/testing/geckodriver/
Mozilla Public License 2.0
7.03k stars 1.51k forks source link

Tried to run command without establishing a connection fatal error #2064

Closed Mathiaszero closed 1 year ago

Mathiaszero commented 1 year ago

The function I used runs smoothly until I want to use driver.quit(); to close the browser. After loading the specified webpage the browser should close without any issues.

System

Testcase

var webdriver = require('selenium-webdriver') const driver = new webdriver.Builder() .forBrowser('firefox') .build(); driver.get('http://www.apple.com'); driver.quit();

Stacktrace

root@xxx#######:~/Documents/VsCodeProjs/demo# node br.js /root/Documents/VsCodeProjs/demo/node_modules/selenium-webdriver/lib/error.js:524 let err = new ctor(data.message) ^

NoSuchSessionError: Tried to run command without establishing a connection at Object.throwDecodedError (/root/Documents/VsCodeProjs/demo/node_modules/selenium-webdriver/lib/error.js:524:15) at parseHttpResponse (/root/Documents/VsCodeProjs/demo/node_modules/selenium-webdriver/lib/http.js:587:13) at Executor.execute (/root/Documents/VsCodeProjs/demo/node_modules/selenium-webdriver/lib/http.js:515:28) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async thenableWebDriverProxy.execute (/root/Documents/VsCodeProjs/demo/node_modules/selenium-webdriver/lib/webdriver.js:741:17) { remoteStacktrace: '' }

Node.js v18.12.0

Trace-level log

1667797241947 geckodriver INFO Listening on 127.0.0.1:37357 1667797242337 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "--remote-debugging-port" "38117" "--remote-allow-hosts" "localhost" "-no-remote" "-profile" "/tmp/rust_mozprofilehmVIbd" 1667797243595 Marionette INFO Marionette enabled 1667797243603 Marionette INFO Listening on port 37779 Read port: 37779 WebDriver BiDi listening on ws://127.0.0.1:38117 1667797243827 RemoteAgent WARN TLS certificate errors will be ignored for this session console.warn: SearchSettings: "get: No settings file exists, new profile?" (new NotFoundError("Could not open the file at /tmp/rust_mozprofilehmVIbd/search.json.mozlz4", (void 0))) DevTools listening on ws://127.0.0.1:38117/devtools/browser/8f218bfb-389f-4bc0-a4de-5ed25189d8d2 1667797252135 Marionette INFO Stopped listening on port 37779 JavaScript error: https://abs.twimg.com/responsive-web/client-web/vendor.f6925eb9.js, line 82: TypeError: can't access dead object JavaScript error: https://abs.twimg.com/responsive-web/client-web/main.b8098a79.js, line 7: TypeError: can't access dead object console.error: services.settings: main/query-stripping Signature failed TypeError: NetworkError: Network request failed console.error: services.settings: main/quicksuggest Signature failed TypeError: NetworkError: Network request failed

whimboo commented 1 year ago

Could you please attach a trace-level log from geckodriver? Read more about reporting actionable bugs in our contribution guidelines.

whimboo commented 1 year ago

No response from the reporter. Closing issue.