Starting session in Appium - android

While starting a session in Appium, I am getting below error:
Error:
An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command 'C:\Users\satyajit.more\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 install 'E:\Appium Setup\MobileInsurance_QA_16062018.apk'' exited with code 1'; Stderr: 'adb: failed to install E:\Appium Setup\MobileInsurance_QA_16062018.apk: Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]'; Code: '1'
Have configured an emulator using the android studio, but am unable to install the app on the emulator, How can we resolve this?

The apk file you are trying to install is incompatible with the device hardware. You would get the same error even if you install the apk manually on the device. Check this thread for more information.

Related

I am trying to run flutter app without debuuger but everytime i face this error in VS code

Parameter format not correct -
Running Gradle task 'assembleDebug'... 793.6s
√ Built build\app\outputs\flutter-apk\app-debug.apk.
cmd: Can't find service: activity
Installing build\app\outputs\flutter-apk\app.apk... 6.1s
Error: ADB exited with exit code 1
Performing Streamed Install
adb: failed to install C:\flutter project\seoondproject\build\app\outputs\flutter-apk\app.apk: cmd: Can't find service: package
Error launching application on sdk gphone x86.

react-native - 'adb' is not recognized as an internal or external command

This is my first react native setup. I started to build with react-native run android and got BUILD SUCCESSFUL in 4m 7s message.
Then the CLI script tried:
info Connecting to the development server...
warn Failed to connect to development server using "adb reverse": spawnSync adb ENOENT
info Starting the app...
'adb' is not recognized as an internal or external command,
operable program or batch file.
error Failed to start the app.
Error: Command failed: adb shell am start -n com.notez/com.notez.MainActivity
at makeError (S:\Projects (my)\notez\node_modules\execa\index.js:174:9)
at Function.module.exports.sync (S:\Projects (my)\notez\node_modules\execa\index.js:338:15)
But I had settled everything up. ADB and SDK paths are defined in my OS ENV config.
So I tried to execute the failed code above on another console:
adb shell am start -n com.notez/com.notez.MainActivity
Then it worked! How can I define the 'adb' as an internal or external command as the error refers?
I changed the enviroment variable ANDROID_HOME value from C:\Users\User\AppData\Local\Android\Sdk\ to C:\Users\User\AppData\Local\Android\Sdk\platform-tools\ and it worked...

React Native: react-native run-android is not starting Android emulator

I am starting to build an Android application using React Native. But when I tried to run the application using "react-native run-android" command, it runs into a problem. This is what I have done so far.
I installed the react-native command line running the following commands
npm install -g react-native-cli
Then I created the react-native project running the following command.
react-native init {ProjectName}
At this point, I already have the Andriod Studio installed I have been doing the native Android development. So, I opened the Android Studio and started an emulator.
Then within the React Native project, I run the following command to start the project.
react-native run-android
Then I got the following error.
$ react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 903 file(s) to forward-jetify. Using 8 workers...
info JS server already running.
'adb' is not recognized as an internal or external command,
operable program or batch file.
info Launching emulator...
error Failed to launch emulator. Reason: No emulators found as an output of `emulator -list-avds`.
warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.
info Installing the app...
> Task :app:installDebug
Installing APK 'app-debug.apk' on 'Pixel_XL_API_30_2(AVD) - 11' for app:debug
Installed on 1 device.
BUILD SUCCESSFUL in 6s
29 actionable tasks: 2 executed, 27 up-to-date
info Connecting to the development server...
warn Failed to connect to development server using "adb reverse": spawnSync adb ENOENT
info Starting the app...
'adb' is not recognized as an internal or external command,
operable program or batch file.
error Failed to start the app.
Error: Command failed: adb shell am start -n com.testreactnative/com.testreactnative.MainActivity
In an attempt to fix that, I added the following environment user variables pointing to the right location.
JAVA_HOME: C:\Program Files\Android\Android Studio\jre\jre
ANDROID_HOME: C:\AndroidSDK
Then I tried running the command again. It is still throwing the same error. What's wrong with my configuration and how can I fix it?
You see this error in console that says 'adb' is not recognized as an internal or external command,
This means that adb path is not added in Environment Variables
My adb path is = C:\Users\karti\AppData\Local\Android\Sdk\platform-tools
Find yours and add it to Path in Environment Variables

Getting error while running Mobile automation script in appium

Getting error while running automation script in appium.
I am running a Mobile automation script on a Windows Desktop system with below software set up.
Software Set-Up:
1.Android Studio
2.Appium
3.Mobile/Tablet connected to the system
4.Selenium/Appium Driver code for Automation
Error
apksigner stderr: ERROR: Registry editing has been disabled by your administrator.
Exception in thread "main" java.nio.file.AccessDeniedException: C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk
Cannot use apksigner tool for signing. Defaulting to sign.jar. Original error: Command 'apksigner.bat sign --key 'C:\\Program Files\\Appium\\resources\\app\\node_modules\\appium\\node_modules\\appium-adb\\keys\\testkey.pk8' --cert 'C:\\Program Files\\Appium\\resources\\app\\node_modules\\appium\\node_modules\\appium-adb\\keys\\testkey.x509.pem' 'C:\\Program Files\\Appium\\resources\\app\\node_modules\\appium\\node_modules\\appium-uiautomator2-server\\apks\\appium-uiautomator2-server-debug-androidTest.apk'' exited with code 1; StdErr: ERROR: Registry editing has been disabled by your administrator.
[warn] [35m[ADB][39m Exception in thread "main" java.nio.file.AccessDeniedException: C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk
Unable to remove port forward 'Error executing adbExec. Original error: 'Command 'C\:\\Users\\Sumit.Chouhtel\\AppData\\Local\\Android\\sdk\\platform-tools\\adb.exe -P 5037 -s RFXTBIC00014974 forward --remove tcp\:8200' exited with code 1'; Stderr: 'adb.exe: error: listener 'tcp:8200' not found'; Code: '1''
[debug] [35m[BaseDriver][39m Event 'newSessionStarted' logged at 1568214375516 (20:36:15 GMT+0530 (India Standard Time))
Try to enable registry editing using these steps (assuming you have Windows 10)
Win + R (To open run commander window)
run gpedit.msc
Go to User Configuration > Administrative Templates > System > Prevent Access to Registry Editing Tools
Double click and set it to "disable"
Addition ways to achieve this https://www.techperiod.com/registry-edit-disabled-by-virus-fix/
I have got the below solution:
Need to click option as 'Only For Me' while installing the Appium Desktop app. (If we select 'For all users' option than there will be error in appium run).

Cordova run with Ubuntu 14.04

I'm making an Android app with the framework Cordova. It's all right until the command "cordova run". The terminal gives me this error:
ERROR: Failed to launch application on device: ERROR: Failed to install apk to device: pkg: /data/local/tmp/MainActivity-debug.apk
Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]
rm failed for -f, No such file or directory
ERROR running one or more of the platforms: Error: /home/francesco/hello/platforms/android/cordova/run: Command failed with exit code 8
You may not have the required environment or OS to run this project
francesco#francesco:~/hello$ adb devices
List of devices attached
LGOTMS79a92e5a device
I'm using Ubuntu 14.04. Thank you in advance for the help.

Categories

Resources