当前位置:网站首页>[appium stepping pit] io appium. uiautomator2. common. exceptions. InvalidArgumentException: ‘capabilities‘ are mand

[appium stepping pit] io appium. uiautomator2. common. exceptions. InvalidArgumentException: ‘capabilities‘ are mand

2022-06-26 03:38:00 Qinghe tester

2022 Years. , The probability of this problem is basically 0.
Take notes .

Question why & solve

1、 reason

Local installation Appium desktop v 1.13 edition (06 May 2019)
start-up server After that, it will report a mistake :

[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 There is a discussion on this issue in
Developers suggest upgrading to the latest version at that time beta edition ->
1.14.0-beta.1 (05 Jul 2019)

Just in line with our local situation , The problem is basically v1.13 And previous versions .

2、 solve

upgrade appium edition .
1.14.0-beta.1 (05 Jul 2019) It's too old ,
Upgrade directly to the latest appium Version can .
Appium release

Detailed error report

[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
原网站

版权声明
本文为[Qinghe tester]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/177/202206260309365640.html