Appium desktop issue on Ubuntu - appium

I've been trying to solve this issue for two weeks and cannot seem to find a solution, it only happens on Appium desktop with automationName set to UiAutomator.
I changed ownership of the /tmp folder from Root to user and set permissions to 777 but still facing the issue: I cannot change the file's permission since it's a temp folder and its name keeps changing every time I run a new appium session.
This is the error message:
An unknown server-side error occurred while processing the command. Original error: The application at '/tmp/.mount_app.Ap8xEj5P/resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk' is not writeable. Please grant write permissions to this file or to its parent folder '/tmp/.mount_app.Ap8xEj5P/resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks' for the Appium process, so it could sign the application

You could try to grant permission on /users/username/node_modules, /usr/local or /usr/bin. I ran in the same problem while trying to use UIAutomator2 on macOS and granting permissions gradually. Also, if you have the latest version of Appium, you need to switch to UIAutomator2, starting v12.1 UIAutomator is no longer supported.
Another hint: don't mix UIAutomator with UIAutomator2, check that you are trying to launch with correct capabilities

This bug plagued me for weeks before resolving it. The issue ended up being my Java version. I did NOT have to modify signing or read / write privileges on the file in question.
JAVA_HOME and Path environment variables were both pointing to Java 12. I needed to install jdk_1.8.0 for Java 8, and update JAVA_HOME and Path to point to Java 8. More info and possible solutions can be found on my GitHub issue that I opened with Appium devs:
https://github.com/appium/appium-desktop/issues/1080

Related

The flutter tool cannot access the file or directory. Unable to grant read/write permissions for the current user

This is the first time I am installing flutter on the mac. I have followed all the steps that are told in flutter.dev. After setting up the path in .zshrc, I get this strange error.
The flutter tool cannot access the file or directory.
Please ensure that the SDK and/or project is installed in a location that has
read/write permissions for the current user.
This is the .zshrc file looks like.
After running flutter doctor getting this.
Thanks in advance.
I encountered this issue when moving my project from windows to a Mac folder. It seems to be an issue with some extended attributes. Using the below command worked for me.
sudo xattr -c -r <project_folder_path>
I'm not sure about this but try it. go to the folder where you installed Flutter, click the folder with to fingers which will show options. got to {Get info} look down at the Sharing & Permission, make sure your current user has read and write.
I just hope this will fix your problem

This app is blocked message when using gActions CLI

I downloaded gActions CLI on windows x64 bit machine. after issuing the login command and pasting the the browser link i get the below error:
This app is blocked
This app tried to access sensitive info in your Google Account. To keep your account safe, Google blocked this access.
Was having the same issue when I downloaded the gactions script manually from this page.
I was able to resolve the issue when I instead downloaded the utility from npm:
npm i -g #assistant/gactions
Solution for Mac/Linux system, not verified on Windows.
You have to provide proper permissions while running the command.
Example : - sudo gactions login
This worked for me too, but only after I deleted the gactions.exe file I had earlier downloaded (and had set a path environment variable for).
This worked for me
gactions login --actions-builder-only
I installed on an M1 Mac using brew install gactions

React Native - launchPackager.command cant be opened

I am having trouble building react native ios project.
Error message:
"launchPackage command" can't be opened because it is from an unidentified developer.
Any idea how to fix this?
Although this answer will most likely work, you would also allow all future apps from unidentified developers to be installed without being prompted.
To allow executing only the command in question (launchPackager.command), go to your react-native installation folder (most likely node_modules/react-native/scripts) in Finder and right-click launchPackager.command, choose Open and confirm by clicking Open again.
You will not be prompted again for this command as you have allowed execution specifically.
Another simple way is to delete node_modules folder from project directory and do npm install.
This happened because project was copied from old mac which had node_modules folder created by that old mac user, hence some problem occurs for project transferred to new mac.
Had the same problem on macOS Mojave.
This helped:
chmod 777 node_modules/react-native/scripts/launchPackager.command
on MacOS Catalina and above
Go to
System Preferences
Security & Privacy
Choose tab "Privacy"
Select "Developer Tools" on left pane
Check "Terminal" to allow terminal to run software locally which does not meet system's security policy . (please be aware of potential implications of this action and make sure that you know what you are doing )
Go to
System Preferences
Security & Privacy
Choose tab General
Choose Allow apps downloaded from anywhere or Allow apps downloaded from App Store and identified developers
I had the same error with you and this method worked for me.
chmod 777 node_modules/react-native/scripts/launchPackager.command
open terminal and Run the above command
after that Run the react-native run-android
Works for Me, It will Run :)
The reason is because you downloaded source code using virtual machine.
Solution:
Please download source code at your real machine.
And then copy it at VM, and build this project.

updated AIR SDK from 23 to 25 and i get error Error: Unable to access jarfile /../lib/mxmlc-cli.jar

I have just updated my AIR SDK from version 23 to 25.
When running the command mxmlc, the following error occurs:
Error: Unable to access jarfile /../lib/mxmlc-cli.jar
Solution 1:
Make sure you have downloaded the Flex SDK and not the AIR SDK.
In the download page, there's link specifying:
Flex users will need to download the original AIR SDK without the new compiler.
Solution 2:
When the Adobe AIR SDK is installed it is sometimes installing files with wrong permissions.
The mxmlc-cli.jar file your lib directory probably has a permissions issue.
Try giving this file full permission and making sure it's not read only and everything should work fine.
If you are using Windows, just right click the files and set up the proper permissions in the security tab, and make sure the file is not read only.
If you are using Unix / Linux, run the following:
$ su -
# cd [AIRSDK install directory]
# chmod -R go+rx *
If you are using Mac OS:
Click the mxmlc-cli.jar file or to select it.
From the File menu, select Get Info. One of the windows shown below
appears. Click the disclosure triangle next to Sharing & Permissions
to display the file's permissions.
Click the lock and authenticate with an administrator account. Use
the menus next to users and groups to change the permissions.
This is an old one, but I've faced this problem several times and the fix is really minor.
You have to edit mxmlc or compile.
In the file there is a row which should be changed to:
SCRIPT_HOME=`dirname "$0"`
The error comes from missing " " around the $0.

Cordova and ios-deploy causes builds to fail with "codesign exit code 1"/ "permission denied"

I'm working on a Cordova based mobile application, and wanted to make use of the Cordova CLI's ability to deploy and run my mobile app right from the command line, without having to go into XCode to do the build
When doing:
cordova run ios --device
Cordova graciously tells you that you should install the ios-deploy node module. I did so following the steps on their GIT site.
When I next tried to do a run, I started to get codesign errors, specifically:
/Users/blahblah/platforms/ios/build/device/myApp.app: Permission denied
Command /usr/bin/codesign failed with exit code 1
I couldn't get the code signing to work from Terminal, and worse, going back into XCode resulted in the same error!
Fortunately the error messages says it all: permission denied; I was able to correct this by popping back into Terminal and running a chmod on my entire app folder, i.e.:
chmod -R a+rwx myApp
I could then go back into XCode and get the project building and deploying again (whew!), however if I tried to do the deploy via the Cordova CLI, then same issue would occur.
It seems like the ios-deploy and / or cordova is messing around with the folder permissions, but I'm not sure how to correct this.
Any suggestions would be appreciated!
UPDATE:
To be clear, I am able to successfully sign the app within XCode if I first go into Terminal, and then into the platforms/ios folder and perform a chmod -R a+rwx on the "www" folder.
The problem I'm having is trying to get this to build / sign successfully from the command line.
I've done some further diagnosis, and it seems that the problem is with the Cordova CLI itself, and not with ios-deploy; when I execute:
cordova prepapre
It copies my "www" folder over to the "platforms/ios/www", however it changes the permissions when doing so from everyone having write access (i.e.: drwxrwxrwx) to only my user having write access i.e.: (drwxr-xr-x)
It seems that this is fouling up the codesign application, and is causing my permission denied errors above.
I'm just hoping someone knows how I can work around this, or what I might be doing wrong with my build - I'd prefer not to have to go into XCode to do these builds.
So it turns out that the Cordova CLI is working just fine, as is the ios-deploy npm package.
The problem turns out to be within the solution itself, and has nothing to do with the tools.
I am using the Ionic framework within this particular Cordova application, and their framework installs some "after_prepare" hooks (within the hooks folder) which attempt to help prepare / clean up some extraneous files prior to the build.
One of these hooks (named "020_remove_sass_from_platform.js") was trying to help out by cleaning up unneeded SASS files prior to the build in order to reduce the size of the compiled app.
Unfortunately this hook was adjusting the folder permissions (I guess in order to ensure the delete could succeed), and this was the cause of the "www" folder's permissions changing during a "cordova prepare".
I deleted the hooks, and now the Cordova CLI builds and signs the APK as expected, and the ios-deploy package pushes it to the device, all without using XCode.
Hope this can be of some help to someone else.
Check the CODE_SIGN_IDENTITY property in your build settings. Is your provisioning profile selected there?
You also need to enter a valid bundle identifier in your apps .plist.
The identifier has to match the one you provided when generating the profile.
Try this
sudo npm install -g ios-deploy --unsafe-perm

Resources