An error occurred: Command failed: ./gradlew lib:uploadArchives - walmart-electrode

When i execute the command ern run-android getting following error
An error occurred: Command failed: ./gradlew lib:uploadArchives
Also it doesn't generate android folder as it got created while creating application through react native
Gradle updated and exported as well
Error should be get resolved

Electrode : When execute the command ern run-android getting following error An error occurred: Command failed: ./gradlew lib:uploadArchives error is got resolved.
Following are the steps to resolve the error:
1. open the terminal and type sudo su to become the root user
2. Install the gradle
3. Edit the ~/.bashrc and add the followings
export ANDROID_SDK_ROOT=/home/$USER/Android/Sdk # comment you can also change the $USER with your username or can set the path where you have installed Android
export PATH=$PATH:$ANDROID_SDK_ROOT/emulator
export PATH=$PATH:$ANDROID_SDK_ROOT/tools
export PATH=$PATH:$ANDROID_SDK_ROOT/tools/bin
export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools
export PATH=$PATH:$ANDROID_SDK_ROOT/build-tools
also optional in case still getting error add following line as well (Set gradle pat according to instllation in your system)
GRADLE_HOME=/opt/gradle
export PATH=$PATH:$GRADLE_HOME/gradle5.5
Save the file
Reboot the system
Login with root user into the terminal and execute following command once
after connecting the mobile device
$ adb devices
now run the ern run-android command

Related

Intern on IOS - Unable to launch WebDriverAgent because of xcodebuild failure: not found: carthage

When I am running Intern Standalone
staring appium and then Running Intern Script Script perfectly works
By when I Run same using java Program at that time it gives issue
UnknownError: [POST http://localhost:65505/wd/hub/session / {"desiredCapabilities":{"name":"DS/tests/intern.js","idle-timeout":60,"platformName":"iOS","deviceName":"iPhone 6","bundleId":"com.apple.mobilesafari","automationName":"XCUITest","Simulator":true}}] An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent because of xcodebuild failure: not found: carthage
at Server.createSession
Carthage is installed correctly
Is there any access issue to it
Please please help
Problem with Carthage Folder, Check in below path /Applications/Appium.app/Contents/Resources/app/node_modules/appium-webdriveragent
Carthage Folder
If it is not there, Follow Below steps
Step-1: For Appium 1.15.1 and above
Open below path in Terminal
$ cd /Applications/Appium.app/Contents/Resources/app/node_modules
$ sudo chmod -R 777 . appium-webdriveragent/*
Step-2: goto
1) $ cd /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent
2) sudo mkdir -p Resources/WebDriverAgent.bundle
3) sudo sh ./Scripts/bootstrap.sh -d
Step-3: Build WebDriverAgent Project with sign
Open below project in XCode
/Applications/Appium.app/Contents/Resources/app/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj

How to install "test apk" on actual device with appium?

How can I install an app with "-t: Allow test APKs to be installed." using appium.
i am getting the following error:
MJSONWP] Encountered internal error running command: Error: Remote
install failed: pLocation:automatic, pLang: , pRegn:
pLocation(NoSIM):english_us, pLang: en, pRegn: US
pkg: /data/local/tmp/b388778c9058a24fd29dbe6b414a02e3.apk
Failure [INSTALL_FAILED_TEST_ONLY]
There is no problem with Appium itself, but adb install command failed.
Failure [INSTALL_FAILED_TEST_ONLY] is most likely caused by android:testOnly="true" in manifest xml file of your Android application.
You need to change this parameter value to false and rebuild project to get valid apk file.

OS\Cordova Permissions Error > "Error: EACCES: permission denied, scandir"

When I run 'cordova build ios' on an existing project I get a permissions error when accessing the projects ios folder.
Node has been installed using 'NVM' and when I run 'which cordova' and it gives me the correct path in the .nvm folder.
I'm also able to install npm packages without sudo and can run 'cordova build ios' on on other projects no problem.
Error printed in the terminal:
cordova-custom-config: Skipping auto-restore of config file backup(s)
Error: EACCES: permission denied, scandir '/Users/username/project/cordova/platforms/ios/build/device/libCordova.a'
The last resort I can think is removing the ios platform and adding again, but the last dev may have made some changes to these files so would like to avoid that if possible.
I got the same error but for many other files, all when running 'cordova build ios'. The files in question were all in the same folder, all owned by 'root'. I am pretty sure that I had previously and mistakenly run 'sudo cordova build ios', which would have generated the files initially.
I ran a 'sudo chown -R [me] [folder]' and got my build back.

command not found error on Mac when running mfp from command line

I am getting mfp: command not found error on Mac. I obviously have installed mobilefirst-cli using npm install -g path-to-cli-.tgz-file
How can I check/verify if mobilefirst-cli is successfully installed on Mac? I tried to run mfp but got the error "Command not found".
If you are using MobileFirst 8.0 https://mobilefirstplatform.ibmcloud.com/downloads/ then the executable will be mfpdev
Specify PATH in zshrc or bashrc. Command: gedit ~/.zshrc
Also source it. Command: source ~/.zshrc
Once that is done. Restart terminal and you should be able to access mfp commands in cli.

phonegap run ios gives shell.js internal error (Mac, Cordova)

This is the console output that I get when trying to execute "phonegap run ios", which executes "cordova run ios".
ErlendMBPrivate:fsecapp erlendellingsen$ phonegap run ios
[phonegap] executing 'cordova run ios'...
shell.js: internal error
Error: EPERM, operation not permitted '/Applications/XAMPP/htdocs/jobb/fsecapp/platforms/ios/F-Securities/config.xml'
at Object.fs.chmodSync (fs.js:821:18)
at copyFileSync (/usr/local/lib/node_modules/phonegap/node_modules/cordova/node_modules/cordova-lib/node_modules/shelljs/src/cp.js:41:6)
at /usr/local/lib/node_modules/phonegap/node_modules/cordova/node_modules/cordova-lib/node_modules/shelljs/src/cp.js:198:5
at Array.forEach (native)
at Object._cp (/usr/local/lib/node_modules/phonegap/node_modules/cordova/node_modules/cordova-lib/node_modules/shelljs/src/cp.js:157:11)
at Object.cp (/usr/local/lib/node_modules/phonegap/node_modules/cordova/node_modules/cordova-lib/node_modules/shelljs/src/common.js:186:23)
at /usr/local/lib/node_modules/phonegap/node_modules/cordova/node_modules/cordova-lib/src/cordova/prepare.js:74:23
at Array.map (native)
at /usr/local/lib/node_modules/phonegap/node_modules/cordova/node_modules/cordova-lib/src/cordova/prepare.js:65:40
at _fulfilled (/usr/local/lib/node_modules/phonegap/node_modules/cordova/node_modules/q/q.js:787:54)
Now. I understand somewhat that there seems to be a chmod-problem. However. All of the folders that are named in the output log, are all accessible, readable and writeable by all users. I have chmodded all the folders.
More importantly
When I enter sudo-mode, there are no internal error. However. When authenticated as root, and using "sudo -i" when executing the command, the command line is unable to find any valid signing identites
If you don't understand the problems I get when executing as sudo, please see the StackOverflow-question I posted last week: Phonegap/cordova command line gives code signing error, xcode works fine. (IOS)
Phonegap (through Cordova) has insufficient permissions on the project folder.
To fix this issue is necessary to modify the project folder permissions in order to make the config.xml file writable by Cordova.
Normally Phonegap is run by the user, Cordova is invoked by Phonegap so in order to give Cordova permissions is necessary to give the user the ownership of the project folder. This can be achieved as follows:
sudo chown -R $(whoami) "/Applications/XAMPP/htdocs/jobb/fsecapp"
source

Resources