Android App is not able to open in Appium Automation in android OS 7 Nougat - automation

i try to open the Android app in Nougat 7 or above android version but there is a error show in appium, the error is bellow.
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Command failed: Failed to install C:\Program Files (x86)\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk: Failure [INSTALL_FAILED_VERSION_DOWNGRADE]\r\n)","killed":false,"code":1,"signal":null,"origValue":"Command failed: Failed to install C:\Program Files (x86)\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk: Failure [INSTALL_FAILED_VERSION_DOWNGRADE]\r\n"},"sessionId":null}
info: <-- POST /wd/hub/session 500 7986.817 ms - 520
So, Please Suggest me how to solve the session null issue.
Note: the same code is run in android OS 6 Marshmallow, 5 Lollipop.

The issue you are facing was fixed in recent Appium server release 1.7.1.
In change log under Android section you will find
Add support to force upgrade settings app
So your steps now:
Update appium server: npm install appium#1.7.1 -g
Rerun your test

Try uninstalling the app manually if it already exists on the device. If it does not, try an erase/reset of the device itself. I've run into upgrade/overwrite issues in the past that were resolved by cleaning up the device.

Related

Library linking issue after upgrading to React Native 0.70.3

We upgraded the mobile development project we are working on to React Native v0.70.3 from 0.66.4 and our build starting to give all sort of issue in our build server after that. Both iOS and Android builds are failing with following error messages.
Android:
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':react-native-camera-kit:verifyReleaseResources'.
A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action
Android resource linking failed
ERROR:/Users/jenkinsoffshore/CICDBuilds/workspace/Mobile-Service-Android/node_modules/react-native-camera-kit/android/build/intermediates/merged_res/release/values/values.xml:2784: AAPT: error: resource android:attr/lStar not found.
iOS:
iOS build ends in success and we can upload to testflight as well. but getting the following error in email and the app crashes in devices.
ITMS-90863: Apple silicon Macs support issue - The app links with libraries that are not present on Mac:
#rpath/hermes.framework/hermes
After you’ve corrected the issues, you can upload a new binary to App Store Connect
We upgraded the MacOS version to Ventura and Xcode along with in the build machine. In developer machine both builds work fine.
Do we have to do anything specifically after upgrading to React Native 0.70.3?
Downgrade to atmost react-native 0.69
Rebuilding the server completely solve the issue. We had to setup everything from scratch. There must be a simple solution that that but project deadlines made us to go for a full re-inttall.

React-Native INSTALL_FAILED_UPDATE_INCOMPATIBLE:Package com.schoolproject signatures do not match previously installed version; ignoring

Execution failed for task ':app:installDebug'.
java.util.concurrent.ExecutionException: com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException:
INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.schoolproject signatures do not match previously installed version; ignoring!
Solution of that type error
U will get that type error if you are run on your mobile using npx react-native run-android
please uninstall app-release.apk app if you already installed it on your device.
1.1 why required to uninstall- because the same name two application unable to install
one application is release mode and one is on debug mode same name app.
then after run command npx react-native run-android
You might just have a same application in your device already, uninstall it and then run the app again.
Such error comes when your signature of the old version and new version does not match.
Read more here:
https://developer.android.com/studio/publish/app-signing
If you want to have multiple apps based on different types, then add productFlavours in your application.
Read more on that here.

Titanium Appcelerator **BUILD FAILED**

Getting the following error when I try to run my program on an iOS device
[INFO] : Invoking xcodebuild
[ERROR] : ** BUILD FAILED **
There is no other information displayed in the console about why the build has failed. I don't think my code is the issue because
It runs fine on the simulator, and
I tried running an example "Hello World" app and the same error occurred
I have recently updated my certificates and provision profiles, which is when this error started occurring.
I am running:
Node.js Version = 8.9.1
npm Version = 5.5.1
Appcelerator studio Version = 5.1.1.201809051655
Titanium SDK Version = 7.5.0.GA
Xcode Version = 10.1
Based on other forum posts that I have read, I have tried:
Cleaning the project
Using an older version of the Titanium SDK
Deleting old provision profiles from Xcode
Deleting old certificates from the keychain
Assigning correct provision profile and certificate from Run > Run Configurations
Removing modules used on the project
Using devices with different versions of iOS
Really at a loss of what else to try. Any recommendations would be greatly appreciated.
You can run appc run -p ios --log-level trace which will invoke the xcodebuild command with the highest possible log level. After that, the actual error will be shown. Most likely you are using a 3rd party module that is missing a framework link. If you got the log, you can paste it into a GitHub Gist and send it here, then we can find it for sure.

Titanium ios failed to build on my test device

when I code :
ti build --platform ios --target device
I got this issue :
[TRACE]/usr/bin/touch -c /Users/wind/workspace/yuehouse/build/iphone/build/Debug-iphoneos/yuehouse.app.dSYM
[TRACE] ** BUILD SUCCEEDED **
[INFO] Installing app on device: xxx iPhone
[ERROR] Failed to start "com.apple.syslog_relay" service (0xe800007f)
[ERROR] Project failed to build after 40s 884ms
[ERROR] Failed to start "com.apple.syslog_relay" service (0xe800007f)
Just disable wifi on your device while building
Try disable iTunes sync over Wi-Fi, it works for me.
That is a well known bug which is still open.
According to other users it may help to reboot your phone and/or your Mac. Other users tried to install it several times and suddenly it worked. It could also help to unplug your phone and plug it in again.
-- This is from TIMOB17595
(it just worked for me, perfectly)
Here's my workaround "ritual":
1- Unplug your device
2- Clean the project
3- Log out Appcelerator
4- Re-open Appcelerator and log in
5- Plug your device
6- Run the app

Worklight build error Failed initializing ClientProjectBuilder

I have suddenly started getting worklight build errors like below. I have no clue why it started happening suddenly. The code was working fine until the remote machine I use for Xcode builds was rebooted. Any clue what could be causing it ?
ipad build failed: Failed initializing ClientProjectBuilder
android build failed: Failed initializing ClientProjectBuilder
iphone build failed: Failed initializing ClientProjectBuilder
Regards
Avi
The solution to this error, typically, is to delete the wlBuildResources folder, located in the TMPDIR of the OS.
See here: Worklight - FWLST1040E: android build failed: java.io.FileNotFoundException
Close Eclipse
Locate your temp folder (Windows, OS X)
Delete the wlBuildResources folder
Open Eclipse
Re-build
It may be helpful to also delete the native folder before closing Eclipse, however do note that if you have written custom native code you should first back it up so it won't be lost(!).