当前位置:网站首页>【Appium踩坑】io.appium.uiautomator2.common.exceptions.InvalidArgumentException: ‘capabilities‘ are mand
【Appium踩坑】io.appium.uiautomator2.common.exceptions.InvalidArgumentException: ‘capabilities‘ are mand
2022-06-26 03:09:00 【青禾tester】
2022年了,这个问题出现概率基本为0.
记录备忘下。
问题原因&解决
1、原因
本地安装 Appium desktop v 1.13版本(06 May 2019)
启动server后就会报错:
[W3C] Encountered internal error running command: A new session could not be created. Details: io.appium.uiautomator2.common.exceptions.InvalidArgumentException: 'capabilities' are mandatory for session creation
Appium issue里有一个针对这个问题的讨论
开发者建议升级到当时最新的beta版 ->
1.14.0-beta.1 (05 Jul 2019)
刚好和我们本地的情况一致,问题基本出在v1.13及之前版本。
2、解决
升级 appium 版本。
1.14.0-beta.1 (05 Jul 2019) 也太旧了,
直接升级到最新的appium版本即可。
Appium release
详细报错
[W3C] Encountered internal error running command: A new session could not be created. Details: io.appium.uiautomator2.common.exceptions.InvalidArgumentException: 'capabilities' are mandatory for session creation
[W3C] io.appium.uiautomator2.common.exceptions.SessionNotCreatedException: io.appium.uiautomator2.common.exceptions.InvalidArgumentException: 'capabilities' are mandatory for session creation
[W3C] at io.appium.uiautomator2.handler.NewSession.safeHandle(NewSession.java:59)
[W3C] at io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:38)
[W3C] at io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:252)
[W3C] at io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:242)
[W3C] at io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:44)
[W3C] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
[W3C] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
[W3C] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
[W3C] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
[W3C] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
[W3C] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
[W3C] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
[W3C] at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:435)
[W3C] at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
[W3C] at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)
[W3C] at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:250)
[W3C] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
[W3C] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
[W3C] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
[W3C] at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1294)
[W3C] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
[W3C] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
[W3C] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:911)
[W3C] at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
[W3C] at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:611)
[W3C] at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:552)
[W3C] at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:466)
[W3C] at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438)
[W3C] at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:140)
[W3C] at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
[W3C] at java.lang.Thread.run(Thread.java:923)
[W3C] Caused by: io.appium.uiautomator2.common.exceptions.InvalidArgumentException: 'capabilities' are mandatory for session creation
[W3C] at io.appium.uiautomator2.handler.NewSession.safeHandle(NewSession.java:47)
[W3C] ... 30 more
[W3C]
[HTTP] <-- POST /wd/hub/session 500 6459 ms - 3708
边栏推荐
- 【读点论文】FBNetV3: Joint Architecture-Recipe Search using Predictor Pretraining 网络结构和超参数全当训练参数给训练了
- Types and application methods of screen printing
- Qt 中 deleteLater 使用总结
- Record a torture bug caused by restcontrol and controller
- The role of children's programming in promoting traditional disciplines in China
- 工业机器人之“慧眼”——机器视觉
- UE5全局光照系统Lumen解析与优化
- Worm copy construction operator overload
- [hash table] improved, zipper hash structure - directly use two indexes to search, instead of hashing and% every time
- 【论文笔记】Deep Reinforcement Learning Control of Hand-Eye Coordination with a Software Retina
猜你喜欢

论文回顾:Unmixing-Based Soft Color Segmentation for Image Manipulation

Xiaomi TV's web page and jewelry's web page

Overview of orb-slam3 paper

Learn Tai Chi Maker - mqtt (IV) server connection operation

经典模型——ResNet

Kotlin quick start

经典模型——AlexNet

todolist未完成,已完成

Group note data representation and operation check code
HL7Exception: Can‘t XML-encode a GenericMessage. Message must have a recognized struct
随机推荐
【论文笔记】Deep Reinforcement Learning Control of Hand-Eye Coordination with a Software Retina
On virtual memory and oom in project development
Where is it safe to open a fund account?
Hardware creation principle of campus maker space
P2483-[模板]k短路/[SDOI2010]魔法猪学院【主席树,堆】
数字孪生智慧水务,突破海绵城市发展困境
Partition, column, list
【QT】自定义控件-开关
Problems encountered in project deployment - production environment
虫子 拷贝构造 运算符重载
P2483-[template]k short circuit /[sdoi2010] Magic pig college [chairman tree, pile]
Literature reading --- optimize RNA SEQ research to study herbicide resistance (review)
【哈希表】改进,拉链法哈希结构——直接用两个索引查找,不用每次都hash和%一遍
USB driver -debug
显卡、GPU、CPU、CUDA、显存、RTX/GTX及查看方式
Multimedia elements, audio, video
js array数组json去重
文献阅读---优化RNA-seq研究以研究除草剂耐药性(综述)
Is it safe to open a fund account? How to apply
Golang regexp package use - 06 - other usage (Special Character conversion, find regular Common prefix, Switch gourmand mode, query regular Group NUMBER, query regular Group name, cut with regular, qu