appium 运行崩溃后再启动,报端口被占用

本文介绍了解决Appium运行时出现端口被占用问题的方法。在Windows下,通过任务管理器结束node.exe*32进程;在Linux环境下,使用killall或ps结合grep和xargs命令清除node进程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

前几天用appium的时候遇到个问题,再运行的时候突然崩溃,重启后一直报错:端口被占用,下面是报错信息

Checking if an update is available
> Update not available
> Starting Node Server
> error: Couldn't start Appium REST http interface listener. Requested port is already in use. Please make sure there's no other instance of Appium running already.
>
>
> Node Server Process Ended

 

 

解决方法:
windows环境下:
在任务管理器中找到node.exe*32进程,杀掉后重新启动appium即可;
linux环境下:
killall -9 node 或 ps -ef | grep node | xargs kill -9

请帮我分析这段日志* 从应用市场下载指定应用并存放到PC本地-AG_download_app command: adb -s 4TFBB25412100180 shell "getprop ro.build.version.release" 序号: 8, 应用名称: 美颜相机, 包名: com.meitu.meiyancamera 操作失败,原因:Message: An unknown server-side error occurred while processing the command. Original error: 'POST /element' cannot be proxied to UiAutomator2 server because the instrumentation process is not running (probably crashed). Check the server log and/or the logcat output for more details Stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: 'POST /element' cannot be proxied to UiAutomator2 server because the instrumentation process is not running (probably crashed). Check the server log and/or the logcat output for more details at UIA2Proxy.command (C:\Program Files\Appium\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) 操作失败,原因:Message: An unknown server-side error occurred while processing the command. Original error: 'POST /element' cannot be proxied to UiAutomator2 server because the instrumentation process is not running (probably crashed). Check the server log and/or the logcat output for more details Stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: 'POST /element' cannot be proxied to UiAutomator2 server because the instrumentation process is not running (probably crashed). Check the server log and/or the logcat output for more details at UIA2Proxy.command (C:\Program Files\Appium\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) ABORT Message: An unknown server-side error occurred while processing the command. Original error: 'GET /window/current/size' cannot be proxied to UiAutomator2 server because the instrumentation process is not running (probably crashed). Check the server log and/or the logcat output for more details Stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: 'GET /window/current/size' cannot be proxied to UiAutomator2 server because the instrumentation process is not running (probably crashed). Check the server log and/or the logcat output for more details at UIA2Proxy.command (C:\Program Files\Appium\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) ========= 测试耗时 : 29.542 秒 =========
07-12
执行下面语句后,设备操作到启动应用后,到点击同意文本元素后报错,执行语句如下: class Super_Douyin_0001: name = '抖音录制短视频-Super_Douyin_0001' def setup(self): package = "com.ss.android.ugc.aweme" activity = "com.ss.android.ugc.aweme.splash.SplashActivity" self.super = SuperappUtils(package, activity) self.driver = self.super.driver self.super.gohome() self.super.activate_app() def teststeps(self): STEP(1, '抖音录制短视频') self.driver.find_element(AppiumBy.ANDROID_UIAUTOMATOR, f'new UiSelector().text("同意")').click() 报错信息如下: [HTTP] --> POST /wd/hub/session/1b13b4e2-f956-4b99-97fa-7ecea17e57cd/element [HTTP] {"using":"-android uiautomator","value":"new UiSelector().text(\"同意\")"} [W3C (1b13b4e2)] Calling AppiumDriver.findElement() with args: ["-android uiautomator","new UiSelector().text(\"同意\")","1b13b4e2-f956-4b99-97fa-7ecea17e57cd"] [BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, css selector, -android uiautomator [BaseDriver] Waiting up to 0 ms for condition [WD Proxy] Matched '/element' to command name 'findElement' [WD Proxy] Proxying [POST /element] to [POST http://127.0.0.1:8202/wd/hub/session/c2419d85-af4b-4231-87c8-b1c10d2c0c85/element] with body: {"strategy":"-android uiautomator","selector":"new UiSelector().text(\"同意\")","context":"","multiple":false} [WD Proxy] socket hang up [W3C (1b13b4e2)] Encountered internal error running command: 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 [W3C (1b13b4e2)] at UIA2Proxy.command (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\jsonwp-proxy\proxy.js:274:13) [W3C (1b13b4e2)] at runMicrotasks () [W3C (1b13b4e2)] at processTicksAndRejections (internal/process/task_queues.js:85:5) [HTTP] <-- POST /wd/hub/session/1b13b4e2-f956-4b99-97fa-7ecea17e57cd/element 500 34 ms - 669
最新发布
07-23
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值