(ввел данные теги, так как не вижу тега для данного вопроса, прошу не бейте)
Запустил эмулятор андроида через Android Studio, у него во вкладке
Settings -> Proxy установил динамические прокси со сменой раз в 90 секунд (если это важно)
Так же поднял
appium и прописал данный скрипт:
from appium import webdriver
cap = {
"platformName":"Android",
"platformVersion":"9",
"deviceName":"Android Emulator",
"app":"C:/Users/neev/project/***.apk"
}
try:
driver = webdriver.Remote("http://127.0.0.1:4723/wd/hub", desired_capabilities=cap)
except Exception as e:
print(e)
input()
В эмуляторе запускается приложение и через время закрывается со следующей ошибкой:
Message: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: socket hang up
Stacktrace:
UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: socket hang up
at UIA2Proxy.command (C:\Users\neev\AppData\Local\Programs\Appium Server GUI\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\jsonwp-proxy\proxy.js:274:13)
at processTicksAndRejections (internal/process/task_queues.js:85:5)
Traceback:
Traceback (most recent call last):
File "D:\f\main.py", line 10, in <module>
driver = webdriver.Remote("http://127.0.0.1:4723/wd/hub", desired_capabilities=cap)
File "C:\Users\neev\AppData\Local\Programs\Python\Python310\lib\site-packages\appium\webdriver\webdriver.py", line 273, in __init__
super().__init__(
File "C:\Users\neev\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 268, in __init__
self.start_session(capabilities, browser_profile)
File "C:\Users\neev\AppData\Local\Programs\Python\Python310\lib\site-packages\appium\webdriver\webdriver.py", line 364, in start_session
response = self.execute(RemoteCommand.NEW_SESSION, parameters)
File "C:\Users\neev\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 424, in execute
self.error_handler.check_response(response)
File "C:\Users\neev\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 247, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: socket hang up
Stacktrace:
UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: socket hang up
at UIA2Proxy.command (C:\Users\neev\AppData\Local\Programs\Appium Server GUI\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\jsonwp-proxy\proxy.js:274:13)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:85:5)
Когда убираю прокси, все нормально, никто не знает в чем может быть проблема ? Гуглил, ничего похожего не мог найти