Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] UiAutomation not connected #116

Open
1 of 2 tasks
mylove132 opened this issue Jan 17, 2024 · 1 comment
Open
1 of 2 tasks

[Bug] UiAutomation not connected #116

mylove132 opened this issue Jan 17, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@mylove132
Copy link

mylove132 commented Jan 17, 2024

Search before asking

  • I searched in the issue and found nothing similar. | 我查找了并确认issue列表无相似报告。

Sonic version

v2.6.3

Deploy platform

mac

Minimal reproduce step

io.appium.uiautomator2.server.test.AppiumUiAutomator2Server:
[sonic-driver-core] 2024-01-17 13:00:28 [ERROR] start session failed.
[sonic-driver-core] 2024-01-17 13:00:28 [ERROR] cause: ErrorMsg(error=session not created, message=java.lang.IllegalStateException: UiAutomation not connected, UiAutomation@2853e6f[id=-1, flags=0], traceback=io.appium.uiautomator2.common.exceptions.SessionNotCreatedException: java.lang.IllegalStateException: UiAutomation not connected, UiAutomation@2853e6f[id=-1, flags=0]
	at io.appium.uiautomator2.handler.NewSession.safeHandle(NewSession.java:60)
	at io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:59)
	at io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:267)
	at io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:261)
	at io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:68)
	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.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:266)
	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.processSelectedKeysOptimized(NioEventLoop.java:552)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:466)
	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:930)
Caused by: java.lang.IllegalStateException: UiAutomation not connected, UiAutomation@2853e6f[id=-1, flags=0]
	at android.app.UiAutomation.throwIfNotConnectedLocked(UiAutomation.java:1518)
	at android.app.UiAutomation.setOnAccessibilityEventListener(UiAutomation.java:445)
	at androidx.test.uiautomator.QueryController.<init>(QueryController.java:95)
	at androidx.test.uiautomator.UiDevice.<init>(UiDevice.java:109)
	at androidx.test.uiautomator.UiDevice.getInstance(UiDevice.java:261)
	at io.appium.uiautomator2.utils.Device.getUiDevice(Device.java:34)
	at io.appium.uiautomator2.core.UiAutomatorBridge.getUiAutomation(UiAutomatorBridge.java:53)
	at io.appium.uiautomator2.core.UiAutomation.<init>(UiAutomation.java:32)
	at io.appium.uiautomator2.core.UiAutomation.getInstance(UiAutomation.java:37)
	at io.appium.uiautomator2.model.NotificationListener.<init>(NotificationListener.java:43)
	at io.appium.uiautomator2.model.NotificationListener.getInstance(NotificationListener.java:48)
	at io.appium.uiautomator2.model.settings.EnableNotificationListener.getValue(EnableNotificationListener.java:31)
	at io.appium.uiautomator2.model.settings.EnableNotificationListener.getValue(EnableNotificationListener.java:21)
	at io.appium.uiautomator2.model.settings.AbstractSetting.reset(AbstractSetting.java:57)
	at io.appium.uiautomator2.model.settings.Settings.resetForNewSession(Settings.java:71)
	at io.appium.uiautomator2.handler.NewSession.safeHandle(NewSession.java:52)
	... 34 more
)

Are you willing to submit a PR?

  • I'm willing to submit a PR! | 我将发起PR!
@mylove132 mylove132 added the bug Something isn't working label Jan 17, 2024
@ZhouYixun
Copy link
Member

what is your device system?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants