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.

Couldn't use .apks in appium espresso driver

See original GitHub issue

Hi, I saw that in the Readme, we’re allowed to use either .apk or .apks for the app capability, but when I tried to run the test using .apks, I got this error

org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: A new session could not be created. Details: New app path ‘/Users/sakarindra/project/gitlab/marketplace-qa.apks’ did not have extension: .apk

I’m using Appium 1.22.0.

Please advise, thank you!

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
skarindracommented, Nov 8, 2021

@KazuCocoa I tried your solutions with below config :

  • Appium v1.22
  • Appium Espresso Driver v1.48 (from your branch)
  • As for the app, I generated the .apks with Appium keys

the app is successfully installed in my emulator but it seems like the espresso server couldn’t be started, I keep getting error socket hang up and here’s what I got from Appium log

2021-11-08 18:50:44:651 [W3C] Encountered internal error running command: A new session could not be created. Details: Espresso server process has been unexpectedly terminated. Check the Appium server log and the logcat output for more details. Check https://github.com/appium/appium-espresso-driver#troubleshooting regarding advanced session startup troubleshooting. 2021-11-08 18:50:44:651 [W3C] Error: Espresso server process has been unexpectedly terminated. Check the Appium server log and the logcat output for more details. Check https://github.com/appium/appium-espresso-driver#troubleshooting regarding advanced session startup troubleshooting. 2021-11-08 18:50:44:651 [W3C] at Object.errorAndThrow (/usr/local/lib/node_modules/appium/node_modules/appium-support/lib/logging.js:94:35) 2021-11-08 18:50:44:651 [W3C] at condFn (/usr/local/lib/node_modules/appium/node_modules/appium-espresso-driver/lib/espresso-runner.js:283:18) 2021-11-08 18:50:44:651 [W3C] at spin (/usr/local/lib/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:138:26) 2021-11-08 18:50:44:651 [W3C] at spin (/usr/local/lib/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:148:20) 2021-11-08 18:50:44:652 [W3C] at spin (/usr/local/lib/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:148:14) 2021-11-08 18:50:44:652 [W3C] at spin (/usr/local/lib/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:148:14) 2021-11-08 18:50:44:652 [W3C] at spin (/usr/local/lib/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:148:14) 2021-11-08 18:50:44:652 [W3C] at spin (/usr/local/lib/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:148:14) 2021-11-08 18:50:44:652 [W3C] at spin (/usr/local/lib/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:148:14) 2021-11-08 18:50:44:653 [W3C] at spin (/usr/local/lib/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:148:14) 2021-11-08 18:50:44:653 [W3C] at waitForCondition (/usr/local/lib/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:155:10) 2021-11-08 18:50:44:653 [W3C] at EspressoRunner.startSession (/usr/local/lib/node_modules/appium/node_modules/appium-espresso-driver/lib/espresso-runner.js:277:7) 2021-11-08 18:50:44:653 [W3C] at EspressoDriver.startEspressoSession (/usr/local/lib/node_modules/appium/node_modules/appium-espresso-driver/lib/driver.js:320:5) 2021-11-08 18:50:44:653 [W3C] at EspressoDriver.createSession (/usr/local/lib/node_modules/appium/node_modules/appium-espresso-driver/lib/driver.js:190:7) 2021-11-08 18:50:44:653 [W3C] at AppiumDriver.createSession (/usr/local/lib/node_modules/appium/lib/appium.js:387:35) 2021-11-08 18:50:44:657 [HTTP] <-- POST /wd/hub/session 500 41653 ms - 2216 2021-11-08 18:50:44:657 [HTTP]

1reaction
rajdeepvcommented, Nov 6, 2021

We can use .apks with espresso driver. After unzipping .apks, use splits/base-master.apk to get the package and launch activity. Also signing info can be provided by the user to create espresso-server and it will work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

still getting lifecycleEventObserver error when using Espresso ...
I'm stuck for days trying to simply launch an app using Espresso driver with Appium. I'm on a Kotlin \ Gradle project, using...
Read more >
Appium Scripts are failed to Execute while setting ...
So I guess you can do the same thing by finding appium-espresso-driver apk and sign them, then put them back to the original...
Read more >
appium-espresso-driver - npm
Java JDK must be installed and JAVA_HOME environment variable must be set. Android SDK below API 30 requires Java 8. Android SDK 30...
Read more >
What's New in the Perfecto Smart Automation Platform
BlazeMeter University now includes a new Appium 2.0: Fundamentals course. ... For automation testing, you can use the existing capability ...
Read more >
An Overview of Appium's Lesser Known Drivers - HeadSpin
Automate Everything. Learn about some of Appium's less standard drivers. These drivers enable automation of Android apps via the Espresso framework, macOS ...
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