Code Monkey home page Code Monkey logo

appium-geckodriver's Introduction

Appium Geckodriver

NPM version Downloads

Release

This is Appium driver for automating Firefox on different platforms, including Android. The driver only supports Firefox and Gecko-based web views (Android only) automation using W3C WebDriver protocol. Under the hood this driver is a wrapper/proxy over geckodriver binary. Check the driver release notes and the official documentation to get more details on the supported features and possible pitfalls.

Note

Since version 1.0.0 Gecko driver has dropped the support of Appium 1, and is only compatible to Appium 2. Use the appium driver install gecko command to add it to your Appium 2 dist.

Requirements

It is mandatory to have both Firefox browser installed and the geckodriver binary downloaded on the platform where automated tests are going to be executed. Firefox could be downloaded from the official download site and the driver binary could be retrieved from the GitHub releases page. The binary must be put into one of the folders included to PATH environment variable. On macOS it also might be necessary to run xattr -cr "<binary_path>" to avoid notarization issues.

Then you need to decide where the automated test is going to be executed. Gecko driver supports the following target platforms:

  • macOS
  • Windows
  • Linux
  • Android (note that android cannot be passed as a value to platformName capability; it should always equal to the host platform name)

In order to run your automated tests on an Android device it is necessary to have Android SDK installed, so the destination device is marked as online in the adb devices -l command output.

Doctor

Since driver version 1.3.0 you can automate the validation for the most of the above requirements as well as various optional ones needed by driver extensions by running the appium driver doctor gecko server command.

Capabilities

Gecko driver allows defining of multiple criterions for platform selection and also to fine-tune your automation session properties. This could be done via the following session capabilities:

Capability Name Description
platformName Gecko Driver supports the following platforms: mac, linux, windows. The fact your test must be executed on Android is detected based on moz:firefoxOptions entry values. Values of platformName are compared case-insensitively.
browserName Any value passed to this capability will be changed to 'firefox'.
browserVersion Provide the version number of the browser to automate if there are multiple versions installed on the same machine where the driver is running.
appium:automationName Must always be set to Gecko.
appium:noReset Being set to true adds the --connect-existing argument to the server, that allows to connect to an existing browser instance instead of starting a new browser instance on session startup.
appium:marionettePort Selects the port for Geckodriver’s connection to the Marionette remote protocol. The existing Firefox instance must have Marionette enabled. To enable the remote protocol in Firefox, you can pass the -marionette flag. Unless the marionette.port preference has been user-set, Marionette will listen on port 2828, which is the default value for this capability.
appium:systemPort The number of the port for the driver to listen on. Must be unique for each session. If not provided then Appium will try to detect it automatically.
appium:verbosity The verbosity level of driver logging. By default minimum verbosity is applied. Possible values are debug or trace.
appium:androidStorage See https://firefox-source-docs.mozilla.org/testing/geckodriver/Flags.html#code-android-storage-var-android-storage-var-code
moz:firefoxOptions See https://developer.mozilla.org/en-US/docs/Web/WebDriver/Capabilities/firefoxOptions
acceptInsecureCerts See https://www.w3.org/TR/webdriver/#capabilities
pageLoadStrategy See https://www.w3.org/TR/webdriver/#capabilities
proxy See https://www.w3.org/TR/webdriver/#capabilities
setWindowRect See https://www.w3.org/TR/webdriver/#capabilities
timeouts See https://www.w3.org/TR/webdriver/#capabilities
unhandledPromptBehavior See https://www.w3.org/TR/webdriver/#capabilities

Example

# Python3 + PyTest
import pytest
import time

from appium import webdriver
# Options are available in Python client since v2.6.0
from appium.options.gecko import GeckoOptions
from selenium.webdriver.common.by import By


def generate_options():
    common_caps = {
        # It does not really matter what to put there, although setting 'Firefox' might cause a failure
        # depending on the particular client library
        'browserName': 'MozillaFirefox',
        # Should have the name of the host platform, where the geckodriver binary is deployed
        'platformName': 'mac',
    }
    android_options = GeckoOptions().load_capabilities(common_caps)
    android_options.firefox_options = {
        'androidDeviceSerial': '<device/emulator serial>',
        # These capabilities depend on what you are going to automate
        # Refer Mozilla documentation at https://developer.mozilla.org/en-US/docs/Web/WebDriver/Capabilities/firefoxOptions for more details
        'androidPackage': 'org.mozilla.firefox',
    }
    desktop_options = GeckoOptions().load_capabilities(common_caps)
    return [android_options, desktop_options]


@pytest.fixture(params=generate_options())
def driver(request):
    # The default URL is http://127.0.0.1:4723/wd/hub in Appium1
    drv = webdriver.Remote('http://127.0.0.1:4723', options=request.param)
    yield drv
    drv.quit()


class TimeoutError(Exception):
    pass


def wait_until_truthy(func, timeout_sec=5.0, interval_sec=0.5):
    started = time.time()
    original_error = None
    while time.time() - started < timeout_sec:
        original_error = None
        try:
            result = func()
            if result:
                return result
        except Exception as e:
            original_error = e
        time.sleep(interval_sec)
    if original_error is None:
        raise TimeoutError(f'Condition unmet after {timeout_sec}s timeout')
    raise original_error


def test_feature_status_page_search(driver):
    driver.get('https://webkit.org/status/')

    # Enter "CSS" into the search box.
    # Ensures that at least one result appears in search
    # !!! Remember there are no ID and NAME locators in W3C standard
    # These two have been superseded by CSS ones
    search_box = driver.find_element_by_css('#search')
    search_box.send_keys('CSS')
    value = search_box.get_attribute('value')
    assert len(value) > 0
    search_box.submit()
    # Count the visible results when filters are applied
    # so one result shows up in at most one filter
    assert wait_until_truthy(
        lambda: len(driver.execute_script("return document.querySelectorAll('li.feature:not(.is-hidden)')")) > 0)


def test_feature_status_page_filters(driver):
    driver.get('https://webkit.org/status/')

    assert wait_until_truthy(
        lambda: len(driver.execute_script("return document.querySelectorAll('.filter-toggle')")) == 7)

    # Make sure every filter is turned off.
    for checked_filter in filter(lambda f: f.is_selected(), filters):
        checked_filter.click()

    # Make sure you can select every filter.
    for filt in filters:
        filt.click()
        assert filt.is_selected()
        filt.click()

Development

# clone repo, then in repo dir:
npm install
npm run lint
npm run test

appium-geckodriver's People

Contributors

dependabot[bot] avatar jlipps avatar kazucocoa avatar mykola-mokhnach avatar semantic-release-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

appium-geckodriver's Issues

adb error: fchown failed: Operation not permitted

selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: adb error: fchown failed: Operation not permitted

On Samsung S21 (Android 12) the following configuration leads to an error:

{
    'platformName': 'Windows',
    'appium:automationName': 'Gecko',
    'appium:deviceName': 'Samsung S21',
    'browserName': 'firefox',
    'acceptInsecureCerts': True,
    'moz:firefoxOptions': {
        'androidPackage': 'org.mozilla.firefox',
    }
}

The configuration works on Samsung S9 (Android 10).

selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: adb error: fchown failed: Operation not permitted
Stacktrace:
UnknownError: An unknown server-side error occurred while processing the command. Original error: adb error: fchown failed: Operation not permitted
    at errorFromW3CJsonCode (C:\Users\...\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:780:25)
    at ProxyRequestError.getActualError (C:\Users\...\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:663:14)
    at GeckoProxy.command (C:\Users\...\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\jsonwp-proxy\proxy.js:272:19)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at GeckoDriverServer.start (C:\Users\...\AppData\Roaming\npm\node_modules\appium\node_modules\appium-geckodriver\lib\gecko.js:185:5)
    at GeckoDriver.createSession (C:\Users\...\AppData\Roaming\npm\node_modules\appium\node_modules\appium-geckodriver\lib\driver.js:59:7)
    at AppiumDriver.createSession (C:\Users\...\AppData\Roaming\npm\node_modules\appium\lib\appium.js:387:35)

Not able to launch firefox on mobile browser

Hello,

Cap.js

config.capabilities = [
    {
        alwaysMatch: {
            platformName: 'macOS',
            browserName: 'firefox',
            automationName: 'Gecko',
            deviceName: AndroidInfo.deviceName(),
            deviceOrientation:'portriat',
            //'marionette':true,
            'moz:firefoxOptions': {
                androidPackage: 'org.mozilla.firefox',
                //appActivity:"org.mozilla.gecko.BrowserApp",
                androidDeviceSerial: 'EMULATOR30X7X5X0',
                binary: '/Applications/Firefox.app',
                //javascriptEnabled : true
               // "log": {"level": "trace"},
            },
            maxInstances: 1,
            //waitforTimeout: waitforTimeout,
            //commandTimeout: commandTimeout,
            //newCommandTimeout: 30 * 60000,
            acceptInsecureCerts: true

        }
    }
];
exports.config = config;

WDIO.config.js

services: [
        ['firefox-profile'],
        ['geckodriver'],
        ['appium', {
        command: 'appium',
        logFileName: 'appium.log',
        args: {
            relaxedSecurity: true,
            address: host,
            port: port,
            commandTimeout: commandTimeout,
            sessionOverride: true,
            debugLogSpacing: true
        }
    }]],

Error log:

 2021-09-03T07:46:17.701Z ERROR @wdio/utils:shim: TypeError: Cannot read property 'toLowerCase' of undefined
[0-0]     at isFirefox .../node_modules/wdio-geckodriver-service/src/index.js:23:42)
 at GeckoService._mapCapabilities .../node_modules/wdio-geckodriver-service/src/index.js:90:21)
**what I have observed 
exports.default = class GeckoService {
    constructor (options, capabilities, config) {
        this.config = config
        this.capabilities = capabilities

here capabilities reruns null/undefined object** 

where as if I run using chrome as browser..it returns as chrome

can you help in this am I doing anything wrong here or is it issue from GeckoService?

Unable to launch firefox browser in Android device using appium.

Hi,

I'm unable to launch the firefox browser in an Android real device using appium.
Can someone help me in setting the capabilities and please help in fixing them.

Below capabilities were set:
capabilities = DesiredCapabilities.android();
capabilities.setCapability("deviceType", "androiddevice");
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "androiddevice");
capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "Android");
capabilities.setCapability(MobileCapabilityType.BROWSER_NAME, "firefox"); //Chrome
capabilities.setCapability(AndroidMobileCapabilityType.DEVICE_READY_TIMEOUT, 400);
capabilities.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT, 180);
capabilities.setCapability(MobileCapabilityType.NO_RESET, "True");
capabilities.setCapability(MobileCapabilityType.FULL_RESET,"False");
capabilities.setCapability("automationName", "gecko");
capabilities.setCapability("platformName", "Android");
capabilities.setCapability("udid", deviceId);
capabilities.setCapability("deviceUDID",deviceId);
capabilities.setCapability("deviceName", deviceName);
FirefoxOptions firefoxOptions = new FirefoxOptions();
capabilities.setAcceptInsecureCerts(true);
capabilities.setCapability("androidPackage", "org.mozilla.firefox");
// capabilities.setCapability("browser.download.dir",System.setProperty("webdriver.gecko.driver", "C:\Users\user\Documents\peakhealth-auto\Drivers\geckodriver.exe"));
capabilities.setCapability("webdriver.gecko.driver", System.getProperty("user.dir") + File.separator + "Drivers");
firefoxOptions.addCapabilities(capabilities);

Below is the error:

An unknown server-side error occurred while processing the command. Original error: geckodriver.exe binary cannot be found in PATH. Please make sure it is present on your system (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 2.88 seconds
Build info: version: '3.5.2', revision: '10229a9', time: '2017-08-21T17:29:55.15Z'
System info: host: 'XXX', ip: '192.168.1.36', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '15.0.2'
Driver info: driver.version: RemoteWebDriver
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:215)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:167)
at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$new$0(JsonWireProtocolResponse.java:53)
at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$getResponseFunction$2(JsonWireProtocolResponse.java:91)
at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$24(ProtocolHandshake.java:359)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127)
at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:543)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:362)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:136)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:646)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:255)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:237)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:138)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:175)
at com.mobile.base.DriverScript.isRunnableMobileWeb(DriverScript.java:514)
at testscripts.Flow_HealthFirst_USI.flow_TC001(Flow_HealthFirst_USI.java:167)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:133)
at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:598)
at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:173)
at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:824)
at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:146)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.testng.TestRunner.privateRun(TestRunner.java:794)
at org.testng.TestRunner.run(TestRunner.java:596)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:377)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:371)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:332)
at org.testng.SuiteRunner.run(SuiteRunner.java:276)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1212)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1134)
at org.testng.TestNG.runSuites(TestNG.java:1063)
at org.testng.TestNG.run(TestNG.java:1031)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)

@mykola-mokhnach
@dpgraham

Error when running the sample test in an Android emulator

Hello!

I'm trying to follow the README instructions to try to automate a selenium test in Firefox mobile.
I've running a Dockerized Android emulator with the latest APK Firefox properly installed, as you can see in the image below:

image

I've also downloaded and configured the latest geckodriver in the machine running the emulator, as explained in the README instructions. And I've just slightly modified your python sample test to fit my environemnt. See properties platformName and androidDeviceSerial, the rest is exactly the same as in the README sample:

# Python3 + PyTest
import pytest
import time

from appium import webdriver
from selenium.webdriver.common.by import By


def generate_caps():
    common_caps = {
        # It does not really matter what to put there, although setting 'Firefox' might cause a failure
        # depending on the particular client library
        'browserName': 'MozillaFirefox',
        # automationName capability presence is mandatory for this Gecko Driver to be selected
        'automationName': 'Gecko',
        # Should have the name of the host platform, where the geckodriver binary is deployed
        'platformName': 'linux'
    }
    android_caps = {
        **common_caps,
        'moz:firefoxOptions': {
            'androidDeviceSerial': 'emulator-5554',
            # These capabilities depend on what you are going to automate
            # Refer Mozilla documentation at https://developer.mozilla.org/en-US/docs/Web/WebDriver/Capabilities/firefoxOptions for more details
            'androidPackage': 'org.mozilla.firefox'
        },
    }
    desktop_browser_caps = {
        **common_caps,
    }
    return [android_caps, desktop_browser_caps]


@pytest.fixture(params=generate_caps())
def driver(request):
    drv = webdriver.Remote('http://172.19.0.3:4723/wd/hub', request.param)
    yield drv
    drv.quit()


class TimeoutError(Exception):
    pass


def wait_until_truthy(func, timeout_sec=5.0, interval_sec=0.5):
    started = time.time()
    original_error = None
    while time.time() - started < timeout_sec:
        original_error = None
        try:
            result = func()
            if result:
                return result
        except Exception as e:
            original_error = e
        time.sleep(interval_sec)
    if original_error is None:
        raise TimeoutError(f'Condition unmet after {timeout_sec}s timeout')
    raise original_error


def test_feature_status_page_search(driver):
    driver.get('https://webkit.org/status/')

    # Enter "CSS" into the search box.
    # Ensures that at least one result appears in search
    # !!! Remember there are no ID and NAME locators in W3C standard
    # These two have been superseded by CSS ones
    search_box = driver.find_element_by_css('#search')
    search_box.send_keys('CSS')
    value = search_box.get_attribute('value')
    assert len(value) > 0
    search_box.submit()
    # Count the visible results when filters are applied
    # so one result shows up in at most one filter
    assert wait_until_truthy(
        lambda: len(driver.execute_script("return document.querySelectorAll('li.feature:not(.is-hidden)')")) > 0)

I'm getting the error below, so I'm kind of stuck here.

selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not find a driver for automationName 'Gecko' and platformName 'linux'. Please check your desired capabilities

I'd like to clarify that this very same setup with this same Android emulator works just beautifully in Chrome, simply changing the generate_caps() method to:

def generate_caps():
    android_caps = {
        # It does not really matter what to put there, although setting 'Firefox' might cause a failure
        # depending on the particular client library
        'browserName': 'Chrome',
        # Should have the name of the host platform, where the geckodriver binary is deployed
        'platformName': 'Android'
    }
    return [android_caps]

adb error: couldn't create file: Permission denied

Original report - mozilla/geckodriver#2092; please check comments there for additional logs

System

  • geckodriver Version: v0.32.2-win32
  • Platform: Windows 10
  • Firefox: Firefox Nightly 112.0a1 (Build #2015933405),
  • Appium: v2.0.0-beta.56 (Python client)

Testcase

I'm simply traying to launch Firefox on an android device (Pixel 5, Android 11 emulator with Android studio) using the capabilities suggested in this documentation but the session hangs and finally exists with error adb error: couldn't create file: Permission denied. I'm not sure if there is some issue at my side (capabilities are visible in the stacktrace) or if this is a geckodriver issue.

Stacktrace

[HTTP] --> POST /session
[HTTP] {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"appium:automationName":"Gecko","browserName":"Firefox","platformName":"windows","moz:firefoxOptions":{"androidPackage":"org.mozilla.fenix"}}}}
[debug] [AppiumDriver@20f2] Calling AppiumDriver.createSession() with args: [null,null,{"firstMatch":[{}],"alwaysMatch":{"appium:automationName":"Gecko","browserName":"Firefox","platformName":"windows","moz:firefoxOptions":{"androidPackage":"org.mozilla.fenix"}}}]
[debug] [AppiumDriver@20f2] Event 'newSessionRequested' logged at 1677594344443 (16:25:44 GMT+0200 (Eastern European Standard Time))
[Appium] Attempting to find matching driver for automationName 'Gecko' and platformName 'windows'
[Appium] The 'gecko' driver was installed and matched caps.
[Appium] Will require it at C:\Users\USER\.appium\node_modules\appium-geckodriver
[debug] [Appium] Requiring driver at C:\Users\USER\.appium\node_modules\appium-geckodriver
[AppiumDriver@20f2] Appium v2.0.0-beta.56 creating new GeckoDriver (v1.1.8) session
[AppiumDriver@20f2] Checking BaseDriver versions for Appium and GeckoDriver
[AppiumDriver@20f2] Appium's BaseDriver version is 9.3.2
[AppiumDriver@20f2] GeckoDriver's BaseDriver version is 9.3.2
[debug] [GeckoDriver@7133] Creating session with W3C capabilities: {
[debug] [GeckoDriver@7133]   "alwaysMatch": {
[debug] [GeckoDriver@7133]     "browserName": "Firefox",
[debug] [GeckoDriver@7133]     "platformName": "windows",
[debug] [GeckoDriver@7133]     "moz:firefoxOptions": {
[debug] [GeckoDriver@7133]       "androidPackage": "org.mozilla.fenix"
[debug] [GeckoDriver@7133]     },
[debug] [GeckoDriver@7133]     "appium:automationName": "Gecko"
[debug] [GeckoDriver@7133]   },
[debug] [GeckoDriver@7133]   "firstMatch": [
[debug] [GeckoDriver@7133]     {}
[debug] [GeckoDriver@7133]   ]
[debug] [GeckoDriver@7133] }
[GeckoDriver@7133 (736c9dd5)] Session created with session id: 736c9dd5-c0c3-4a40-99e2-a14304080bab
[GeckoDriver@7133 (736c9dd5)] Starting 'C:\Users\USER\AppData\Local\Programs\Python\Python39\geckodriver.exe' with args ["-p",5200]
[debug] [GeckoDriver@7133 (736c9dd5)] Matched '/status' to command name 'getStatus'
[debug] [GeckoDriver@7133 (736c9dd5)] Proxying [GET /status] to [GET http://127.0.0.1:5200/status] with no body
[GeckoDriver@7133 (736c9dd5)] connect ECONNREFUSED 127.0.0.1:5200
[debug] [GeckoDriver@7133 (736c9dd5)] [geckodriver.exe] 1677594345068   geckodriver     INFO    Listening on 127.0.0.1:5200
[debug] [GeckoDriver@7133 (736c9dd5)] Matched '/status' to command name 'getStatus'
[debug] [GeckoDriver@7133 (736c9dd5)] Proxying [GET /status] to [GET http://127.0.0.1:5200/status] with no body
[debug] [GeckoDriver@7133 (736c9dd5)] Got response with status 200: {"value":{"message":"","ready":true}}
[debug] [GeckoDriver@7133 (736c9dd5)] Matched '/session' to command name 'createSession'
[debug] [GeckoDriver@7133 (736c9dd5)] Proxying [POST /session] to [POST http://127.0.0.1:5200/session] with body: {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"browserName":"firefox","platformName":"windows","moz:firefoxOptions":{"androidPackage":"org.mozilla.fenix"}}}}
[debug] [GeckoDriver@7133 (736c9dd5)] [geckodriver.exe] 1677594353781   mozdevice       INFO    Device is rooted
[GeckoDriver@7133 (736c9dd5)] Got response with status 500: {"value":{"error":"unknown error","message":"adb error: couldn't create file: Permission denied","stacktrace":""}}
[debug] [W3C] Matched W3C error code 'unknown error' to UnknownError
[GeckoDriver@7133 (736c9dd5)] Ending Gecko Driver session
[GeckoDriver@7133 (736c9dd5)] geckodriver.exe has exited with code null, signal SIGTERM
[debug] [AppiumDriver@20f2] Event 'newSessionStarted' logged at 1677594393012 (16:26:33 GMT+0200 (Eastern European Standard Time))
[debug] [AppiumDriver@20f2] Encountered internal error running command: UnknownError: An unknown server-side error occurred while processing the command. Original error: adb error: couldn't create file: Permission denied
[debug] [AppiumDriver@20f2]     at errorFromW3CJsonCode (C:\Users\USER\AppData\Roaming\nvm\v18.14.2\node_modules\appium\node_modules\@appium\base-driver\lib\protocol\errors.js:1034:25)
[debug] [AppiumDriver@20f2]     at ProxyRequestError.getActualError (C:\Users\USER\AppData\Roaming\nvm\v18.14.2\node_modules\appium\node_modules\@appium\base-driver\lib\protocol\errors.js:909:14)
[debug] [AppiumDriver@20f2]     at GeckoProxy.command (C:\Users\USER\AppData\Roaming\nvm\v18.14.2\node_modules\appium\node_modules\@appium\base-driver\lib\jsonwp-proxy\proxy.js:340:19)
[debug] [AppiumDriver@20f2]     at processTicksAndRejections (node:internal/process/task_queues:95:5)
[debug] [AppiumDriver@20f2]     at GeckoDriverServer.start (C:\Users\USER\.appium\node_modules\appium-geckodriver\lib\gecko.js:205:5)
[debug] [AppiumDriver@20f2]     at GeckoDriver.createSession (C:\Users\USER\.appium\node_modules\appium-geckodriver\lib\driver.js:58:7)
[debug] [AppiumDriver@20f2]     at AppiumDriver.createSession (C:\Users\USER\AppData\Roaming\nvm\v18.14.2\node_modules\appium\lib\appium.js:349:35)
[HTTP] <-- POST /session 500 48605 ms - 1369

Unable to find a matching set of capabilities issue

The problem

While trying to provide desired capabilities for test case execution in Firefox browser in emulator getting error as " Unable to find a matching set of capabilities"

Environment

  • Appium version--1.20.2
  • Last Appium version that did not exhibit the issue (if applicable):NA
  • Desktop OS/version used to run Appium: Windows 10
  • Node.js version (unless using Appium.app|exe):14.15.1
  • Npm or Yarn package manager: Npm
  • Mobile platform/version under test: 11
  • Real device or emulator/simulator: Emulator
  • Appium CLI or Appium.app|exe: Appium CLI

Details

We have added Gecko driver path in PATH variable
We have followed below link and the mentioned desired capabilities to execute test cases in Firefox browser in emulator.
But still getting 500 Error
https://github.com/appium/appium-geckodriver/blob/master/README.md

Link to Appium logs

C:\Users\XXXX>appium --address 127.0.0.1
[Appium] Welcome to Appium v1.20.2
[Appium] Non-default server args:
[Appium] address: 127.0.0.1
[Appium] Appium REST http interface listener started on 127.0.0.1:4723
[HTTP] --> POST /wd/hub/session
[HTTP] {"desiredCapabilities":{"automationName":"Gecko","browserName":"firefox","moz:firefoxOptions":{"androidDeviceSerial":"emulator-5554","androidPackage":"org.mozilla.firefox"},"platformName":"android"},"capabilities":{"firstMatch":[{"browserName":"firefox","moz:firefoxOptions":{"androidDeviceSerial":"emulator-5554","androidPackage":"org.mozilla.firefox"},"platformName":"android"}]}}
[debug] [W3C] Calling AppiumDriver.createSession() with args: [{"automationName":"Gecko","browserName":"firefox","moz:firefoxOptions":{"androidDeviceSerial":"emulator-5554","androidPackage":"org.mozilla.firefox"},"platformName":"android"},null,{"firstMatch":[{"browserName":"firefox","moz:firefoxOptions":{"androidDeviceSerial":"emulator-5554","androidPackage":"org.mozilla.firefox"},"platformName":"android"}]}]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1618466798086 (11:36:38 GMT+0530 (India Standard Time))
[Appium] The following capabilities were provided in the JSONWP desired capabilities that are missing in W3C capabilities: ["automationName"]
[Appium] Trying to fix W3C capabilities by merging them with JSONWP caps
[BaseDriver] The following capabilities are not standard capabilities and should have an extension prefix:
[BaseDriver] automationName
[Appium] Appium v1.20.2 creating new GeckoDriver (v0.3.2) session
[debug] [BaseDriver] W3C capabilities and MJSONWP desired capabilities were provided
[debug] [BaseDriver] Creating session with W3C capabilities: {
[debug] [BaseDriver] "alwaysMatch": {
[debug] [BaseDriver] "appium:automationName": "Gecko",
[debug] [BaseDriver] "browserName": "firefox",
[debug] [BaseDriver] "moz:firefoxOptions": {
[debug] [BaseDriver] "androidDeviceSerial": "emulator-5554",
[debug] [BaseDriver] "androidPackage": "org.mozilla.firefox"
[debug] [BaseDriver] },
[debug] [BaseDriver] "platformName": "android"
[debug] [BaseDriver] },
[debug] [BaseDriver] "firstMatch": [
[debug] [BaseDriver] {}
[debug] [BaseDriver] ]
[debug] [BaseDriver] }
[BaseDriver] Session created with session id: 4baf0a2f-8591-4168-aa9d-a0b641bc7992
[GeckoDriverServer] Starting 'C:\Users\XXXX\Documents\Geckodriver\geckodriver.exe' with args ["-p",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] [GeckoDriverServer] [geckodriver.exe] 1618466799423 geckodriver INFO Listening on 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
[debug] [WD Proxy] Got response with status 200: {"value":{"message":"","ready":true}}
[debug] [WD Proxy] Matched '/session' to command name 'createSession'
[debug] [WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:5200/session] with body: {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"browserName":"firefox","moz:firefoxOptions":{"androidDeviceSerial":"emulator-5554","androidPackage":"org.mozilla.firefox"},"platformName":"android"}}}
[WD Proxy] Got response with status 500: {"value":{"error":"session not created","message":"Unable to find a matching set of capabilities","stacktrace":""}}
[debug] [W3C] Matched W3C error code 'session not created' to SessionNotCreatedError
[GeckoDriver] Ending Gecko Driver session
[GeckoDriverServer] geckodriver.exe has exited with code null, signal SIGTERM
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1618466800477 (11:36:40 GMT+0530 (India Standard Time))
[debug] [W3C] Encountered internal error running command: SessionNotCreatedError: A new session could not be created. Details: Unable to find a matching set of capabilities
[debug] [W3C] at errorFromW3CJsonCode (C:\Users\XXXX\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:780:25)
[debug] [W3C] at ProxyRequestError.getActualError (C:\Users\XXXX\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:663:14)
[debug] [W3C] at GeckoProxy.command (C:\Users\XXXX\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\jsonwp-proxy\proxy.js:273:19)
[debug] [W3C] at processTicksAndRejections (internal/process/task_queues.js:93:5)
[debug] [W3C] at GeckoDriverServer.start (C:\Users\XXXX\AppData\Roaming\npm\node_modules\appium\node_modules\appium-geckodriver\lib\gecko.js:185:5)
[debug] [W3C] at GeckoDriver.createSession (C:\Users\XXXX\AppData\Roaming\npm\node_modules\appium\node_modules\appium-geckodriver\lib\driver.js:59:7)
[debug] [W3C] at AppiumDriver.createSession (C:\Users\XXXX\AppData\Roaming\npm\node_modules\appium\lib\appium.js:371:35)
[HTTP] <-- POST /wd/hub/session 500 2745 ms - 1278
[HTTP]

Code To Reproduce Issue [ Good To Have ]

public class Try1Firefoxgecko {

WebDriver driver;

DesiredCapabilities capabilities;

@Before
public void setup() throws MalformedURLException
{
	capabilities = new DesiredCapabilities();
	
	capabilities.setCapability("platformName","android");
	capabilities.setCapability("browserName","firefox");
	capabilities.setCapability("automationName","Gecko");
	JSONObject firefoxoptions=new JSONObject();
	firefoxoptions.put("androidDeviceSerial","emulator-5554"); 
	firefoxoptions.put("androidPackage","org.mozilla.firefox");
	capabilities.setCapability("moz:firefoxOptions",firefoxoptions);
	
}	
@Test
public void t1() throws MalformedURLException
{
	driver = new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
			
	String u="https://www.amazon.com/";

	driver.get(u);
}

}

Connection refused (os error 111)

Appium] Welcome to Appium v2.0.0-beta.44
[Appium] Non-default server args:
[Appium] { address: '127.0.0.1' }
[Appium] Attempting to load driver uiautomator2...
[debug] [Appium] Requiring driver at /home/user/.appium/node_modules/appium-uiautomator2-driver
[Appium] Attempting to load driver gecko...
[debug] [Appium] Requiring driver at /home/user/.appium/node_modules/appium-geckodriver
[Appium] Appium REST http interface listener started on 127.0.0.1:4723
[Appium] Available drivers:
[Appium]   - [email protected] (automationName 'UiAutomator2')
[Appium]   - [email protected] (automationName 'Gecko')
[Appium] No plugins have been installed. Use the "appium plugin" command to install the one(s) you want to use.
[HTTP] --> GET /status
[HTTP] {}
[debug] [AppiumDriver@8a51] Calling AppiumDriver.getStatus() with args: []
[debug] [AppiumDriver@8a51] Responding to client with driver.getStatus() result: {"build":{"version":"2.0.0-beta.44"}}
[HTTP] <-- GET /status 200 3 ms - 47
[HTTP] 
[debug] [HTTP] Request idempotency key: 3e2b6d38-0072-4c8b-b050-6f00166c438b
[HTTP] --> POST /session
[HTTP] {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"appium:automationName":"Gecko","browserName":"firefox","moz:firefoxOptions":{"androidDeviceSerial":"9B141FFAZ008J3","androidPackage":"org.mozilla.firefox"},"platformName":"linux"}}}
[debug] [AppiumDriver@8a51] Calling AppiumDriver.createSession() with args: [null,null,{"firstMatch":[{}],"alwaysMatch":{"appium:automationName":"Gecko","browserName":"firefox","moz:firefoxOptions":{"androidDeviceSerial":"9B141FFAZ008J3","androidPackage":"org.mozilla.firefox"},"platformName":"linux"}}]
[debug] [AppiumDriver@8a51] Event 'newSessionRequested' logged at 1663176053613 (10:20:53 GMT-0700 (Pacific Daylight Time))
[Appium] Attempting to find matching driver for automationName 'Gecko' and platformName 'linux'
[Appium] The 'gecko' driver was installed and matched caps.
[Appium] Will require it at /home/user/.appium/node_modules/appium-geckodriver
[debug] [Appium] Requiring driver at /home/user/.appium/node_modules/appium-geckodriver
[AppiumDriver@8a51] Appium v2.0.0-beta.44 creating new GeckoDriver (v1.1.3) session
[AppiumDriver@8a51] Checking BaseDriver versions for Appium and GeckoDriver
[AppiumDriver@8a51] Appium's BaseDriver version is 8.7.1
[AppiumDriver@8a51] GeckoDriver's BaseDriver version is 8.7.1
[debug] [GeckoDriver@ad9c] Creating session with W3C capabilities: {
[debug] [GeckoDriver@ad9c]   "alwaysMatch": {
[debug] [GeckoDriver@ad9c]     "browserName": "firefox",
[debug] [GeckoDriver@ad9c]     "moz:firefoxOptions": {
[debug] [GeckoDriver@ad9c]       "androidDeviceSerial": "9B141FFAZ008J3",
[debug] [GeckoDriver@ad9c]       "androidPackage": "org.mozilla.firefox"
[debug] [GeckoDriver@ad9c]     },
[debug] [GeckoDriver@ad9c]     "platformName": "linux",
[debug] [GeckoDriver@ad9c]     "appium:automationName": "Gecko"
[debug] [GeckoDriver@ad9c]   },
[debug] [GeckoDriver@ad9c]   "firstMatch": [
[debug] [GeckoDriver@ad9c]     {}
[debug] [GeckoDriver@ad9c]   ]
[debug] [GeckoDriver@ad9c] }
[GeckoDriver@ad9c (2e9c202d)] Session created with session id: 2e9c202d-5b17-4ad6-b188-77ea42747b68
[GeckoDriver@ad9c (2e9c202d)] Starting '/usr/local/bin/geckodriver' with args ["-p",5200]
[debug] [GeckoDriver@ad9c (2e9c202d)] [geckodriver] 1663176053626	geckodriver	INFO	Listening on 127.0.0.1:5200
[debug] [GeckoDriver@ad9c (2e9c202d)] Matched '/status' to command name 'getStatus'
[debug] [GeckoDriver@ad9c (2e9c202d)] Proxying [GET /status] to [GET http://127.0.0.1:5200/status] with no body
[debug] [GeckoDriver@ad9c (2e9c202d)] Got response with status 200: {"value":{"message":"","ready":true}}
[debug] [GeckoDriver@ad9c (2e9c202d)] Matched '/session' to command name 'createSession'
[debug] [GeckoDriver@ad9c (2e9c202d)] Proxying [POST /session] to [POST http://127.0.0.1:5200/session] with body: {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"browserName":"firefox","moz:firefoxOptions":{"androidDeviceSerial":"9B141FFAZ008J3","androidPackage":"org.mozilla.firefox"},"platformName":"linux"}}}
[GeckoDriver@ad9c (2e9c202d)] Got response with status 500: {"value":{"error":"unknown error","message":"Connection refused (os error 111)","stacktrace":""}}
[debug] [W3C] Matched W3C error code 'unknown error' to UnknownError
[GeckoDriver@ad9c (2e9c202d)] Ending Gecko Driver session
[GeckoDriver@ad9c (2e9c202d)] geckodriver has exited with code null, signal SIGTERM
[debug] [AppiumDriver@8a51] Event 'newSessionStarted' logged at 1663176053637 (10:20:53 GMT-0700 (Pacific Daylight Time))
[debug] [AppiumDriver@8a51] Encountered internal error running command: UnknownError: An unknown server-side error occurred while processing the command. Original error: Connection refused (os error 111)
[debug] [AppiumDriver@8a51]     at errorFromW3CJsonCode (/usr/lib/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/errors.js:923:25)
[debug] [AppiumDriver@8a51]     at ProxyRequestError.getActualError (/usr/lib/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/errors.js:798:14)
[debug] [AppiumDriver@8a51]     at GeckoProxy.command (/usr/lib/node_modules/appium/node_modules/@appium/base-driver/lib/jsonwp-proxy/proxy.js:340:19)
[debug] [AppiumDriver@8a51]     at processTicksAndRejections (node:internal/process/task_queues:96:5)
[debug] [AppiumDriver@8a51]     at GeckoDriverServer.start (/home/user/.appium/node_modules/appium-geckodriver/lib/gecko.js:205:5)
[debug] [AppiumDriver@8a51]     at GeckoDriver.createSession (/home/user/.appium/node_modules/appium-geckodriver/lib/driver.js:58:7)
[debug] [AppiumDriver@8a51]     at AppiumDriver.createSession (/usr/lib/node_modules/appium/lib/appium.js:337:35)

It doesn't seem to matter if I have firefox running already on the device or not.
It also doesn't seem to make a difference if .setNoReset(true)
or .setFullReset(true)

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can fix this 💪.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here are some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


No npm token specified.

An npm token must be created and set in the NPM_TOKEN environment variable on your CI environment.

Please make sure to create an npm token and to set it in the NPM_TOKEN environment variable on your CI environment. The token must allow to publish to the registry https://registry.npmjs.org/.


Good luck with your project ✨

Your semantic-release bot 📦🚀

Issue in Appium Testcases execution in firefox browser

The problem

Issue in Appium Testcases execution in firefox browser

Environment

  • Appium version (or git revision) that exhibits the issue: 1.20.2
  • Last Appium version that did not exhibit the issue (if applicable):NA
  • Desktop OS/version used to run Appium: Windows 10
  • Node.js version (unless using Appium.app|exe): 6.14.8
  • Npm or Yarn package manager: npm
  • Mobile platform/version under test: R(API 30)
  • Real device or emulator/simulator: Emulator
  • Appium CLI or Appium.app|exe: Appium CLI

Details

Unable to execute appium testcases in Firefox browser, though installation of firefox browser is done in emulator and desired capabilities are mentioned.

Link to Appium logs

[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
[debug] [WD Proxy] Got response with status 200: {"value":{"message":"","ready":true}}
[debug] [WD Proxy] Matched '/session' to command name 'createSession'
[debug] [WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:5200/session] with body: {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"browserName":"firefox","platformName":"moz:firefoxoptions"}}}
[WD Proxy] Got response with status 500: {"value":{"error":"session not created","message":"Unable to find a matching set of capabilities","stacktrace":""}}
[debug] [W3C] Matched W3C error code 'session not created' to SessionNotCreatedError
[GeckoDriver] Ending Gecko Driver session
[GeckoDriverServer] geckodriver.exe has exited with code null, signal SIGTERM
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1617605896466 (12:28:16 GMT+0530 (India Standard Time))
[debug] [MJSONWP] Encountered internal error running command: SessionNotCreatedError: A new session could not be created. Details: Unable to find a matching set of capabilities
[debug] [MJSONWP] at errorFromW3CJsonCode (C:\Users\XXX\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:780:25)
[debug] [MJSONWP] at ProxyRequestError.getActualError (C:\Users\XXX\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:663:14)
[debug] [MJSONWP] at GeckoProxy.command (C:\Users\XXX\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\jsonwp-proxy\proxy.js:273:19)
[debug] [MJSONWP] at processTicksAndRejections (internal/process/task_queues.js:93:5)
[debug] [MJSONWP] at GeckoDriverServer.start (C:\Users\XXX\AppData\Roaming\npm\node_modules\appium\node_modules\appium-geckodriver\lib\gecko.js:185:5)
[debug] [MJSONWP] at GeckoDriver.createSession (C:\Users\XXX\AppData\Roaming\npm\node_modules\appium\node_modules\appium-geckodriver\lib\driver.js:59:7)
[debug] [MJSONWP] at AppiumDriver.createSession (C:\Users\XXX\AppData\Roaming\npm\node_modules\appium\lib\appium.js:371:35)
[HTTP] <-- POST /wd/hub/session 500 1224 ms - 143
[HTTP]

Code To Reproduce Issue [ Good To Have ]

Firefox is installed in Emulator but executing Appium testcases in Firefox browser is creating the above issue.

Please remember that with sample code it's easier to reproduce the bug and it's much faster to fix it.

public class TestCase1Firefox {
static WebDriver driver;
DesiredCapabilities capabilities;
@before
public void setUp() throws MalformedURLException{
capabilities= new DesiredCapabilities();
capabilities.setCapability(CapabilityType.BROWSER_NAME, "firefox");
capabilities.setCapability("platformName","Android");
capabilities.setCapability("automationName","Gecko");
JSONObject proxyobj=new JSONObject();
proxyobj.put("androidPackage","org.mozilla.firefox");
proxyobj.put("androidDeviceSerial", "emulator-5554");
capabilities.setCapability("moz:firefoxOptions",proxyobj);
capabilities.setCapability("deviceName","sdk_gphone_x86");
capabilities.setCapability(CapabilityType.VERSION, "11");
}
@test
public void testCal() throws Exception {
driver = new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
driver.get("https://www.amazon.com");
System.out.println("INSIDE TEST METHOD");

} 
@After
public void teardown(){
    //close the app
    driver.quit();
}

}

Thanks in Advance!

Unable to connect to an existing browser instance using noReset=true

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.