Encountering a problem when executing the mobile automation script using Appium

Encountering an issue while running my automation script with Appium.

I'm executing a mobile automation script on a Windows Desktop machine with the following software setup:

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))

Answer №1

Follow these steps to enable registry editing on Windows 10:

  1. Press Win + R to open the run command window

  2. Type in gpedit.msc

  3. Navigate to User Configuration > Administrative Templates > System > Prevent Access to Registry Editing Tools

  4. Double click on it and set it to "disable"

https://i.stack.imgur.com/gkCrF.png

You can also check out other methods to enable registry editing here

Answer №2

Here is the solution that worked for me:

Make sure to select the 'Only For Me' option when installing the Appium Desktop app. Choosing the 'For all users' option may result in errors when running Appium.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Guide on obtaining JSON data in an android application through a PHP file?

I am a beginner in Android development and I have recently created a simple data fetching application. However, I am facing an issue where I am only able to retrieve the value of one variable from my PHP file, even though both variables are present in the ...

The error message displayed in Andriod Studio states that there is an issue converting the value "<br" of type java.lang.String to a JSONObject,

I am currently in the process of developing an android app using Android Studio that involves sending data from a User Registration activity to a database. The goal is for the user to input all the required information, click the register button, and have ...

No Extension Available

I have encountered an issue while using my Android app to upload files on my WAMP server. The files are successfully uploaded onto the server, however, those with spaces in the file name do not have any file extensions. Consequently, every time I attempt t ...

What is the best way to parse JSON data received from an Android device using PHP?

I am having an issue with my android emulator where it is sending a request to a PHP script to access MySQL data. I have checked the PHP script by manually giving values to the SQL query and I can retrieve the data in my Android emulator. However, I am fac ...

Getting started with Codeception may not always be straightforward: [PHPUnitFrameworkException] Error encountered - Element index not defined

After following the Codeception Quick Start instructions diligently, I proceeded to run the initial example test using PhpBrowser... # Codeception Test Suite Configuration # # [further comments omitted] # actor: AcceptanceTester modules: enabled: ...

Could not parse JSON after php file update. Everything was fine before switching to PDO, but now encountering a parsing issue

I encountered an issue where I could log in using a member from the database (MySQL) using Chrome, and create a new user successfully. However, when I tried to use the app, it crashed after attempting to create a new user. After testing some simple PHP co ...

Having trouble with Register/Login functionality in android/PHP?

Hello everyone, I have created a table on 000webhost which includes columns for id, name, username, age, and password. However, I am facing an issue where the username does not appear in the table when the code for registering is executed. I'm unsure ...

Launching a new tab in Google Chrome using Selenium for Facebook login with PHP WebDriver

Hey there! I'm diving into the world of Selenium using Facebook's PHP Webdriver and feeling a bit lost. I've been trying to figure out how to open a new tab in Chrome with this technology, but haven't had any luck. Any insights or tips ...

Using Phonegap for making AJAX requests

Working with Android 2.2, I have my application integrated with phonegap and Sencha. The forms in the app utilize Ajax requests to submit information via email. Everything functions smoothly until the application is wrapped in Phonegap. I have learned th ...

Is there a way to combine two JSON objects within an Android spinner?

After fetching data from my database, is it feasible to combine both objects into a single object? Below is the Android code snippet for retrieving data for a spinner: spinner1 = (Spinner) findViewById(R.id.sp1); final List<String> list1 = ...

Encountering issues with loading the database on the Android application

My challenge lies in using a single database for both an Android application and a website. This setup allows the admin to update the website and app simultaneously through one admin panel. The database, which consists of 15 tables, presents a roadblock ...

Link the application with the nearby MySQL database

Currently, I am utilizing this video tutorial in my attempt to establish a connection between an Android application and a MySQL database hosted locally. The PHP script appears to be functioning correctly when accessed locally through Internet Explorer, ho ...

Uploading video files using XMLHttpRequest encountered an error on a particular Android device

One of our testers encountered an issue where they failed to upload a video file (.mp4) on a specific Android mobile phone. Interestingly, the same file uploaded successfully on an iPhone and another Android device. To investigate further, I attempted to ...

What steps are involved in setting up a RESTful service for a web application?

After extensive searching, I'm still unclear on how to approach the question posed in the title. The concept of RESTful was introduced to me just this morning, and the more I delve into it, the more puzzled I become. A few weeks back, I undertook the ...

Using Selenium to identify and recognize different color patterns

Is it feasible to use Selenium (preferably in combination with PHPUnit Selenium) to detect colors on a webpage? I have banners on my site, and some of them do not reload properly. It's strange because I can access their elements, but all I see on the ...

Transfer image data in JSON format by compressing it into a base64 string from an Android device to a PHP web

I am attempting to upload an image (compressed in base64) as a JSONObject from an Android device to a web service using PHP. I have tried using HttpURLConnection with the POST method. Here is my code in Android: try { JSONObject params = new ...

What is the best way to generate a JSON object in an Android project by merging data from various tables in a MySQL database?

I need help converting the results of my API to a JSON Object using JAVA. Can someone provide guidance on how to achieve this? $sql1="SELECT s.* , c.*,u.* FROM schedule_ s,course_t c, u user_t WHERE c.course_crn=p.course_crn and s.teache ...

Save the .ics file from website onto your Android calendar

I am experiencing an issue with .ics files and my smartphone's calendar. When I create an ICS file and try to download it, I use the following function : function createEventCalendar($start, $end, $description, $location) { $event = array(); ...

Strip the quotes from the JSON output

Need help removing double quotes from my JSON output. Here's the issue: [{"id":"1","nom":"Magasin Jardins 2","ville":"Paris","latlng":["36.85715,10.127245"]} I want to remove quotes from the latlng value to get this result: [36.85715,10.127245] He ...

What is the best way to send a multistring variable as a parameter to PHP?

How can I pass a string variable with multiple values (such as 1,2,3,4) into a PHP script through a URL parameter? Let's consider some PHP code connected to a MySQL server: $id_ = $_GET['id']; $q=mysql_query("SELECT * FROM brain WHERE bra ...