• Appium自动化测试:通过appium的inspector功能无法启动app的原因


    在打开appium-desktop程序,点击inspector功能,填写app的配置信息,启动服务提示如下:

    报错信息:

    An unknown server-side error occurred while processing the command. Original error: Cannot start the 'cc.knowyourself.kymeditation' application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: Error executing adbExec. Original error: 'Command 'E:\\android-sdk-windows\\platform-tools\\adb.exe -P 5037 -s HBSBB18821510293 shell am start -W -n cc.knowyourself.kymeditation/.business.home.HomeActivity -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000' exited with code 4294967295'; Stderr: 'Security exception: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=cc.knowyourself.kymeditation/.business.home.HomeActivity } from null (pid=14487, uid=2000) not exported from uid 10152 java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=cc.knowyourself.kymeditation/.business.home.HomeActivity } from null (pid=14487, uid=2000) not exported from uid 10152 at com.android.server.am.ActivityStackSupervisor.checkStartAnyActivityPermission(ActivityStackSupervisor.java:2028) at com.android.server.am.ActivityStarter.startActivity(ActivityStarter.java:931) at com.android.server.am.ActivityStarter.startActivity(ActivityStarter.java:656) at com.android.server.am.HwActivityStarter.startActivity(HwActivityStarter.java:235) at com.android.server.am.ActivityStarter.startActivityMayWait(ActivityStarter.java:1492) at com.android.server.am.HwActivityStarter.startActivityMayWait(HwActivityStarter.java:430) at com.android.server.am.ActivityStarter.execute(ActivityStarter.java:597) at com.android.server.am.ActivityManagerService.startActivityAndWait(ActivityManagerService.java:5911) at com.android.server.am.ActivityManagerShellCommand.runStartActivity(ActivityManagerShellCommand.java:474) at com.android.server.am.ActivityManagerShellCommand.onCommand(ActivityManagerShellCommand.java:161) at android.os.ShellCommand.exec(ShellCommand.java:103) at com.android.server.am.ActivityManagerService.onShellCommand(ActivityManagerService.java:17786) at android.os.Binder.shellCommand(Binder.java:642) at android.os.Binder.onTransact(Binder.java:540) at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:3570) at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3654) at com.android.server.am.HwActivityManagerService.onTransact(HwActivityManagerService.java:609) at android.os.Binder.execTransact(Binder.java:739)'; Code: '4294967295'

    出现这样的错误一定是因为当前的appActivity设置的不是app首次进入的appActivity

    解决方法:

    获取首次应用的活动名称可以通过 启动一次随机 monkey命令来获取

    adb shell monkey -p 包名 -v -v -v 1

    在把上图中的包名和activity名称复制下来,放到inspector的app配置信息中,再次启动即可

    Python接口自动化测试零基础入门到精通(2023最新版)

  • 相关阅读:
    物联网-电力编辑器(一)
    SecureCRT ssh链接服务器
    应用场景丨迭代市政综合管廊监测系统建设
    负载均衡策略
    资源有限的大型语言模型的全参数微调
    typescript 数据结构
    《优化接口设计的思路》系列:第六篇—接口防抖(防重复提交)的一些方式
    CharacterEncodingFilter的用法
    医学知识和医疗应用开发交叉领域中垂类大语言模型应用相关研究
    wordpress的手工迁移
  • 原文地址:https://blog.csdn.net/dad22211/article/details/134494884