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.

settings_apk-debug.apk: No such file or directory

See original GitHub issue

The problem

I am a newbie in the Appium, and I get such error while trying to start a session through the Appium Inspector: Failed to create a session. An unknown server-side error occurred while processing the command.

Original error: Error executing adbExec.
 Original error: 'Command 'C:\\Users\\xukin\\AppData\\Local\\Android\\Sdk\\platform-tools\\adb.exe -P 5037 -s emulator-5554 install -g C:\\Windows\\system32\\node_modules\\appium-uiautomator2-driver\\node_modules\\io.appium.settings\\apks\\settings_apk-debug.apk' exited with code 1'; 
Command output: 
adb: failed to stat C:\Windows\system32\node_modules\appium-uiautomator2-driver\node_modules\io.appium.settings\apks\settings_apk-debug.apk: No such file or directory

Capabilities:

{
  "platformName": "Android",
  "appium:platformVersion": "12",
  "appium:deviceName": "Pixel XL",
  "appium:app": "C:/Users/xukin/OneDrive/Документы/app-release.apk",
  "appium:automationName": "UIAutomator2",
  "appium:udid": "emulator-5554"
}

I looked at this path, and the file was there(file). Does someone know what the problem is?

Environment

  • Appium version: 2.0.0-beta.44
  • OS: Windows 11 Pro
  • Node.js: 16.13.1
  • Emulator:
    Device name: Pixel XL; Platform name: Android; Platform version: 12; Automation name: UIAutomator2; API version: 31

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
Vadym1123456commented, Oct 21, 2022

Sorry I am kind of new here, but: When you say "I installed whatever-apk manually. Where do you install it from?? Where do I look for it?

This file is located in C:\Windows\system32\node_modules\appium-uiautomator2-driver\node_modules\appium-uiautomator2-server\apks\

Your error log should have recorded this path

0reactions
Vadym1123456commented, Oct 21, 2022

Hi, I had the same problem. I solved this the following, I installed this apk (settings_apk-debug.apk) manually. Also, after this will be a problem with another apk and you should also install it manually. You should copy apk what you need to the directory with short path, for example: C:\Users\{yourAcaunt}\Downloads\settings_apk-debug.apk And than you need to enter in cmd the next: C:\\Users\\xukin\\AppData\\Local\\Android\\Sdk\\platform-tools\\adb.exe -P 5037 -s emulator-5554 install -g C:\Users\{yourAccouunt}\Downloads\settings_apk-debug.apk I think this problem connects to the long path to apk or adb.

Thanks, the previous error disappeared, but right now I start to get a new one. I reinstall it manually, as settings_apk-debug.apk file, but it doesn’t work. Here are images: first_file, second_file. Failed to create session. An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command 'C:\\Users\\xukin\\AppData\\Local\\Android\\Sdk\\platform-tools\\adb.exe -P 5037 -s emulator-5554 install -r --no-incremental C:\\Windows\\system32\\node_modules\\appium-uiautomator2-driver\\node_modules\\appium-uiautomator2-server\\apks\\appium-uiautomator2-server-v5.7.0.apk' exited with code 1'; Command output: adb: failed to stat C:\Windows\system32\node_modules\appium-uiautomator2-driver\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v5.7.0.apk: No such file or directory

I had the same problem after installing settings_apk-debug.apk manually, but after I installed this I didn’t have the same problem as you. Maybe you need to update all and reinstall. Also, I see that you run another script that you have in the log (install -r --no-incremental). Try will run like this code {youPath}\\adb.exe -P 5037 -s emulator-5554 install -r --no-incremental C:\\{youPath}\\appium-uiautomator2-server-v5.7.0.apk

I fixed the first error of settings_apk-debug.apk Now I am getting this second error exactly like him appium-uiautomator2-server-v5.7.0.apk I am trying to put in cmd what you told in the comment but not working. Could you detail the steps you talk about please just to make sure I am doing it good.

You should find this file (C:\Windows\system32\node_modules\appium-uiautomator2-driver\node_modules\appium-uiautomator2-server\apks\) and put it in another folder with a short path. This helped me. It is the same solution that was in the first step. I really want to help but I didn’t do anything else ) I just took the file put it in the folder with a short path and run a command that was in the error log on cmd ADB.

Read more comments on GitHub >

github_iconTop Results From Across the Web

adb: failed to stat app/build/outputs/apk/app-debug.apk: No ...
apk : No such file or directory - Stack Overflow. Stack Overflow for Teams – Start collaborating and sharing organizational knowledge.
Read more >
XA0137: The 'run-as' command failed with 'run-as: couldn't stat ...
demo: No such file or directory '. Hi all,. My app not installing in release mode, Even I tried generating apk and installing...
Read more >
Known issues with Android Studio and Android Gradle Plugin
This page tracks known issues with Android Studio Dolphin | 2021.3.1 and Android Gradle plugin 7.3.1. If you experience an issue not already...
Read more >
Appium APK deployment fails: no such file or directory - Support
However, I'm now trying to test this using Appium but failing to even get the APK to deploy. I can see it uninstalls...
Read more >
[Solved]-adb: failed to stat app/build/outputs/apk/app-debug.apk
Coding example for the question adb: failed to stat app/build/outputs/apk/app-debug.apk: No such file or directory-React Native.
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