question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Did not get confirmation UiAutomator2 deleteSession worked; Error was: UnknownError: An unknown server-side error occurred while processing the command. Original error: Trying to proxy a session command without session id

See original GitHub issue

The problem

Appium tests started failing on Mac Mini few weeks ago (maybe months already) with last log error message:

Unable to remove port forward 'Error executing adbExec. Original error: 'Command '/usr/local/Caskroom/android-sdk/3859397\,26.0.2/platform-tools/adb -P 5037 -s 5200fc8bf01b9441 forward --remove tcp\:8200' exited with code 1'; Stderr: 'error: listener 'tcp:8200' not found'; Code: '1''
Did not get confirmation UiAutomator2 deleteSession worked; Error was: UnknownError: An unknown server-side error occurred while processing the command. Original error: Trying to proxy a session command without session id

I tried to reinstall appium server, tried update to 1.8.1 and then also beta, but with no luck, still same issue. When the test fails with this error log, I can see com.appium.uiautomator2.server is still running in process list. Not sure if this may be the cause. Also I noticed, that if I run

adb -P 5037 -s 5200fc8bf01b9441 shell kill -9

with PID of that remaining uiautoamtor2 server manually after the test fails, I get permission denied error. I saw this command in logs, with the same permission denied error message. But I have no clue, why is it missing permissions and what I can do to fix it…

Environment

  • Appium version (or git revision) that exhibits the issue: 1.7.2, 1.8.1, 1.8.2 beta
  • Last Appium version that did not exhibit the issue (if applicable):
  • Desktop OS/version used to run Appium: ProductName: Mac OS X ProductVersion: 10.13.6 BuildVersion: 17G65
  • Node.js version (unless using Appium.app|exe):8.0.0
  • Mobile platform/version under test: Android
  • Real device or emulator/simulator: Real
  • Appium CLI or Appium.app|exe: CLI

Details

I’m running the appium server with

appium --relaxed-security --log-timestamp

Link to Appium logs

https://gist.github.com/risinek/5f19ee4c7600a83cad1409da9e8e8bab

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14

github_iconTop GitHub Comments

3reactions
kolgenpavcommented, Dec 21, 2021

For me the issue was resolved after tested phone restart.

3reactions
SuryakiranPcommented, Jul 2, 2019

I resolved my issue by reinstalling appium.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Did not get confirmation UiAutomator2 deleteSession worked
I tried running the test case but got an error saying “Did not get ... was: Error: Trying to proxy a session command...
Read more >
Issue with installing Appium UIAutomator2 on virtual device
When I run appium-doctor, I don't get any errors what so ever. ... Original error: Trying to proxy a session command without session...
Read more >
Getting Proxy error while running appium test for Android
i am using Appium server 1.9.1, latest SDK and USB debugging already enabled on device but still getting same error.. Also tried after...
Read more >
Server-side error occurred while processing Appium-server
Original error : An unknown server-side error occurred while processing the command. Original error: 'app' option is required for reinstall .
Read more >
Android Emulator app test failing with the error ... - Sauce Labs
When tests fail with this error, the response to the POST session command should give us a clue on the issue. You can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found