51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 2292|回复: 6
打印 上一主题 下一主题

[已解决-使用] 安卓手机调试,执行就报错。

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2019-4-9 18:16:19 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
问题求助
问题描述及重现步骤: Log:An unknown server-side error occurred while processing the command. Original error: java.lang.SecurityException: Injecting to another application requires INJECT_EVENTS permission
at android.os.Parcel.readException(Parcel.java:1599)
at android.os.Parcel.readException(Parcel.java:1552)
at android.app.IUiAutomationConnection$Stub$Proxy.injectInputEvent(IUiAutomationConnection.java:273)
at android.app.UiAutomation.injectInputEvent(UiAutomation.java:440)
at android.support.test.uiautomator.UiAutomatorBridge.injectInputEvent(UiAutomatorBridge.java:86)
at android.support.test.uiautomator.GestureController.performGesture(GestureController.java:150)
at android.support.test.uiautomator.UiObject2.click(UiObject2.java:343)
at io.appium.uiautomator2.model.UiObject2Element.click(UiObject2Element.java:45)
at io.appium.uiautomator2.handler.Click.safeHandle(Click.java:40)
at io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:56)
at io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:208)
at io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:199)
at io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:44)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:435)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:250)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1294)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:911)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:611)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:514)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:468)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:140)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
at java.lang.Thread.run(Thread.java:818)

----------------------------------
问题类型: Android测试 
TW版本:
被测应用的名称和版本:
本帖最后由 TestWriter 于 2019-4-18 09:43 编辑

Log:An unknown server-side error occurred while processing the command. Original error: java.lang.SecurityException: Injecting to another application requires INJECT_EVENTS permission
        at android.os.Parcel.readException(Parcel.java:1599)
        at android.os.Parcel.readException(Parcel.java:1552)
        at android.app.IUiAutomationConnection$Stub$Proxy.injectInputEvent(IUiAutomationConnection.java:273)
        at android.app.UiAutomation.injectInputEvent(UiAutomation.java:440)
        at android.support.test.uiautomator.UiAutomatorBridge.injectInputEvent(UiAutomatorBridge.java:86)
        at android.support.test.uiautomator.GestureController.performGesture(GestureController.java:150)
        at android.support.test.uiautomator.UiObject2.click(UiObject2.java:343)
        at io.appium.uiautomator2.model.UiObject2Element.click(UiObject2Element.java:45)
        at io.appium.uiautomator2.handler.Click.safeHandle(Click.java:40)
        at io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:56)
        at io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:208)
        at io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:199)
        at io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:44)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
        at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:435)
        at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)
        at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:250)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1294)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:911)
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:611)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:514)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:468)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438)
        at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:140)
        at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
        at java.lang.Thread.run(Thread.java:818)

----------------------------------

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

  • TA的每日心情
    开心
    2017-9-22 13:43
  • 签到天数: 7 天

    连续签到: 1 天

    [LV.3]测试连长

    2#
    发表于 2019-4-12 09:59:01 | 只看该作者
    TW版本号是?安卓版本号是?
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    奋斗
    6 小时前
  • 签到天数: 1801 天

    连续签到: 5 天

    [LV.Master]测试大本营

    3#
    发表于 2019-4-12 10:12:07 | 只看该作者
    是应用没有加权限?
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    开心
    7 天前
  • 签到天数: 473 天

    连续签到: 2 天

    [LV.9]测试副司令

    5#
    发表于 2019-4-12 10:49:47 | 只看该作者
    权限不足的
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    慵懒
    2022-7-23 11:23
  • 签到天数: 316 天

    连续签到: 1 天

    [LV.8]测试军长

    6#
    发表于 2019-4-12 10:54:14 | 只看该作者
    手机需要root权限吧
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    奋斗
    8 小时前
  • 签到天数: 2812 天

    连续签到: 5 天

    [LV.Master]测试大本营

    7#
    发表于 2019-4-12 10:59:33 | 只看该作者
    感觉权限问题
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

    站长推荐上一条 /1 下一条

    小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

    GMT+8, 2024-11-15 15:51 , Processed in 0.074391 second(s), 24 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

    快速回复 返回顶部 返回列表