Skip to content
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

Call to 'swipe' failed move target out of bounds (Session info: chrome=113.0.5672.77) #867

Open
suneel944 opened this issue May 16, 2023 · 9 comments

Comments

@suneel944
Copy link

suneel944 commented May 16, 2023

The problem

Note: Swiping is major action for a mobile app testing. And this needs to be fixed with high priority

Unable to swipe in Appium python android.
Getting error: Call to 'swipe' failed
move target out of bounds (Session info: chrome=113.0.5672.77)

used desired caps = {
"platformName": "android",
"appium:udid": "96324991560008D",
"browserName": "Chrome",
"appium:automationName": "UiAutomator2"
}

The swipe action is not working even in the inspector as well as mobile automation

automation error:

./tests/unit/test_mobile_driver_factory.py::test_mobile_driver_factory[mobile_driver0] Failed: [undefined]selenium.common.exceptions.MoveTargetOutOfBoundsException: Message: move target out of bounds
  (Session info: chrome=113.0.5672.77)
Stacktrace:
#0 0x55f29cfec133 <unknown>
#1 0x55f29cd207f0 <unknown>
#2 0x55f29cd9e30b <unknown>
#3 0x55f29cd7cbd2 <unknown>
#4 0x55f29cd951c7 <unknown>
#5 0x55f29cd7c9a3 <unknown>
#6 0x55f29cd5146a <unknown>
#7 0x55f29cd5255e <unknown>
#8 0x55f29cfabcae <unknown>
#9 0x55f29cfaf8fe <unknown>
#10 0x55f29cfb8f20 <unknown>
#11 0x55f29cfb0923 <unknown>
#12 0x55f29cf83c0e <unknown>
#13 0x55f29cfd3b08 <unknown>
#14 0x55f29cfd3c97 <unknown>
#15 0x55f29cfe4113 <unknown>
#16 0x7faac8a94b43 <unknown>
mobile_driver = <appium.webdriver.webdriver.WebDriver (session="7c7adbdb-4693-4b6e-900b-a560caf09ca4")>

    @mark.unit_test
    @mark.parametrize(
        "mobile_driver",
        [
            {
                "arg_mobile_os": MobileOs.ANDROID,
                "arg_mobile_app_type": MobileAppType.WEB,
                "arg_mobile_device_environment_type": MobileDeviceEnvironmentType.PHYSICAL,
                "arg_automation_name": AppiumAutomationName.UIAUTOMATOR2,
                "arg_mobile_web_browser": MobileWebBrowserMake.CHROME,
            }
        ],
        indirect=True,
    )
    def test_mobile_driver_factory(mobile_driver):
        from selenium.webdriver.common.actions.pointer_input import PointerInput
        from selenium.webdriver.common.action_chains import ActionChains
        from selenium.webdriver.common.actions.action_builder import ActionBuilder
        from selenium.webdriver.common.actions.interaction import POINTER_TOUCH
        from appium.webdriver.common.appiumby import AppiumBy
        import time
    
        mobile_driver.get("https://www.amazon.in/")
        element = mobile_driver.find_element(AppiumBy.XPATH, "//*[@id='nav-ftr-auth']")
        actions = ActionChains(mobile_driver)
        window_size = mobile_driver.get_window_size()
        start_x = end_x = 0+window_size["width"]/2
        start_y = 200
    
        actions.w3c_actions = ActionBuilder(mobile_driver, PointerInput(POINTER_TOUCH, "finger"), duration=500)
        actions.w3c_actions.pointer_action.move_to_location(start_x, start_y)
        actions.w3c_actions.pointer_action.pointer_down()
        actions.w3c_actions.pointer_action.move_to_location(end_x, start_y+600)
        actions.w3c_actions.pointer_action.release()
>       actions.perform()

tests/unit/test_mobile_driver_factory.py:47: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../../.local/share/virtualenvs/Test_Auto_Pytest-9CDw6jIY/lib/python3.11/site-packages/selenium/webdriver/common/action_chains.py:73: in perform
    self.w3c_actions.perform()
../../../../.local/share/virtualenvs/Test_Auto_Pytest-9CDw6jIY/lib/python3.11/site-packages/selenium/webdriver/common/actions/action_builder.py:91: in perform
    self.driver.execute(Command.W3C_ACTIONS, enc)
../../../../.local/share/virtualenvs/Test_Auto_Pytest-9CDw6jIY/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py:440: in execute
    self.error_handler.check_response(response)
../../../../.local/share/virtualenvs/Test_Auto_Pytest-9CDw6jIY/lib/python3.11/site-packages/appium/webdriver/errorhandler.py:30: in check_response
    raise wde
../../../../.local/share/virtualenvs/Test_Auto_Pytest-9CDw6jIY/lib/python3.11/site-packages/appium/webdriver/errorhandler.py:26: in check_response
    super().check_response(response)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <appium.webdriver.errorhandler.MobileErrorHandler object at 0x7fc6e0099150>
response = {'status': 500, 'value': '{"value":{"error":"move target out of bounds","message":"move target out of bounds\\n  (Sess...9cfd3b08 <unknown>\\n#14 0x55f29cfd3c97 <unknown>\\n#15 0x55f29cfe4113 <unknown>\\n#16 0x7faac8a94b43 <unknown>\\n"}}'}

    def check_response(self, response: Dict[str, Any]) -> None:
        """Checks that a JSON response from the WebDriver does not have an
        error.
    
        :Args:
         - response - The JSON response from the WebDriver server as a dictionary
           object.
    
        :Raises: If the response contains an error message.
        """
        status = response.get("status", None)
        if not status or status == ErrorCode.SUCCESS:
            return
        value = None
        message = response.get("message", "")
        screen: str = response.get("screen", "")
        stacktrace = None
        if isinstance(status, int):
            value_json = response.get("value", None)
            if value_json and isinstance(value_json, str):
                import json
    
                try:
                    value = json.loads(value_json)
                    if len(value) == 1:
                        value = value["value"]
                    status = value.get("error", None)
                    if not status:
                        status = value.get("status", ErrorCode.UNKNOWN_ERROR)
                        message = value.get("value") or value.get("message")
                        if not isinstance(message, str):
                            value = message
                            message = message.get("message")
                    else:
                        message = value.get("message", None)
                except ValueError:
                    pass
    
        exception_class: Type[WebDriverException]
        if status in ErrorCode.NO_SUCH_ELEMENT:
            exception_class = NoSuchElementException
        elif status in ErrorCode.NO_SUCH_FRAME:
            exception_class = NoSuchFrameException
        elif status in ErrorCode.NO_SUCH_SHADOW_ROOT:
            exception_class = NoSuchShadowRootException
        elif status in ErrorCode.NO_SUCH_WINDOW:
            exception_class = NoSuchWindowException
        elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
            exception_class = StaleElementReferenceException
        elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
            exception_class = ElementNotVisibleException
        elif status in ErrorCode.INVALID_ELEMENT_STATE:
            exception_class = InvalidElementStateException
        elif (
            status in ErrorCode.INVALID_SELECTOR
            or status in ErrorCode.INVALID_XPATH_SELECTOR
            or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER
        ):
            exception_class = InvalidSelectorException
        elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
            exception_class = ElementNotSelectableException
        elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE:
            exception_class = ElementNotInteractableException
        elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
            exception_class = InvalidCookieDomainException
        elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
            exception_class = UnableToSetCookieException
        elif status in ErrorCode.TIMEOUT:
            exception_class = TimeoutException
        elif status in ErrorCode.SCRIPT_TIMEOUT:
            exception_class = TimeoutException
        elif status in ErrorCode.UNKNOWN_ERROR:
            exception_class = WebDriverException
        elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
            exception_class = UnexpectedAlertPresentException
        elif status in ErrorCode.NO_ALERT_OPEN:
            exception_class = NoAlertPresentException
        elif status in ErrorCode.IME_NOT_AVAILABLE:
            exception_class = ImeNotAvailableException
        elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
            exception_class = ImeActivationFailedException
        elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
            exception_class = MoveTargetOutOfBoundsException
        elif status in ErrorCode.JAVASCRIPT_ERROR:
            exception_class = JavascriptException
        elif status in ErrorCode.SESSION_NOT_CREATED:
            exception_class = SessionNotCreatedException
        elif status in ErrorCode.INVALID_ARGUMENT:
            exception_class = InvalidArgumentException
        elif status in ErrorCode.NO_SUCH_COOKIE:
            exception_class = NoSuchCookieException
        elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN:
            exception_class = ScreenshotException
        elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED:
            exception_class = ElementClickInterceptedException
        elif status in ErrorCode.INSECURE_CERTIFICATE:
            exception_class = InsecureCertificateException
        elif status in ErrorCode.INVALID_COORDINATES:
            exception_class = InvalidCoordinatesException
        elif status in ErrorCode.INVALID_SESSION_ID:
            exception_class = InvalidSessionIdException
        elif status in ErrorCode.UNKNOWN_METHOD:
            exception_class = UnknownMethodException
        else:
            exception_class = WebDriverException
        if not value:
            value = response["value"]
        if isinstance(value, str):
            raise exception_class(value)
        if message == "" and "message" in value:
            message = value["message"]
    
        screen = None  # type: ignore[assignment]
        if "screen" in value:
            screen = value["screen"]
    
        stacktrace = None
        st_value = value.get("stackTrace") or value.get("stacktrace")
        if st_value:
            if isinstance(st_value, str):
                stacktrace = st_value.split("\n")
            else:
                stacktrace = []
                try:
                    for frame in st_value:
                        line = frame.get("lineNumber", "")
                        file = frame.get("fileName", "<anonymous>")
                        if line:
                            file = f"{file}:{line}"
                        meth = frame.get("methodName", "<anonymous>")
                        if "className" in frame:
                            meth = f"{frame['className']}.{meth}"
                        msg = "    at %s (%s)"
                        msg = msg % (meth, file)
                        stacktrace.append(msg)
                except TypeError:
                    pass
        if exception_class == UnexpectedAlertPresentException:
            alert_text = None
            if "data" in value:
                alert_text = value["data"].get("text")
            elif "alert" in value:
                alert_text = value["alert"].get("text")
            raise exception_class(message, screen, stacktrace, alert_text)  # type: ignore[call-arg]  # mypy is not smart enough here
>       raise exception_class(message, screen, stacktrace)
E       selenium.common.exceptions.MoveTargetOutOfBoundsException: Message: move target out of bounds
E         (Session info: chrome=113.0.5672.77)
E       Stacktrace:
E       #0 0x55f29cfec133 <unknown>
E       #1 0x55f29cd207f0 <unknown>
E       #2 0x55f29cd9e30b <unknown>
E       #3 0x55f29cd7cbd2 <unknown>
E       #4 0x55f29cd951c7 <unknown>
E       #5 0x55f29cd7c9a3 <unknown>
E       #6 0x55f29cd5146a <unknown>
E       #7 0x55f29cd5255e <unknown>
E       #8 0x55f29cfabcae <unknown>
E       #9 0x55f29cfaf8fe <unknown>
E       #10 0x55f29cfb8f20 <unknown>
E       #11 0x55f29cfb0923 <unknown>
E       #12 0x55f29cf83c0e <unknown>
E       #13 0x55f29cfd3b08 <unknown>
E       #14 0x55f29cfd3c97 <unknown>
E       #15 0x55f29cfe4113 <unknown>
E       #16 0x7faac8a94b43 <unknown>

../../../../.local/share/virtualenvs/Test_Auto_Pytest-9CDw6jIY/lib/python3.11/site-packages/selenium/webdriver/remote/errorhandler.py:245: MoveTargetOutOfBoundsException

Below is the proof:
inspector:
mobile_swiping_not_working.webm
automation:
https://github.com/appium/python-client/assets/45133346/6772091c-1f01-42e4-939c-ccfdedadc89d

Dependencies:
python-client: latest
selenium: latest
pytest: latest

Environment

  • Appium version (or git revision) that exhibits the issue:
  • Last Appium version that did not exhibit the issue (if applicable):
  • Desktop OS/version used to run Appium:
  • Node.js version (unless using Appium.app|exe):
  • Mobile platform/version under test:
  • Real device or emulator/simulator:
  • Appium CLI or Appium.app|exe:

Details

If necessary, describe the problem you have been experiencing in more detail.

Link to Appium Logs

Create a GIST which is a paste of your full Appium logs, and link them here.

Code To reproduce issue

automation code:

@mark.unit_test
@mark.parametrize(
    "mobile_driver",
    [
        {
            "arg_mobile_os": MobileOs.ANDROID,
            "arg_mobile_app_type": MobileAppType.WEB,
            "arg_mobile_device_environment_type": MobileDeviceEnvironmentType.PHYSICAL,
            "arg_automation_name": AppiumAutomationName.UIAUTOMATOR2,
            "arg_mobile_web_browser": MobileWebBrowserMake.CHROME,
        }
    ],
    indirect=True,
)
def test_mobile_driver_factory(mobile_driver):
    from selenium.webdriver.common.actions.pointer_input import PointerInput
    from selenium.webdriver.common.action_chains import ActionChains
    from selenium.webdriver.common.actions.action_builder import ActionBuilder
    from selenium.webdriver.common.actions.interaction import POINTER_TOUCH
    from appium.webdriver.common.appiumby import AppiumBy
    import time
    
    mobile_driver.get("https://www.amazon.in/")
    element = mobile_driver.find_element(AppiumBy.XPATH, "//*[@id='nav-ftr-auth']")
    actions = ActionChains(mobile_driver)
    window_size = mobile_driver.get_window_size()
    start_x = end_x = 0+window_size["width"]/2
    start_y = 200
    
    actions.w3c_actions = ActionBuilder(mobile_driver, PointerInput(POINTER_TOUCH, "finger"), duration=500)
    actions.w3c_actions.pointer_action.move_to_location(start_x, start_y)
    actions.w3c_actions.pointer_action.pointer_down()
    actions.w3c_actions.pointer_action.move_to_location(end_x, start_y+600)
    actions.w3c_actions.pointer_action.release()
    actions.perform()
    title = mobile_driver.title
    assert isinstance(title, str) and title.lower().__contains__("amazon.in")
@KazuCocoa
Copy link
Member

Do you have the full appium log?

The error message seems coming from chromedriver, then potentially only Google can improve it.

>       raise exception_class(message, screen, stacktrace)
E       selenium.common.exceptions.MoveTargetOutOfBoundsException: Message: move target out of bounds
E         (Session info: chrome=113.0.5672.77)

@suneel944
Copy link
Author

suneel944 commented May 16, 2023

Here are the logs:

appium -a 127.0.0.1 -p 4723 --allow-cors
[Appium] Welcome to Appium v1.22.3
[Appium] Non-default server args:
[Appium]   allowCors: true
[Appium]   address: 127.0.0.1
[Appium] You have enabled CORS requests from any host. Be careful not to visit sites which could maliciously try to start Appium sessions on your machine
[Appium] Appium REST http interface listener started on 127.0.0.1:4723
[HTTP] --> POST /wd/hub/session
[HTTP] {"capabilities":{"alwaysMatch":{"platformName":"android","appium:udid":"96324991560008D","browserName":"Chrome","appium:automationName":"UiAutomator2","appium:ensureWebviewsHavePages":true,"appium:nativeWebScreenshot":true,"appium:newCommandTimeout":3600,"appium:connectHardwareKeyboard":true},"firstMatch":[{}]},"desiredCapabilities":{"platformName":"android","appium:udid":"96324991560008D","browserName":"Chrome","appium:automationName":"UiAutomator2","appium:ensureWebviewsHavePages":true,"appium:nativeWebScreenshot":true,"appium:newCommandTimeout":3600,"appium:connectHardwareKeyboard":true}}
[debug] [W3C] Calling AppiumDriver.createSession() with args: [{"platformName":"android","appium:udid":"96324991560008D","browserName":"Chrome","appium:automationName":"UiAutomator2","appium:ensureWebviewsHavePages":true,"appium:nativeWebScreenshot":true,"appium:newCommandTimeout":3600,"appium:connectHardwareKeyboard":true},null,{"alwaysMatch":{"platformName":"android","appium:udid":"96324991560008D","browserName":"Chrome","appium:automationName":"UiAutomator2","appium:ensureWebviewsHavePages":true,"appium:nativeWebScreenshot":true,"appium:newCommandTimeout":3600,"appium:connectHardwareKeyboard":true},"firstMatch":[{}]}]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1684231385414 (15:33:05 GMT+0530 (India Standard Time))
[Appium] Appium v1.22.3 creating new AndroidUiautomator2Driver (v1.70.1) session
[debug] [BaseDriver] W3C capabilities and MJSONWP desired capabilities were provided
[debug] [BaseDriver] Creating session with W3C capabilities: {
[debug] [BaseDriver]   "alwaysMatch": {
[debug] [BaseDriver]     "platformName": "android",
[debug] [BaseDriver]     "browserName": "Chrome",
[debug] [BaseDriver]     "appium:udid": "96324991560008D",
[debug] [BaseDriver]     "appium:automationName": "UiAutomator2",
[debug] [BaseDriver]     "appium:ensureWebviewsHavePages": true,
[debug] [BaseDriver]     "appium:nativeWebScreenshot": true,
[debug] [BaseDriver]     "appium:newCommandTimeout": 3600,
[debug] [BaseDriver]     "appium:connectHardwareKeyboard": true
[debug] [BaseDriver]   },
[debug] [BaseDriver]   "firstMatch": [
[debug] [BaseDriver]     {}
[debug] [BaseDriver]   ]
[debug] [BaseDriver] }
[BaseDriver] The following capabilities were provided, but are not recognized by Appium:
[BaseDriver]   connectHardwareKeyboard
[BaseDriver] Session created with session id: 30a4fac1-1cb2-4a57-abd7-6a66f5396320
[UiAutomator2] We're going to run a Chrome-based session
[UiAutomator2] Chrome-type package and activity are com.android.chrome and com.google.android.apps.chrome.Main
[UiAutomator2] Starting 'com.android.chrome' directly on the device
[ADB] Found 3 'build-tools' folders under '/home/suneel/Android/Sdk' (newest first):
[ADB]     /home/suneel/Android/Sdk/build-tools/34.0.0-rc2
[ADB]     /home/suneel/Android/Sdk/build-tools/33.0.2
[ADB]     /home/suneel/Android/Sdk/build-tools/30.0.3
[ADB] Using 'adb' from '/home/suneel/Android/Sdk/platform-tools/adb'
[debug] [ADB] Running '/home/suneel/Android/Sdk/platform-tools/adb -P 5037 start-server'
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices
[debug] [ADB] Connected devices: [{"udid":"96324991560008D","state":"device"}]
[AndroidDriver] Using device: 96324991560008D
[ADB] Using 'adb' from '/home/suneel/Android/Sdk/platform-tools/adb'
[debug] [ADB] Running '/home/suneel/Android/Sdk/platform-tools/adb -P 5037 start-server'
[debug] [ADB] Setting device id to 96324991560008D
[debug] [ADB] Running '/home/suneel/Android/Sdk/platform-tools/adb -P 5037 -s 96324991560008D shell getprop ro.build.version.sdk'
[debug] [ADB] Current device property 'ro.build.version.sdk': 33
[ADB] Getting device platform version
[debug] [ADB] Running '/home/suneel/Android/Sdk/platform-tools/adb -P 5037 -s 96324991560008D shell getprop ro.build.version.release'
[debug] [ADB] Current device property 'ro.build.version.release': 13
[debug] [ADB] Device API level: 33
[UiAutomator2] Relaxing hidden api policy
[debug] [ADB] Running '/home/suneel/Android/Sdk/platform-tools/adb -P 5037 -s 96324991560008D shell 'settings put global hidden_api_policy_pre_p_apps 1;settings put global hidden_api_policy_p_apps 1;settings put global hidden_api_policy 1''
[AndroidDriver] No app sent in, not parsing package/activity
[debug] [ADB] Running '/home/suneel/Android/Sdk/platform-tools/adb -P 5037 -s 96324991560008D wait-for-device'
[debug] [ADB] Running '/home/suneel/Android/Sdk/platform-tools/adb -P 5037 -s 96324991560008D shell echo ping'
[debug] [AndroidDriver] Pushing settings apk to device...
[debug] [ADB] Getting install status for io.appium.settings
[debug] [ADB] Running '/home/suneel/Android/Sdk/platform-tools/adb -P 5037 -s 96324991560008D shell dumpsys package io.appium.settings'
[debug] [ADB] 'io.appium.settings' is installed
[debug] [ADB] Getting package info for 'io.appium.settings'
[debug] [ADB] Running '/home/suneel/Android/Sdk/platform-tools/adb -P 5037 -s 96324991560008D shell dumpsys package io.appium.settings'
[debug] [ADB] The version name of the installed 'io.appium.settings' is greater or equal to the application version name ('3.4.0' >= '3.4.0')
[debug] [ADB] There is no need to install/upgrade '/home/linuxbrew/.linuxbrew/lib/node_modules/appium/node_modules/io.appium.settings/apks/settings_apk-debug.apk'
[debug] [ADB] Getting IDs of all 'io.appium.settings' processes
[debug] [ADB] Running '/home/suneel/Android/Sdk/platform-tools/adb -P 5037 -s 96324991560008D shell 'pgrep --help; echo $?''
[debug] [ADB] Running '/home/suneel/Android/Sdk/platform-tools/adb -P 5037 -s 96324991560008D shell pgrep -f \(\[\[:blank:\]\]\|\^\)io\.appium\.settings\(\[\[:blank:\]\]\|\$\)'
[debug] [AndroidDriver] io.appium.settings is already running. There is no need to reset its permissions.
[debug] [ADB] Running '/home/suneel/Android/Sdk/platform-tools/adb -P 5037 -s 96324991560008D shell appops set io.appium.settings android:mock_location allow'
[debug] [Logcat] Starting logs capture with command: /home/suneel/Android/Sdk/platform-tools/adb -P 5037 -s 96324991560008D logcat -v threadtime
[debug] [UiAutomator2] Forwarding UiAutomator2 Server port 6790 to local port 8200
[debug] [ADB] Forwarding system: 8200 to device: 6790
[debug] [ADB] Running '/home/suneel/Android/Sdk/platform-tools/adb -P 5037 -s 96324991560008D forward tcp:8200 tcp:6790'
[debug] [ADB] Getting install status for io.appium.uiautomator2.server
[debug] [ADB] Running '/home/suneel/Android/Sdk/platform-tools/adb -P 5037 -s 96324991560008D shell dumpsys package io.appium.uiautomator2.server'
[debug] [ADB] 'io.appium.uiautomator2.server' is installed
[debug] [ADB] Getting package info for 'io.appium.uiautomator2.server'
[debug] [ADB] Running '/home/suneel/Android/Sdk/platform-tools/adb -P 5037 -s 96324991560008D shell dumpsys package io.appium.uiautomator2.server'
[debug] [ADB] The version name of the installed 'io.appium.uiautomator2.server' is greater or equal to the application version name ('4.27.0' >= '4.27.0')
[debug] [UiAutomator2] io.appium.uiautomator2.server installation state: sameVersionInstalled
[debug] [ADB] Checking app cert for /home/linuxbrew/.linuxbrew/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v4.27.0.apk
[ADB] Using 'apksigner.jar' from '/home/suneel/Android/Sdk/build-tools/34.0.0-rc2/lib/apksigner.jar'
[debug] [ADB] Starting apksigner: /home/suneel/.sdkman/candidates/java/current/bin/java -Xmx1024M -Xss1m -jar /home/suneel/Android/Sdk/build-tools/34.0.0-rc2/lib/apksigner.jar verify --print-certs /home/linuxbrew/.linuxbrew/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v4.27.0.apk
[debug] [ADB] apksigner stdout: Signer #1 certificate DN: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[debug] [ADB] Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[debug] [ADB] Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[debug] [ADB] Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[debug] [ADB] 
[debug] [ADB] sha256 hash did match for 'appium-uiautomator2-server-v4.27.0.apk'
[ADB] '/home/linuxbrew/.linuxbrew/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v4.27.0.apk' is signed with the default certificate
[debug] [ADB] Getting install status for io.appium.uiautomator2.server.test
[debug] [ADB] Running '/home/suneel/Android/Sdk/platform-tools/adb -P 5037 -s 96324991560008D shell dumpsys package io.appium.uiautomator2.server.test'
[debug] [ADB] 'io.appium.uiautomator2.server.test' is installed
[debug] [ADB] Checking app cert for /home/linuxbrew/.linuxbrew/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk
[debug] [ADB] Starting apksigner: /home/suneel/.sdkman/candidates/java/current/bin/java -Xmx1024M -Xss1m -jar /home/suneel/Android/Sdk/build-tools/34.0.0-rc2/lib/apksigner.jar verify --print-certs /home/linuxbrew/.linuxbrew/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk
[debug] [ADB] apksigner stdout: Signer #1 certificate DN: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[debug] [ADB] Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[debug] [ADB] Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[debug] [ADB] Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[debug] [ADB] 
[debug] [ADB] sha256 hash did match for 'appium-uiautomator2-server-debug-androidTest.apk'
[ADB] '/home/linuxbrew/.linuxbrew/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk' is signed with the default certificate
[UiAutomator2] Server packages are not going to be (re)installed
[debug] [UiAutomator2] Waiting up to 30000ms for services to be available
[debug] [ADB] Running '/home/suneel/Android/Sdk/platform-tools/adb -P 5037 -s 96324991560008D shell pm list instrumentation'
[debug] [UiAutomator2] Instrumentation target 'io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner' is available
[ADB] Adding packages ["io.appium.settings","io.appium.uiautomator2.server","io.appium.uiautomator2.server.test"] to Doze whitelist
[debug] [ADB] Got the following command chunks to execute: [["dumpsys","deviceidle","whitelist","+io.appium.settings",";","dumpsys","deviceidle","whitelist","+io.appium.uiautomator2.server",";","dumpsys","deviceidle","whitelist","+io.appium.uiautomator2.server.test",";"]]
[debug] [ADB] Running '/home/suneel/Android/Sdk/platform-tools/adb -P 5037 -s 96324991560008D shell dumpsys deviceidle whitelist +io.appium.settings ; dumpsys deviceidle whitelist +io.appium.uiautomator2.server ; dumpsys deviceidle whitelist +io.appium.uiautomator2.server.test ;'
[debug] [UiAutomator2] No app capability. Assuming it is already on the device
[debug] [ADB] Getting install status for com.android.chrome
[debug] [ADB] Running '/home/suneel/Android/Sdk/platform-tools/adb -P 5037 -s 96324991560008D shell dumpsys package com.android.chrome'
[debug] [ADB] 'com.android.chrome' is installed
[debug] [ADB] Running '/home/suneel/Android/Sdk/platform-tools/adb -P 5037 -s 96324991560008D shell am force-stop com.android.chrome'
[debug] [ADB] Running '/home/suneel/Android/Sdk/platform-tools/adb -P 5037 -s 96324991560008D shell pm clear com.android.chrome'
[debug] [AndroidDriver] Performed fast reset on the installed 'com.android.chrome' application (stop and clear)
[debug] [UiAutomator2] Performing shallow cleanup of automation leftovers
[debug] [UiAutomator2] No obsolete sessions have been detected (socket hang up)
[debug] [ADB] Running '/home/suneel/Android/Sdk/platform-tools/adb -P 5037 -s 96324991560008D shell am force-stop io.appium.uiautomator2.server.test'
[UiAutomator2] Starting UIAutomator2 server 4.27.0
[UiAutomator2] Using UIAutomator2 server from '/home/linuxbrew/.linuxbrew/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v4.27.0.apk' and test from '/home/linuxbrew/.linuxbrew/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk'
[UiAutomator2] Waiting up to 30000ms for UiAutomator2 to be online...
[debug] [ADB] Creating ADB subprocess with args: ["-P",5037,"-s","96324991560008D","shell","am","instrument","-w","-e","disableAnalytics",true,"io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner"]
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8200/wd/hub/status] with no body
[WD Proxy] socket hang up
[debug] [Instrumentation] io.appium.uiautomator2.server.test.AppiumUiAutomator2Server:
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8200/wd/hub/status] with no body
[WD Proxy] socket hang up
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8200/wd/hub/status] with no body
[debug] [WD Proxy] Got response with status 200: {"sessionId":"None","value":{"message":"UiAutomator2 Server is ready to accept commands","ready":true}}
[debug] [UiAutomator2] The initialization of the instrumentation process took 2060ms
[debug] [WD Proxy] Matched '/session' to command name 'createSession'
[debug] [WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8200/wd/hub/session] with body: {"capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","browserName":"Chrome","udid":"96324991560008D","automationName":"UiAutomator2","ensureWebviewsHavePages":true,"nativeWebScreenshot":true,"newCommandTimeout":3600,"connectHardwareKeyboard":true},"platformName":"android","browserName":"Chrome","udid":"96324991560008D","automationName":"UiAutomator2","ensureWebviewsHavePages":true,"nativeWebScreenshot":true,"newCommandTimeout":3600,"connectHardwareKeyboard":true,"appPackage":"com.android.chrome","appActivity":"com.google.android.apps.chrome.Main","deviceName":"96324991560008D","deviceUDID":"96324991560008D"}],"alwaysMatch":{}}}
[debug] [WD Proxy] Got response with status 200: {"sessionId":"30a199f7-02eb-47ed-a685-934bc716aa1b","value":{"capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","browserName":"Chrome","udid":"96324991560008D","automationName":"UiAutomator2","ensureWebviewsHavePages":true,"nativeWebScreenshot":true,"newCommandTimeout":3600,"connectHardwareKeyboard":true},"platformName":"android","browserName":"Chrome","udid":"96324991560008D","automationName":"UiAutomator2","ensureWebviewsHavePages":true,"nativeWebScreenshot":true,"newCommandTimeout":3600,"connectHardwareKeyboard":true,"appPackage":"com.android.chrome","appActivity":"com.google.android.apps.chrome.Main","deviceName":"96324991560008D","deviceUDID":"96324991560008D"}],"alwaysMatch":{}},"sessionId":"30a199f7-02eb-47ed-a685-934bc716aa1b"}}
[WD Proxy] Determined the downstream protocol as 'W3C'
[debug] [WD Proxy] Proxying [GET /appium/device/info] to [GET http://127.0.0.1:8200/wd/hub/session/30a199f7-02eb-47ed-a685-934bc716aa1b/appium/device/info] with no body
[debug] [WD Proxy] Got response with status 200: {"sessionId":"30a199f7-02eb-47ed-a685-934bc716aa1b","value":{"androidId":"74cb02ea673d466d","apiVersion":"33","bluetooth":{"state":"OFF"},"brand":"iQOO","carrierName":"airtel","displayDensity":440,"locale":"en_US","manufacturer":"vivo","model":"I2009","networks":[{"capabilities":{"SSID":null,"linkDownBandwidthKbps":14,"linkUpstreamBandwidthKbps":14,"networkCapabilities":"NET_CAPABILITY_IMS,NET_CAPABILITY_NOT_METERED,NET_CAPABILITY_TRUSTED,NET_CAPABILITY_NOT_VPN,NET_CAPABILITY_VALIDATED,NET_CAPABILITY_NOT_ROAMING,NET_CAPABILITY_FOREGROUND,NET_CAPABILITY_NOT_CONGESTED,NET_CAPABILITY_NOT_SUSPENDED","signalStrength":-2147483648,"transportTypes":"TRANSPORT_CELLULAR"},"detailedState":"CONNECTED","extraInfo":"ims","isAvailable":true,"isConnected":true,"isFailover":false,"isRoaming":false,"state":"CONNECTED","subtype":18,"subtypeName":"IWLAN","type":0,"typeName":"MOBILE"},{"capabilities":{"SSID":null,"linkDownBandwidthKbps":45576,"linkUpstreamBandwidthKbps":55118,"networkCapabilities":"NET_CAPABILITY_NOT_METERED,N...
[debug] [ADB] Running '/home/suneel/Android/Sdk/platform-tools/adb -P 5037 -s 96324991560008D shell dumpsys window'
[AndroidDriver] Screen already unlocked, doing nothing
[AndroidDriver] Starting a chrome-based browser session
[debug] [AndroidDriver] A port was not given, using random free port: 8000
[debug] [AndroidDriver] Automated Chromedriver download is disabled. Use 'chromedriver_autodownload' server feature to enable it
[debug] [AndroidDriver] Precalculated Chromedriver capabilities: {
[debug] [AndroidDriver]   "androidPackage": "com.android.chrome",
[debug] [AndroidDriver]   "androidDeviceSerial": "96324991560008D"
[debug] [AndroidDriver] }
[debug] [AndroidDriver] Before starting chromedriver, androidPackage is 'com.android.chrome'
[debug] [Chromedriver] Changed state to 'starting'
[debug] [Chromedriver] Using the static Chromedriver->Chrome mapping
[debug] [Chromedriver] The most recent known Chrome version: 91.0.4472
[debug] [Chromedriver] Found 2 executables in '/home/linuxbrew/.linuxbrew/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/linux'
[debug] [Chromedriver] The following Chromedriver executables were found:
[debug] [Chromedriver]     '/home/linuxbrew/.linuxbrew/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/linux/chromedriver_linux64_v113.0.5672.63' (version '113.0.5672.63', minimum Chrome version '113')
[debug] [Chromedriver]     '/home/linuxbrew/.linuxbrew/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/linux/chromedriver_linux64_v113.0.5672.24' (version '113.0.5672.24', minimum Chrome version '113')
[Chromedriver] Found 2 Chromedrivers, which are missing in the list of known versions: {"113.0.5672.63":"113","113.0.5672.24":"113"}
[debug] [ADB] Getting package info for 'com.android.chrome'
[debug] [ADB] Running '/home/suneel/Android/Sdk/platform-tools/adb -P 5037 -s 96324991560008D shell dumpsys package com.android.chrome'
[debug] [Chromedriver] Found Chrome bundle 'com.android.chrome' version '113.0.5672'
[debug] [Chromedriver] Found 2 executables capable of automating Chrome '113.0.5672'.
[debug] [Chromedriver] Choosing the most recent, '/home/linuxbrew/.linuxbrew/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/linux/chromedriver_linux64_v113.0.5672.63'.
[debug] [Chromedriver] If a specific version is required, specify it with the `chromedriverExecutable`desired capability.
[Chromedriver] Set chromedriver binary as: /home/linuxbrew/.linuxbrew/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/linux/chromedriver_linux64_v113.0.5672.63
[debug] [Chromedriver] Killing any old chromedrivers, running: pkill -15 -f "/home/linuxbrew/.linuxbrew/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/linux/chromedriver_linux64_v113.0.5672.63.*--port=8000"
[Chromedriver] No old chromedrivers seem to exist
[debug] [Chromedriver] Cleaning this device's adb forwarded port socket connections: 96324991560008D
[debug] [ADB] List forwarding ports
[debug] [ADB] Running '/home/suneel/Android/Sdk/platform-tools/adb -P 5037 -s 96324991560008D forward --list'
[Chromedriver] Spawning chromedriver with: /home/linuxbrew/.linuxbrew/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/linux/chromedriver_linux64_v113.0.5672.63 --url-base=wd/hub --port=8000 --adb-port=5037 --verbose
[debug] [Chromedriver] Chromedriver version: '113.0.5672.63'
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8000/wd/hub/status] with no body
[debug] [WD Proxy] Got response with status 200: {"value":{"build":{"version":"113.0.5672.63 (0e1a4471d5ae5bf128b1bd8f4d627c8cbd55f70c-refs/branch-heads/5672@{#912})"},"message":"ChromeDriver ready for new sessions.","os":{"arch":"x86_64","name":"Linux","version":"5.19.0-41-generic"},"ready":true}}
[Chromedriver] Starting W3C Chromedriver session with capabilities: {
[Chromedriver]   "capabilities": {
[Chromedriver]     "alwaysMatch": {
[Chromedriver]       "goog:chromeOptions": {
[Chromedriver]         "androidPackage": "com.android.chrome",
[Chromedriver]         "androidDeviceSerial": "96324991560008D"
[Chromedriver]       },
[Chromedriver]       "goog:loggingPrefs": {
[Chromedriver]         "browser": "ALL"
[Chromedriver]       }
[Chromedriver]     }
[Chromedriver]   }
[Chromedriver] }
[debug] [WD Proxy] Matched '/session' to command name 'createSession'
[debug] [WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8000/wd/hub/session] with body: {"capabilities":{"alwaysMatch":{"goog:chromeOptions":{"androidPackage":"com.android.chrome","androidDeviceSerial":"96324991560008D"},"goog:loggingPrefs":{"browser":"ALL"}}}}
[debug] [Chromedriver] Webview version: 'Chrome/113.0.5672.77'
[debug] [WD Proxy] Got response with status 200: {"value":{"capabilities":{"acceptInsecureCerts":false,"browserName":"chrome","browserVersion":"113.0.5672.77","chrome":{"chromedriverVersion":"113.0.5672.63 (0e1a4471d5ae5bf128b1bd8f4d627c8cbd55f70c-refs/branch-heads/5672@{#912})"},"goog:chromeOptions":{"debuggerAddress":"localhost:37863"},"pageLoadStrategy":"normal","platformName":"android","proxy":{},"setWindowRect":false,"strictFileInteractability":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"unhandledPromptBehavior":"dismiss and notify","webauthn:extension:credBlob":false,"webauthn:extension:largeBlob":false,"webauthn:extension:minPinLength":false,"webauthn:extension:prf":false,"webauthn:virtualAuthenticators":false},"sessionId":"273766d00afcaffb27ee9b3fc05d2ba6"}}
[WD Proxy] Determined the downstream protocol as 'W3C'
[debug] [Chromedriver] Changed state to 'online'
[debug] [WD Proxy] Proxying [GET /appium/device/pixel_ratio] to [GET http://127.0.0.1:8200/wd/hub/session/30a199f7-02eb-47ed-a685-934bc716aa1b/appium/device/pixel_ratio] with no body
[debug] [WD Proxy] Got response with status 200: {"sessionId":"30a199f7-02eb-47ed-a685-934bc716aa1b","value":2.75}
[debug] [WD Proxy] Matched '/appium/device/system_bars' to command name 'getSystemBars'
[debug] [WD Proxy] Proxying [GET /appium/device/system_bars] to [GET http://127.0.0.1:8200/wd/hub/session/30a199f7-02eb-47ed-a685-934bc716aa1b/appium/device/system_bars] with no body
[debug] [WD Proxy] Got response with status 200: {"sessionId":"30a199f7-02eb-47ed-a685-934bc716aa1b","value":{"statusBar":88}}
[debug] [WD Proxy] Matched '/window/current/size' to command name 'getWindowSize'
[debug] [WD Proxy] Proxying [GET /window/current/size] to [GET http://127.0.0.1:8200/wd/hub/session/30a199f7-02eb-47ed-a685-934bc716aa1b/window/current/size] with no body
[debug] [WD Proxy] Got response with status 200: {"sessionId":"30a199f7-02eb-47ed-a685-934bc716aa1b","value":{"height":2203,"width":1080}}
[Appium] New AndroidUiautomator2Driver session created successfully, session 30a4fac1-1cb2-4a57-abd7-6a66f5396320 added to master session list
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1684231390677 (15:33:10 GMT+0530 (India Standard Time))
[debug] [W3C (30a4fac1)] Cached the protocol value 'W3C' for the new session 30a4fac1-1cb2-4a57-abd7-6a66f5396320
[debug] [W3C (30a4fac1)] Responding to client with driver.createSession() result: {"capabilities":{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","browserName":"Chrome","udid":"96324991560008D","automationName":"UiAutomator2","ensureWebviewsHavePages":true,"nativeWebScreenshot":true,"newCommandTimeout":3600,"connectHardwareKeyboard":true},"platformName":"android","browserName":"Chrome","udid":"96324991560008D","automationName":"UiAutomator2","ensureWebviewsHavePages":true,"nativeWebScreenshot":true,"newCommandTimeout":3600,"connectHardwareKeyboard":true,"appPackage":"com.android.chrome","appActivity":"com.google.android.apps.chrome.Main","deviceName":"96324991560008D","deviceUDID":"96324991560008D","deviceApiLevel":33,"platformVersion":"13","deviceScreenSize":"1080x2400","deviceScreenDensity":440,"deviceModel":"I2009","deviceManufacturer":"vivo","pixelRatio":2.75,"statBarHeight":88,"viewportRect":{"left":0,...
[HTTP] <-- POST /wd/hub/session 200 5266 ms - 1120
[HTTP] 
[HTTP] --> POST /wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320/url
[HTTP] {"url":"https://appium.io"}
[W3C (30a4fac1)] Driver proxy active, passing request on via HTTP proxy
[debug] [WD Proxy] Matched '/wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320/url' to command name 'setUrl'
[debug] [WD Proxy] Proxying [POST /wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320/url] to [POST http://127.0.0.1:8000/wd/hub/session/273766d00afcaffb27ee9b3fc05d2ba6/url] with body: {"url":"https://appium.io"}
[debug] [WD Proxy] Got response with status 200: {"value":null}
[HTTP] <-- POST /wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320/url 200 3077 ms - 14
[HTTP] 
[HTTP] --> GET /wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320/screenshot
[HTTP] {}
[debug] [W3C (30a4fac1)] Calling AppiumDriver.getScreenshot() with args: ["30a4fac1-1cb2-4a57-abd7-6a66f5396320"]
[debug] [WD Proxy] Matched '/screenshot' to command name 'getScreenshot'
[debug] [WD Proxy] Proxying [GET /screenshot] to [GET http://127.0.0.1:8200/wd/hub/session/30a199f7-02eb-47ed-a685-934bc716aa1b/screenshot] with no body
[debug] [WD Proxy] Got response with status 200: {"sessionId":"30a199f7-02eb-47ed-a685-934bc716aa1b","value":"iVBORw0KGgoAAAANSUhEUgAABDgAAAlgCAYAAABtGofVAAAAAXNSR0IArs4c6QAAAARzQklUCAgI\nCHwIZIgAACAASURBVHic7N13eFvneTf+78GeBEgQ3AMiRUmkLErUshRbEuUtJXY85JHGsewmTeK0\nTZM4bZO+b5zafftLkyZNGie207S1nTS1Y3nIGfKIo+ElRdSyZIlDi0Pce4DYOL8/DnFIEOAGSIL8\nfq7Ll0Xw4OAABHDOcz/3c9/Co/e8I4KIiIiIiIiIKIEp5voAiIiIiIiIiIhmigEOIiIiIiIiIkp4\nDHAQERERERERUcJjgIOIiIiIiIiIEh4DHERERERERESU8BjgICIiIiIiIqKExwAHERERERERESU8\nBjiIiIiIiIiIKOExwEFERERERERECY8BDiIiIiIiIiJKeAxwEBEREREREVHCY4CDiIiIiIiIiBIe\nAxxERERERERElPAY4CAiIiIiIiKihMcABxERERERERElPAY4iIiIiIiIiCjhMcBBRERERERERAmP\nAQ4iIiIiIiIiSngMcBARERERERFRwmOAg4iIiIiIiIgSHgMcRERERERERJTwVHN9AERERERERJR4\ntt+dP+7vL5/tQe253lk6GiIGOIiIiIhoEdIZVCi91g7XgB9nPmifcNuv/nQDdAYVThxoxWtP10T8\nfsNNmcgtMkNrUME14MOlj3px9M2maR/beI9HNF+U78ob9/eOEgueeez0LB0NEQMctMgJAqDWKJFk\n00AQBHS3ueH3BQEACoUArUEJk1UDryuA/m4vgkFxjo+YiIiIpkupFFCyKRUrN9lRsMoKrV6JD37X\nOGGA48ZPO6AzSJfNRWuSw36XnmfEvV8rhi1TH3Z78cZUrLrGjl/88xn4PMEpHed4j0dERGNjgIMW\nNaVKgZwiM7bdlQelSsCBPfW4...
[debug] [W3C (30a4fac1)] Responding to client with driver.getScreenshot() result: "iVBORw0KGgoAAAANSUhEUgAABDgAAAlgCAYAAABtGofVAAAAAXNSR0IArs4c6QAAAARzQklUCAgI\nCHwIZIgAACAASURBVHic7N13eFvneTf+78GeBEgQ3AMiRUmkLErUshRbEuUtJXY85JHGsewmTeK0\nTZM4bZO+b5zafftLkyZNGie207S1nTS1Y3nIGfKIo+ElRdSyZIlDi0Pce4DYOL8/DnFIEOAGSIL8\nfq7Ll0Xw4OAABHDOcz/3c9/Co/e8I4KIiIiIiIiIKIEp5voAiIiIiIiIiIhmigEOIiIiIiIiIkp4\nDHAQERERERERUcJjgIOIiIiIiIiIEh4DHERERERERESU8BjgICIiIiIiIqKExwAHERERERERESU8\nBjiIiIiIiIiIKOExwEFERERERERECY8BDiIiIiIiIiJKeAxwEBEREREREVHCY4CDiIiIiIiIiBIe\nAxxERERERERElPAY4CAiIiIiIiKihMcABxERERERERElPAY4iIiIiIiIiCjhMcBBRERERERERAmP\nAQ4iIiIiIiIiSngMcBARERERERFRwmOAg4iIiIiIiIgSHgMcRERERERERJTwVHN9AERERERERJR4\ntt+dP+7vL5/tQe253lk6GiIGOIiIiIhoEdIZVCi91g7XgB9nPmifcNuv/nQDdAYVThxoxWtP10T8\nfsNNmcgtMkNrUME14MOlj3px9M2maR/beI9HNF+U78ob9/eOEgueeez0LB0NEQMctMgJAqDWKJFk\n00AQBHS3ueH3BQEACoUArUEJk1UDryuA/m4vgkFxjo+YiIiIpkupFFCyKRUrN9lRsMoKrV6JD37X\nOGGA48ZPO6AzSJfNRWuSw36XnmfEvV8rhi1TH3Z78cZUrLrGjl/88xn4PMEpHed4j0dERGNjgIMW\nNaVKgZwiM7bdlQelSsCBPfW4/FEPRFGEwaxG6ZY0rNycisYL/Xh3bwP6u71zfchEREQ0Deuuy8B1\n9+XDZN...
[HTTP] <-- GET /wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320/screenshot 200 318 ms - 456556
[HTTP] 
[HTTP] --> GET /wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320/contexts
[HTTP] {}
[debug] [W3C (30a4fac1)] Calling AppiumDriver.getContexts() with args: ["30a4fac1-1cb2-4a57-abd7-6a66f5396320"]
[debug] [AndroidDriver] Available contexts: ["NATIVE_APP","CHROMIUM"]
[debug] [W3C (30a4fac1)] Responding to client with driver.getContexts() result: ["NATIVE_APP","CHROMIUM"]
[HTTP] <-- GET /wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320/contexts 200 2 ms - 35
[HTTP] 
[HTTP] --> GET /wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320/context
[HTTP] {}
[debug] [W3C (30a4fac1)] Calling AppiumDriver.getCurrentContext() with args: ["30a4fac1-1cb2-4a57-abd7-6a66f5396320"]
[debug] [W3C (30a4fac1)] Responding to client with driver.getCurrentContext() result: "CHROMIUM"
[HTTP] <-- GET /wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320/context 200 1 ms - 20
[HTTP] 
[HTTP] --> POST /wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320/context
[HTTP] {"name":"NATIVE_APP"}
[debug] [W3C (30a4fac1)] Calling AppiumDriver.setContext() with args: ["NATIVE_APP","30a4fac1-1cb2-4a57-abd7-6a66f5396320"]
[debug] [AndroidDriver] Available contexts: ["NATIVE_APP","CHROMIUM"]
[debug] [W3C (30a4fac1)] Responding to client with driver.setContext() result: null
[HTTP] <-- POST /wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320/context 200 1 ms - 14
[HTTP] 
[HTTP] --> GET /wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320
[HTTP] {}
[debug] [W3C (30a4fac1)] Calling AppiumDriver.getSession() with args: ["30a4fac1-1cb2-4a57-abd7-6a66f5396320"]
[debug] [UiAutomator2] Getting session details from server to mix in
[debug] [WD Proxy] Matched '/' to command name 'getSession'
[debug] [WD Proxy] Proxying [GET /] to [GET http://127.0.0.1:8200/wd/hub/session/30a199f7-02eb-47ed-a685-934bc716aa1b] with no body
[debug] [WD Proxy] Got response with status 200: {"sessionId":"30a199f7-02eb-47ed-a685-934bc716aa1b","value":{"lastScrollData":null}}
[debug] [W3C (30a4fac1)] Responding to client with driver.getSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","browserName":"Chrome","udid":"96324991560008D","automationName":"UiAutomator2","ensureWebviewsHavePages":true,"nativeWebScreenshot":true,"newCommandTimeout":3600,"connectHardwareKeyboard":true},"platformName":"android","browserName":"Chrome","udid":"96324991560008D","automationName":"UiAutomator2","ensureWebviewsHavePages":true,"nativeWebScreenshot":true,"newCommandTimeout":3600,"connectHardwareKeyboard":true,"appPackage":"com.android.chrome","appActivity":"com.google.android.apps.chrome.Main","deviceName":"96324991560008D","deviceUDID":"96324991560008D","deviceApiLevel":33,"platformVersion":"13","deviceScreenSize":"1080x2400","deviceScreenDensity":440,"deviceModel":"I2009","deviceManufacturer":"vivo","pixelRatio":2.75,"statBarHeight":88,"viewportRect":{"left":0,"top":88,"width"...
[HTTP] <-- GET /wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320 200 7 ms - 1074
[HTTP] 
[HTTP] --> POST /wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320/execute/sync
[HTTP] {"script":"mobile:getContexts","args":[]}
[debug] [W3C (30a4fac1)] Calling AppiumDriver.execute() with args: ["mobile:getContexts",[],"30a4fac1-1cb2-4a57-abd7-6a66f5396320"]
[AndroidDriver] Executing native command 'mobile:getContexts'
[debug] [W3C (30a4fac1)] Responding to client with driver.execute() result: []
[HTTP] <-- POST /wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320/execute/sync 200 3 ms - 12
[HTTP] 
[HTTP] --> POST /wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320/context
[HTTP] {"name":"CHROMIUM"}
[debug] [W3C (30a4fac1)] Calling AppiumDriver.setContext() with args: ["CHROMIUM","30a4fac1-1cb2-4a57-abd7-6a66f5396320"]
[debug] [AndroidDriver] Available contexts: ["NATIVE_APP","CHROMIUM"]
[debug] [AndroidDriver] Connecting to chrome-backed webview context 'CHROMIUM'
[debug] [AndroidDriver] Found existing Chromedriver for context 'CHROMIUM'. Using it.
[debug] [WD Proxy] Matched '/url' to command name 'getUrl'
[debug] [WD Proxy] Proxying [GET /url] to [GET http://127.0.0.1:8000/wd/hub/session/273766d00afcaffb27ee9b3fc05d2ba6/url] with no body
[debug] [WD Proxy] Got response with status 200: {"value":"https://appium.io/docs/en/2.0/"}
[debug] [W3C (30a4fac1)] Responding to client with driver.setContext() result: null
[HTTP] <-- POST /wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320/context 200 62 ms - 14
[HTTP] 
[HTTP] --> POST /wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320/execute/sync
[HTTP] {"script":"return (function i(t){const{platformName:e,webviewStatusAddressBarHeight:r}=t,i=document.body.getElementsByTagName(\"*\"),o=\"android\"===e.toLowerCase()?window.devicePixelRatio:1;Array.from(i).forEach(t=>{const e=t.getBoundingClientRect();t.setAttribute(\"data-appium-inspector-width\",Math.round(e.width*o)),t.setAttribute(\"data-appium-inspector-height\",Math.round(e.height*o)),t.setAttribute(\"data-appium-inspector-x\",Math.round(e.left*o)),t.setAttribute(\"data-appium-inspector-y\",Math.round(r+e.top*o))})}).apply(null, arguments)","args":[{"platformName":"android","webviewStatusAddressBarHeight":88}]}
[debug] [W3C (30a4fac1)] Calling AppiumDriver.execute() with args: ["return (function i(t){const{platformName:e,webviewStatusAddressBarHeight:r}=t,i=document.body.getElementsByTagName(\"*\"),o=\"android\"===e.toLowerCase()?window.devicePixelRatio:1;Array.from(i).forEach(t=>{const e=t.getBoundingClientRect();t.setAttribute(\"data-appium-inspector-width\",Math.round(e.width*o)),t.setAttribute(\"data-appium-inspector-height\",Math.round(e.height*o)),t.setAttribute(\"data-appium-inspector-x\",Math.round(e.left*o)),t.setAttribute(\"data-appium-inspector-y\",Math.round(r+e.top*o))})}).apply(null, arguments)",[{"platformName":"android","webviewStatusAddressBarHeight":88}],"30a4fac1-1cb2-4a57-abd7-6a66f5396320"]
[debug] [WD Proxy] Matched '/execute/sync' to command name 'execute'
[debug] [Protocol Converter] Did not know how to rewrite the original URL '/execute/sync' for W3C protocol
[debug] [WD Proxy] Proxying [POST /execute/sync] to [POST http://127.0.0.1:8000/wd/hub/session/273766d00afcaffb27ee9b3fc05d2ba6/execute/sync] with body: {"script":"return (function i(t){const{platformName:e,webviewStatusAddressBarHeight:r}=t,i=document.body.getElementsByTagName(\"*\"),o=\"android\"===e.toLowerCase()?window.devicePixelRatio:1;Array.from(i).forEach(t=>{const e=t.getBoundingClientRect();t.setAttribute(\"data-appium-inspector-width\",Math.round(e.width*o)),t.setAttribute(\"data-appium-inspector-height\",Math.round(e.height*o)),t.setAttribute(\"data-appium-inspector-x\",Math.round(e.left*o)),t.setAttribute(\"data-appium-inspector-y\",Math.round(r+e.top*o))})}).apply(null, arguments)","args":[{"platformName":"android","webviewStatusAddressBarHeight":88}]}
[debug] [WD Proxy] Got response with status 200: {"value":null}
[debug] [W3C (30a4fac1)] Responding to client with driver.execute() result: null
[HTTP] <-- POST /wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320/execute/sync 200 31 ms - 14
[HTTP] 
[HTTP] --> GET /wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320/source
[HTTP] {}
[W3C (30a4fac1)] Driver proxy active, passing request on via HTTP proxy
[debug] [WD Proxy] Matched '/wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320/source' to command name 'getPageSource'
[debug] [WD Proxy] Proxying [GET /wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320/source] to [GET http://127.0.0.1:8000/wd/hub/session/273766d00afcaffb27ee9b3fc05d2ba6/source] with no body
[debug] [WD Proxy] Got response with status 200: {"value":"<html lang=\"en\" class=\"js-focus-visible js\" data-js-focus-visible=\"\"><head>\n    \n      <meta charset=\"utf-8\">\n      <meta name=\"viewport\" content=\"width=device-width,initial-scale=1\">\n      \n        <meta name=\"description\" content=\"The Appium automation project documentation\">\n      \n      \n      \n        <link rel=\"canonical\" href=\"https://appium.io/docs/en/2.0/\">\n      \n      \n      \n        <link rel=\"next\" href=\"intro/\">\n      \n      <link rel=\"icon\" href=\"assets/images/appium-logo.png\">\n      <meta name=\"generator\" content=\"mkdocs-1.4.2, mkdocs-material-9.0.3\">\n    \n    \n      \n        <title>Appium Documentation - Appium Documentation</title>\n      \n    \n    \n      <link rel=\"stylesheet\" href=\"assets/stylesheets/main.6b71719e.min.css\">\n      \n        \n        <link rel=\"stylesheet\" href=\"assets/stylesheets/palette.2505c338.min.css\">\n      \n      \n  \n  \n    \n    \n  \n    \n    \n  \n    \n    \n  \n    \n    \n  \n   ...
[HTTP] <-- GET /wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320/source 200 24 ms - 96710
[HTTP] 
[HTTP] --> POST /wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320/actions
[HTTP] {"actions":[{"type":"pointer","id":"finger1","parameters":{"pointerType":"touch"},"actions":[{"type":"pointerMove","duration":0,"x":527,"y":1393},{"type":"pointerDown","button":0},{"type":"pointerMove","duration":750,"origin":"viewport","x":501,"y":767},{"type":"pointerUp","button":0}]}]}
[W3C (30a4fac1)] Driver proxy active, passing request on via HTTP proxy
[debug] [WD Proxy] Matched '/wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320/actions' to command name 'performActions'
[debug] [WD Proxy] Proxying [POST /wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320/actions] to [POST http://127.0.0.1:8000/wd/hub/session/273766d00afcaffb27ee9b3fc05d2ba6/actions] with body: {"actions":[{"type":"pointer","id":"finger1","parameters":{"pointerType":"touch"},"actions":[{"type":"pointerMove","duration":0,"x":527,"y":1393},{"type":"pointerDown","button":0},{"type":"pointerMove","duration":750,"origin":"viewport","x":501,"y":767},{"type":"pointerUp","button":0}]}]}
[WD Proxy] Got response with status 500: {"value":{"error":"move target out of bounds","message":"move target out of bounds\n  (Session info: chrome=113.0.5672.77)","stacktrace":"#0 0x563e2285f133 <unknown>\n#1 0x563e225937f0 <unknown>\n#2 0x563e2261130b <unknown>\n#3 0x563e225efbd2 <unknown>\n#4 0x563e226081c7 <unknown>\n#5 0x563e225ef9a3 <unknown>\n#6 0x563e225c446a <unknown>\n#7 0x563e225c555e <unknown>\n#8 0x563e2281ecae <unknown>\n#9 0x563e228228fe <unknown>\n#10 0x563e2282bf20 <unknown>\n#11 0x563e22823923 <unknown>\n#12 0x563e227f6c0e <unknown>\n#13 0x563e22846b08 <unknown>\n#14 0x563e22846c97 <unknown>\n#15 0x563e22857113 <unknown>\n#16 0x7fa68c694b43 <unknown>\n"}}
[debug] [W3C] Matched W3C error code 'move target out of bounds' to MoveTargetOutOfBoundsError
[HTTP] <-- POST /wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320/actions 500 81 ms - 641
[HTTP] 
[HTTP] --> POST /wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320/actions
[HTTP] {"actions":[{"type":"pointer","id":"finger1","parameters":{"pointerType":"touch"},"actions":[{"type":"pointerMove","duration":0,"x":468,"y":678},{"type":"pointerDown","button":0},{"type":"pointerMove","duration":750,"origin":"viewport","x":479,"y":1353},{"type":"pointerUp","button":0}]}]}
[W3C (30a4fac1)] Driver proxy active, passing request on via HTTP proxy
[debug] [WD Proxy] Matched '/wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320/actions' to command name 'performActions'
[debug] [WD Proxy] Proxying [POST /wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320/actions] to [POST http://127.0.0.1:8000/wd/hub/session/273766d00afcaffb27ee9b3fc05d2ba6/actions] with body: {"actions":[{"type":"pointer","id":"finger1","parameters":{"pointerType":"touch"},"actions":[{"type":"pointerMove","duration":0,"x":468,"y":678},{"type":"pointerDown","button":0},{"type":"pointerMove","duration":750,"origin":"viewport","x":479,"y":1353},{"type":"pointerUp","button":0}]}]}
[WD Proxy] Got response with status 500: {"value":{"error":"move target out of bounds","message":"move target out of bounds\n  (Session info: chrome=113.0.5672.77)","stacktrace":"#0 0x563e2285f133 <unknown>\n#1 0x563e225937f0 <unknown>\n#2 0x563e2261130b <unknown>\n#3 0x563e225efbd2 <unknown>\n#4 0x563e226081c7 <unknown>\n#5 0x563e225ef9a3 <unknown>\n#6 0x563e225c446a <unknown>\n#7 0x563e225c555e <unknown>\n#8 0x563e2281ecae <unknown>\n#9 0x563e228228fe <unknown>\n#10 0x563e2282bf20 <unknown>\n#11 0x563e22823923 <unknown>\n#12 0x563e227f6c0e <unknown>\n#13 0x563e22846b08 <unknown>\n#14 0x563e22846c97 <unknown>\n#15 0x563e22857113 <unknown>\n#16 0x7fa68c694b43 <unknown>\n"}}
[debug] [W3C] Matched W3C error code 'move target out of bounds' to MoveTargetOutOfBoundsError
[HTTP] <-- POST /wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320/actions 500 84 ms - 641
[HTTP] 

@jlipps
Copy link
Member

jlipps commented May 16, 2023

It seems like the move target is out of bounds. Have you tried making sure it's not?

@suneel944
Copy link
Author

I even tried swiping manually in the inspector even it is throwing the same error

@KazuCocoa
Copy link
Member

The error itself came from the chromedriver, so cannot do anything for the chromedriver itself as Appium.

[HTTP] --> POST /wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320/actions
[HTTP] {"actions":[{"type":"pointer","id":"finger1","parameters":{"pointerType":"touch"},"actions":[{"type":"pointerMove","duration":0,"x":527,"y":1393},{"type":"pointerDown","button":0},{"type":"pointerMove","duration":750,"origin":"viewport","x":501,"y":767},{"type":"pointerUp","button":0}]}]}
[W3C (30a4fac1)] Driver proxy active, passing request on via HTTP proxy
[debug] [WD Proxy] Matched '/wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320/actions' to command name 'performActions'
[debug] [WD Proxy] Proxying [POST /wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320/actions] to [POST http://127.0.0.1:8000/wd/hub/session/273766d00afcaffb27ee9b3fc05d2ba6/actions] with body: {"actions":[{"type":"pointer","id":"finger1","parameters":{"pointerType":"touch"},"actions":[{"type":"pointerMove","duration":0,"x":527,"y":1393},{"type":"pointerDown","button":0},{"type":"pointerMove","duration":750,"origin":"viewport","x":501,"y":767},{"type":"pointerUp","button":0}]}]}
[WD Proxy] Got response with status 500: {"value":{"error":"move target out of bounds","message":"move target out of bounds\n  (Session info: chrome=113.0.5672.77)","stacktrace":"#0 0x563e2285f133 <unknown>\n#1 0x563e225937f0 <unknown>\n#2 0x563e2261130b <unknown>\n#3 0x563e225efbd2 <unknown>\n#4 0x563e226081c7 <unknown>\n#5 0x563e225ef9a3 <unknown>\n#6 0x563e225c446a <unknown>\n#7 0x563e225c555e <unknown>\n#8 0x563e2281ecae <unknown>\n#9 0x563e228228fe <unknown>\n#10 0x563e2282bf20 <unknown>\n#11 0x563e22823923 <unknown>\n#12 0x563e227f6c0e <unknown>\n#13 0x563e22846b08 <unknown>\n#14 0x563e22846c97 <unknown>\n#15 0x563e22857113 <unknown>\n#16 0x7fa68c694b43 <unknown>\n"}}
[debug] [W3C] Matched W3C error code 'move target out of bounds' to MoveTargetOutOfBoundsError
[HTTP] <-- POST /wd/hub/session/30a4fac1-1cb2-4a57-abd7-6a66f5396320/actions 500 81 ms - 641
[HTTP] 

Alternatively, you might be able to do the action in the NATIVE_APP context. You might need to coordinate the coordination, but the NATIVE_APP context could avoid the chromedriver (WebView context)'s error

@suneel944
Copy link
Author

Yes I tried the native context and it worked fine. But changing to web context resulting in the above specified error.

@suneel944
Copy link
Author

suneel944 commented May 16, 2023

So @KazuCocoa and @jlipps , is scrolling the only mechanism to mimic swipe action in web context

@KazuCocoa
Copy link
Member

Gotcha, then, only Google can fix it

@KazuCocoa
Copy link
Member

{"actions":[{"type":"pointer","id":"finger1","parameters":{"pointerType":"touch"},"actions":[{"type":"pointerMove","duration":0,"x":527,"y":1393},{"type":"pointerDown","button":0},{"type":"pointerMove","duration":750,"origin":"viewport","x":501,"y":767},{"type":"pointerUp","button":0}]}]}

This w3c action achieves swipe etc to achieve gesture. So the question is yes, we should send the actions endpoint to the chromedriver. Or alternatively you may be able to send JavaScript to the WebView context

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

No branches or pull requests

3 participants