Skip to content

[πŸ› Bug]: AttributeError: 'AppiumConnection' object has no attribute '_ca_certs'Β #14694

@Trouler

Description

@Trouler

What happened?

We are automating actions on both an Android phone on Windows, and on a Iphone on macOS. The macOS automation stopped working in the latest update, with this error:
AttributeError: 'AppiumConnection' object has no attribute '_ca_certs'

It's happening when attempting to initiate a Remote WebDriver

How can we reproduce the issue?

Will be removing quite a lot of internal code here, but hopefully relevant code is enough to figure out why it happens.
---------------------------------------------------------

from appium.webdriver import Remote
from appium.options.ios import XCUITestOptions
from appium.webdriver.appium_service import AppiumService

options = XCUITestOptions()
options.set_capability("newCommandTimeout", 3000)
options.device_name = "SECRET"
options.platform_version = "16.4"
options.automation_name = "XCUITest"
options.show_xcode_log = True
options.xcode_org_id = "SECRET"
options.xcode_signing_id = "iPhone Developer"
options.udid = "SECRET"

host = "localhost"
port = "4723"

appium_service = AppiumService()
appium_service.start(args=["--address", host, "--port", port], main_script="/usr/local/bin/appium")
assert appium_service.is_running
driver = Remote(f"http://{host}:{port}", options=options)

Relevant log output

self.driver = Remote(f"http://{appium_host}:{appium_port}", options=options)
.venv/lib/python3.12/site-packages/appium/webdriver/webdriver.py:227: in __init__
    command_executor = AppiumConnection(command_executor, keep_alive=keep_alive)
.venv/lib/python3.12/site-packages/appium/webdriver/appium_connection.py:43: in __init__
    super().__init__(remote_server_addr, keep_alive=keep_alive, ignore_proxy=ignore_proxy)
.venv/lib/python3.12/site-packages/selenium/webdriver/remote/remote_connection.py:340: in __init__
    self._conn = self._get_connection_manager()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <appium.webdriver.appium_connection.AppiumConnection object at 0x1101eedb0>
    def _get_connection_manager(self) -> Union[urllib3.PoolManager, urllib3.ProxyManager]:
        # https://github.com/SeleniumHQ/selenium/blob/0e0194b0e52a34e7df4b841f1ed74506beea5c3e/py/selenium/webdriver/remote/remote_connection.py#L134
        pool_manager_init_args = {'timeout': self.get_timeout()}
    
>       if self._ca_certs:
E       AttributeError: 'AppiumConnection' object has no attribute '_ca_certs'
.venv/lib/python3.12/site-packages/appium/webdriver/appium_connection.py:49: AttributeError

Operating System

macOS

Selenium version

4.26.0

What are the browser(s) and version(s) where you see this issue?

Chrome

What are the browser driver(s) and version(s) where you see this issue?

Not sure

Are you using Selenium Grid?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-needs-triagingA Selenium member will evaluate this soon!C-pyPython BindingsI-defectSomething is not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions