1

I want to reuse a session that I have in selenium using gecko driver and firefox marionette. Passes: Generate the webdriver Use it pickle session id and command executor url and save it in redis when the function is recalled it reuses the session saved But I noticed that when the function is end the gecko driver changes the port of listening and when I try to connect to the previous session it fails.

Here the gecko logs as you can see the port changes automatically from 51632 to 51641:

1646865476715   geckodriver INFO    Listening on 127.0.0.1:51632
1646865481639   mozrunner::runner   INFO    Running command: "C:\\Tor Browser\\Browser\\firefox.exe" "--marionette" "--remote-debugging-port" "51633" "-no-remote" "-profile" "C:\\Users\\user~1\\AppData\\Local\\Temp\\rust_mozprofilelqkMuc"
console.log: "TorSettings: loadFromPrefs()"
console.log: "TorConnect: Init"
console.log: "TorConnect: observed profile-after-change"
console.log: "TorConnect: observing topic 'TorBootstrapStatus'"
console.log: "TorConnect: observing topic 'TorBootstrapError'"
console.log: "TorConnect: observing topic 'TorProcessExited'"
console.log: "TorConnect: observing topic 'TorLogHasWarnOrErr'"
console.log: "TorConnect: observing topic 'torsettings:ready'"
console.log: "TorSettings: observed profile-after-change"
1646865482265   Marionette  INFO    Marionette enabled
console.log: "TorConnect: will load after bootstrap => [about:blank]"
console.error: "Could not load engine blockchair-onion@search.mozilla.org: Error: Extension is invalid"
JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.
JavaScript error: resource://gre/modules/XPCOMUtils.jsm, line 161: TypeError: Cc[aContract] is undefined
DevTools listening on ws://localhost:51633/devtools/browser/cef1d78c-1e54-43d6-8629-ab6bd5d77a41
1646865485196   Marionette  INFO    Listening on port 51641
JavaScript error: chrome://torbutton/content/tor-circuit-display.js, line 478: TypeError: myController is null
JavaScript error: resource://torbutton/modules/tor-control-port.js, line 81: NS_ERROR_CONNECTION_REFUSED: Component returned failure code: 0x804b000d (NS_ERROR_CONNECTION_REFUSED) [nsIScriptableInputStream.available]
JavaScript error: resource://torbutton/modules/tor-control-port.js, line 117: NS_ERROR_CONNECTION_REFUSED: Component returned failure code: 0x804b000d (NS_ERROR_CONNECTION_REFUSED) [nsIOutputStream.write]
1646865485374   RemoteAgent WARN    TLS certificate errors will be ignored for this session

###!!! [Child][MessageChannel] Error: (msgtype=0x390097,name=PContent::Msg_InitBackground) Channel closing: too late to send/recv, messages will be lost

JavaScript error: resource://gre/modules/PromiseWorker.jsm, line 106: Error: Could not get children of file(C:\Users\user\AppData\Local\Temp\rust_mozprofilelqkMuc\thumbnails) because it does not exist
  
badr
  • 94
  • 1
  • 5

0 Answers0