Error running TestNG tests for apk file with different Android versions

0

Hi,

I am trying run a Appium script written in TestNG for a Android Mobile application in device farm.

When I run the test in device farm devices which are running lower version of Android like 6 and 7 run the tests successfully. However the devices runnning OS version 8 and 9 fail.

All the devices fail with the same error

It is impossible to create a new session because 'createSession' which takes HttpClient, InputStream and long was not found or it is not accessible Build info: version: '3.12.0', revision: '7c6e0b3', time: '2018-05-08T14:04:26.12Z' System info: host: 'ip-172-31-13-65', ip: '172.31.13.65', os.name: 'Linux', os.arch: 'amd64', os.version: '3.13.0-139-generic', java.version: '1.8.0_151' Driver info: driver.version: AndroidDriver

I have attached screenshot as well.

Any help on this would be highly appreciated

Edited by: UserDeviceFarm on Jan 10, 2019 3:21 AM

asked 5 years ago247 views
7 Answers
0

Hello,

Could I get a run URL of where your tests are failing so that I can look deeper into this?

Thanks

answered 5 years ago
0

Hi Scott,

Please find the URL of the tests

https://us-west-2.console.aws.amazon.com/devicefarm/home?region=us-east-1#/projects/866204ae-2f1b-4345-b960-144f88e118d7/runs/bb879082-d3ff-442e-925b-feb50203dc36

Could you please look into this issue and let me know. I am trying to complete the execution on Android devices but because of the above issue I am not able to proceed further.

answered 5 years ago
0

Any update on this ?

Thank you for your help in advance.

answered 5 years ago
0

Hi

I pulled your Appium server logs for both android 7 and android 8 devices.
Looks like you are using webview in your tests.

The weview is not getting loaded on Android 8+ devices.

autoWebview: true

On the failed devices (8 and 9) it is not able to fetch web view
Getting process name for webview
2019-01-29 22:35:55:373 - [debug] [ADB] Getting connected devices...
2019-01-29 22:35:55:471 - [debug] [ADB] 1 device(s) connected
2019-01-29 22:35:55:472 - [debug] [ADB] Running '/opt/dev/android-sdk-linux/platform-tools/adb' with args: ["-P",5037,"-s","HT79C1A06060","shell","ps"]
2019-01-29 22:35:55:755 - [debug] [AndroidDriver] Returning process name: 'unknown'
2019-01-29 22:35:55:756 - [debug] [AndroidDriver] Found webviews: ["WEBVIEW_unknown"]

On passed devices (6 and 7)
Getting process name for webview
2019-01-29 22:35:14:106 - [debug] [ADB] Getting connected devices...
2019-01-29 22:35:14:237 - [debug] [ADB] 1 device(s) connected
2019-01-29 22:35:14:237 - [debug] [ADB] Running '/opt/dev/android-sdk-linux/platform-tools/adb' with args: ["-P",5037,"-s","0117113b985a0301","shell","ps"]
2019-01-29 22:35:14:507 - [debug] [AndroidDriver] Parsed pid: '31825' pkg: 'io.ionic.myplacev3' from
2019-01-29 22:35:14:507 - [debug] [AndroidDriver] USER PID PPID VSIZE RSS WCHAN PC NAME
2019-01-29 22:35:14:508 - [debug] [AndroidDriver] u0_a1581 31825 3119 3336420 192196 SyS_epoll_ 0000000000 S io.ionic.myplacev3
2019-01-29 22:35:14:508 - [debug] [AndroidDriver] Returning process name: 'io.ionic.myplacev3'
2019-01-29 22:35:14:509 - [debug] [AndroidDriver] Found webviews: ["WEBVIEW_io.ionic.myplacev3"]
2019-01-29 22:35:14:573 - [debug] [AndroidDriver] Available contexts: ["NATIVE_APP","WEBVIEW_io.ionic.myplacev3"]
2019-01-29 22:35:14:577 - [debug] [AndroidDriver] Connecting to chrome-backed webview context 'WEBVIEW_io.ionic.myplacev3'

Can you try the following things

  1. You have hardcoded platform version as 8.1 in ur tests. can you remove this from your test code
  2. Just wanted to double confirm that you are actually testing a web view ?

Meanwhile we will investigate from our side on the possible rootcause

answered 5 years ago
0

Hi

We have identified that this is an issue on our side (related to adb version we are using). I will discuss with the team and post and ETA for the fix

answered 5 years ago
0

The fix for this has now been deployed to all devices.
Please reopen or create a new post if you face the issue again

answered 5 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions