-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to connect to an existing browser instance using noReset=true #20
Comments
Hi @mykola-mokhnach, first of all thank you for your quick answer. As you suggested, I tried patch #21 and with it geckodriver is up and running (: but now I'm getting a different error. I'm wondering if this issue can be related to the fact that maybe my current Firefox session is not running with marionette mode enabled. I didn't find a clear answer about how to enable marionette on Firefox for Android, therefore I just enabled "Remote debugging via USB" setting directly in the app (as you can see below). I tried with Firefox Nightly (org.mozilla.fenix) instead of standard Firefox (org.mozilla.fenix) and also with capability marionettePort=0 (auto discovery port) and for both I got the same error. Log: [debug] [HTTP] Request idempotency key: e97484ec-d410-47e5-a464-2dc1ba3199e9 |
Hi,
I'm unable to connect to an existing browser instance using noReset=true capability. Based on the logs looks like geckodriver cannot be launched because is expecting --marionette-port as part of the params (currently only --connect-existing and -p 5200 are specified)
Capabilites:
final DesiredCapabilities capabilities = DesiredCapabilities.android();
capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "mac");
capabilities.setCapability(MobileCapabilityType.BROWSER_NAME, "firefox");
capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, "Gecko");
capabilities.setCapability("noReset", "true");
final Map<String,Object> firefoxOptions = new HashMap<>();
firefoxOptions.put("androidPackage", "org.mozilla.firefox");
capabilities.setCapability("moz:firefoxOptions", firefoxOptions);
capabilities.setCapability("acceptInsecureCerts", true);
Log:
[debug] [HTTP] Request idempotency key: fe1749fe-1c68-49b0-a89d-8858e773dabb
[HTTP] --> POST /wd/hub/session
[HTTP] {"desiredCapabilities":{"noReset":"true","acceptInsecureCerts":true,"automationName":"Gecko","browserName":"firefox","moz:firefoxOptions":{"androidPackage":"org.mozilla.firefox"},"platformName":"mac","version":"","platform":"ANDROID"},"capabilities":{"firstMatch":[{"acceptInsecureCerts":true,"appium:automationName":"Gecko","browserName":"firefox","moz:firefoxOptions":{"androidPackage":"org.mozilla.firefox"},"appium:noReset":"true","platform":"ANDROID","platformName":"mac","version":""}]}}
[debug] [W3C] Calling AppiumDriver.createSession() with args: [{"noReset":"true","acceptInsecureCerts":true,"automationName":"Gecko","browserName":"firefox","moz:firefoxOptions":{"androidPackage":"org.mozilla.firefox"},"platformName":"mac","version":"","platform":"ANDROID"},null,{"firstMatch":[{"acceptInsecureCerts":true,"appium:automationName":"Gecko","browserName":"firefox","moz:firefoxOptions":{"androidPackage":"org.mozilla.firefox"},"appium:noReset":"true","platform":"ANDROID","platformName":"mac","version":""}]}]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1629905801851 (10:36:41 GMT-0500 (Central Daylight Time))
[BaseDriver] The following capabilities are not standard capabilities and should have an extension prefix:
[BaseDriver] platform
[BaseDriver] version
[Appium] Appium v1.21.0 creating new GeckoDriver (v0.3.2) session
[Appium] Applying relaxed security to 'GeckoDriver' as per server command line argument. All insecure features will be enabled unless explicitly disabled by --deny-insecure
[debug] [BaseDriver] W3C capabilities and MJSONWP desired capabilities were provided
[debug] [BaseDriver] Creating session with W3C capabilities: {
[debug] [BaseDriver] "alwaysMatch": {
[debug] [BaseDriver] "acceptInsecureCerts": true,
[debug] [BaseDriver] "browserName": "firefox",
[debug] [BaseDriver] "moz:firefoxOptions": {
[debug] [BaseDriver] "androidPackage": "org.mozilla.firefox"
[debug] [BaseDriver] },
[debug] [BaseDriver] "appium:platform": "ANDROID",
[debug] [BaseDriver] "platformName": "mac",
[debug] [BaseDriver] "appium:version": "",
[debug] [BaseDriver] "appium:automationName": "Gecko",
[debug] [BaseDriver] "appium:noReset": "true"
[debug] [BaseDriver] },
[debug] [BaseDriver] "firstMatch": [
[debug] [BaseDriver] {}
[debug] [BaseDriver] ]
[debug] [BaseDriver] }
[BaseDriver] Capability 'noReset' changed from string to boolean. This may cause unexpected behavior
[BaseDriver] The following capabilities were provided, but are not recognized by Appium:
[BaseDriver] platform
[BaseDriver] version
[BaseDriver] Session created with session id: b0c6fb8c-7706-4857-8bf0-de7410a1b0b4
[GeckoDriverServer] Starting '/usr/local/bin/geckodriver' with args ["--connect-existing","-p",5200]
[debug] [GeckoDriverServer] [geckodriver] /usr/local/bin/geckodriver: error: The following required arguments were not provided:
[debug] [GeckoDriverServer] --marionette-port
[debug] [GeckoDriverServer]
[debug] [GeckoDriverServer] USAGE:
[debug] [GeckoDriverServer] geckodriver --connect-existing --marionette-host --marionette-port --host --port
[debug] [GeckoDriverServer]
[debug] [GeckoDriverServer] For more information try --help
[GeckoDriverServer] geckodriver has exited with code 64, signal null
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:5200/status] with no body
[WD Proxy] connect ECONNREFUSED 127.0.0.1:5200
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:5200/status] with no body
[WD Proxy] connect ECONNREFUSED 127.0.0.1:5200
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:5200/status] with no body
[WD Proxy] connect ECONNREFUSED 127.0.0.1:5200
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:5200/status] with no body
[WD Proxy] connect ECONNREFUSED 127.0.0.1:5200
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:5200/status] with no body
[WD Proxy] connect ECONNREFUSED 127.0.0.1:5200
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:5200/status] with no body
[WD Proxy] connect ECONNREFUSED 127.0.0.1:5200
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:5200/status] with no body
[WD Proxy] connect ECONNREFUSED 127.0.0.1:5200
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:5200/status] with no body
[WD Proxy] connect ECONNREFUSED 127.0.0.1:5200
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:5200/status] with no body
[WD Proxy] connect ECONNREFUSED 127.0.0.1:5200
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:5200/status] with no body
[WD Proxy] connect ECONNREFUSED 127.0.0.1:5200
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:5200/status] with no body
[WD Proxy] connect ECONNREFUSED 127.0.0.1:5200
[GeckoDriver] Ending Gecko Driver session
[GeckoDriverServer] Gecko Driver session cannot be stopped, because the server is not running
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1629905811928 (10:36:51 GMT-0500 (Central Daylight Time))
[debug] [W3C] Encountered internal error running command: Error: Gecko Driver server is not listening within 10000ms timeout. Make sure it could be started manually from a terminal
[debug] [W3C] at GeckoDriverServer.start (/usr/local/lib/node_modules/appium/node_modules/appium-geckodriver/lib/gecko.js:176:15)
[debug] [W3C] at processTicksAndRejections (node:internal/process/task_queues:94:5)
[debug] [W3C] at GeckoDriver.createSession (/usr/local/lib/node_modules/appium/node_modules/appium-geckodriver/lib/driver.js:59:7)
[debug] [W3C] at AppiumDriver.createSession (/usr/local/lib/node_modules/appium/lib/appium.js:387:35)
The text was updated successfully, but these errors were encountered: