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.
Related
openjdk version "13.0.10" 2022-01-18
OpenJDK Runtime Environment Zulu13.46+15-CA (build 13.0.10+5-MTS)
OpenJDK 64-Bit Server VM Zulu13.46+15-CA (build 13.0.10+5-MTS, mixed mode, sharing)
Synergy server jar v.3.0.17
npm v.8.5.0
node v.16.14.2
I want to run automated tests on my real device (iPhone SE, OS: 14.6 [cannot update OS]). I run WebDriverAgentRunner on my device in Xcode (v.13.3), testing starts on my real device:
/**
Never ending test used to start WebDriverAgent
*/
- (void)testRunner
{
FBWebServer *webServer = [[FBWebServer alloc] init];
webServer.delegate = self;
[webServer startServing];
}
Running Synergy server (session on http://localhost:7777).
Added synergy server url to my driver.properties file:
SYNERGY.URL=http://localhost:7777
DEVICE.CATEGORY=Phone
DEVICE.ID=device-id--
APP.PATH=https:path--
But when I run testng.xml file in IntelliJ, I get an error on methodSetup method which is:
#BeforeMethod(alwaysRun = true)
#Parameters({"Environment"})
public void methodSetup(String env, Method method) {
IOSSynergyMobileDriver.getInstance().setScreenOrientation(screenOrientation);
DeviceCapabilities capabilities =
IOSSynergyMobileDefinition.getIOSCommonDesiredCapabilities(
DriverProperties.getInstance().getDeviceId(),
DriverProperties.getInstance().getAppBinaryPath(),
DriverProperties.getInstance().getAppId(),
DriverProperties.getInstance().getVerifyNetworkConnectivity());
capabilities.addCapability("AppLaunchArguments",
RestrictionFactory
.getInstance(
this.getTestGroup()
)
.getAppLaunchArgs()
.toString()
);
IOSSynergyMobileDriver.getInstance().getIOSDriver(
DriverProperties.getInstance().getSynergyUrl(),
capabilities);
initTestSteps();
}
And the error is:
java.lang.AssertionError: getIOSDriver(): Exception occurred instantiating IOSDriver. Exception: com.synergy.core.exceptions.SessionNotStartedException: [{"results":"Session 278b848c-442c-4806-a789-25f2e68f8588 failed to start with error: Unable to find ios_webkit_debug_proxy on your path! Is it installed and available? See the Synergy Server README for details but it can easily be installed via 'brew install --HEAD ios-webkit-debug-proxy' on MAC."},{"results":"Session 278b848c-442c-4806-a789-25f2e68f8588 failed to start with error: Unable to find libimobiledevice packages on your path! Is it installed and available? See the Synergy Server README for details but it can easily be installed via 'brew install libimobiledevice' on MAC."},{"results":"Session 278b848c-442c-4806-a789-25f2e68f8588 failed to start with error: Unable to find ios-deploy on your path! Is it installed and available? See the Synergy Server README for details but it can easily be installed via 'brew install ios-deploy' on MAC."},{"results":"Session 278b848c-442c-4806-a789-25f2e68f8588 failed to start with error: Unable to find Appium on your path! Is it installed and available? See the Synergy Server README for details but it can easily be installed via 'npm install -g appium' on MAC and windows."},{"results":"Session 278b848c-442c-4806-a789-25f2e68f8588 failed to start with error: The device at 00008030-000A0D012152402E did not respond! Is the device online and reachable?"}]
Can anyone clarify what can cause this issue, please?
Note: I've removed node and moved it to usr/local/bin path (opt/homebrew/bin was set as path for node before) but that didn't help. Now I see that appium, ios-deploy and ios_webkit_debug_proxy are also in /opt/homebrew/bin folder, maybe that can be the problem?
I've tried reinstalling node so that it is inside usr/local/bin and updated Xcode to use the latest release, also I tried different versions of Synergy server. No results, the same error.
Error info
requiring unknown module "519", if you are sure the module exists, try
restarting Metro. You may also want to run 'yarn' or 'npm install'
I just add ant-design in my rn program and run pod install and restart android app.
No error in my iOS Application, but wrong with Android application.
What can I do to fix that?
Have you tried with npm install? Usually the error means that you don't have installed a plugin or that you are importing something in the wrong mode.
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
Every time I install & link the react-native-fbsdk in any react-native project, I get this following error from running react-native run-ios:
** BUILD SUCCEEDED **
The following commands produced analyzer issues:
Analyze {project-dir}/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.c
Analyze {project-dir}/node_modules/react-native/ReactCommon/yoga/yoga/YGNodeList.c
(2 commands with analyzer issues)
Installing build/Build/Products/Debug-iphonesimulator/{App-Name}.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
Failed to install the requested application
The bundle identifier of the application could not be determined.
Ensure that the application's Info.plist contains a value for CFBundleIdentifier.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/{App-Name}/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
I have followed instructions at the react-native-fbsdk README
and I have followed instructions at the IOS Getting Started Guide
Any Project I create works perfectly fine when running react-native run-ios before installing & linking the react-native-fbsdk.
Here are the following package versions I am using:
npm - 4.6.1
react-native - 0.45.1
react-native-fbsdk - 0.6.0
I was originally using react-native-fbsdk#0.6.1, but it appears that 0.6.1 may have been causing the issue so I changed it to 0.6.0.
I have attempted to create many brand new/fresh 'Hello World' projects and completely install react-native-fbsdk many times, but to no avail and I tried almost ALL of the solutions you can find by googling:
react-native CFBundleIdentifier doesn't exist,
react-native-fbsdk CFBundleIdentifier doesn't exist,
or some other variation of those 2.
Edit: I can run the app on ios via building it in xcode; however, I would like to get rid of the above error in case it might cause any future bugs during release, or with installing any new packages.
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