I am working on a Phonegap/Cordova 3.0 Android (hybrid) app and want to do UI testing. I tried running Appium and Selendroid (http://selendroid.io/) I run on Win 8.1 x64, and am using Visual Studio 2012 with Selenium 2.37 nuget package to write the tests.
The app is loaded OK, along with selendroid in my Android emulator running through eclipse.
I get this error when trying to start up the app through the tool. Any ideas?
android.util.AndroidException: INSTRUMENTATION_FAILED:
com.example.femmapp.selendroid/io.selendroid.ServerInstrumentation
The error message and stack trace is:
A session is either terminated or not started (Original error:
android.util.AndroidException: I
) (NoSuchDriver)AILED:
com.example.femmapp.selendroid/io.selendroid.ServerInstrumentation
at
OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response
errorResponse)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String
driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities
desiredCapabilities)
at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor
commandExecutor, ICapabilities desiredCapabilities)
at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(Uri remoteAddress,
ICapabilities desiredCapabilities, TimeSpan commandTimeout)
at FEMM.IntegrationTests.TestDriverSetup.TestDriverSetUp(Int32 minutes,
Int32 seconds, String apppkg, String devname, String devv
ers, String webdrvr, String activity, Boolean saucelabs) in c:\mydir
Have you tried to use selendroid directly?
If you have setup everything, you find a complete sample project of a cordova hybrid app here: https://github.com/selendroid/demoproject-selendroid#hybrid-app-test
In order to get the latest updates, I recommend you to use the latest snapshot version of selendroid: http://ci.selendroid.io/job/selendroid/io.selendroid$selendroid-standalone/
check your capability settings, if your appPackage is wrong?
remove all the apks related to appium, then retry.
remove all the temp files in C:\Users\xxxx\AppData\Local\Temp, then retry.
Hope it helps.
Related
I'm using Android Studio 2020.3.1 Patch 4(at 01-19-2022), Gradle 7.0.2. Java 11 Kotlin 1.6.10, mac Pro 16 m1 arm64(2021)
I'm new in macOS, jumped from Ubuntu, and found issues. I'm working with different projects and all time when I'm trying to switch to another one, I have the next error:
Gradle could not start your build.
Could not create service of type ResourceSnapshotterCacheService using
GradleUserHomeServices.createResourceSnapshotterCacheService(). Timeout waiting to lock file hash cache
It sometimes happens when I'm trying to run or sync the same project.
Solution as find ~/.gradle -type f -name "*.lock" -delete not useful because I run it all time when I complete changes on sdk project and test it on another one. Relevant solutions like kill not useful too
I hope, somebody has a solution for that. Thank you :)
Error text:
Gradle could not start your build.
Could not create service of type ResourceSnapshotterCacheService using GradleUserHomeServices.createResourceSnapshotterCacheService().
Timeout waiting to lock file hash cache (/Users/{user}/.gradle/caches/7.0.2/fileHashes). It is currently in use by another Gradle instance.
Owner PID: 73387
Our PID: 73419
Owner Operation:
Our operation:
Lock file: /Users/{user}/.gradle/caches/7.0.2/fileHashes/fileHashes.lock
I had a working React app released for Android and iOS via Capacitor. But now with a new version of my app, builds were not working with the Pixel 4 API 29 virtual device I used previously. Retrying with a Pixel 2 API 28 builds complete and the app opens, but now Mapbox is no longer loading and that is the core of my app. I updated to Android Studio 4.2.1 and have the following as dev dependencies in my package.json:
“#capacitor/android”: “^3.0.2”,
“#capacitor/cli”: “^3.0.2”,
“#capacitor/core”: “^3.0.2”,
“capacitor-resources”: “^2.0.5”,
“cordova-res”: “^0.15.3”
Small elements of my app are accessing the web, so it doesn’t seem to be an internet access issue. The main changes I’ve made in this version are upgrading to Mapbox 2.3.0 and making basic use of cookies for user settings, but not for ad tracking. But I’ve reverted both of these changes and the problem is persisting so it doesn’t seem to be because of the new Mapbox version or because the introduction of cookies.
Getting errors like this where the last letter of the app name is missing for some reason:
E/o.ionic.ecorat: Invalid ID 0x00000000.
Invalid ID 0x00000000.
E/o.ionic.ecorat: Invalid ID 0x00000000.
Also errors like this:
E/cr_VariationsUtils: Failed reading seed file “/data/user/0/io.ionic.ecorate/app_webview/variations_seed”: /data/user/0/io.ionic.ecorate/app_webview/variations_seed (No such file or directory)
Do errors like this mean that the app isn’t detecting that it’s meant for prod?
E/Capacitor/Console: File: http://localhost/static/js/2.9b5092bb.chunk.js - Line 2 - Msg: Error: Failed to initialize WebGL
E/Capacitor/Console: File: http://localhost/static/js/2.9b5092bb.chunk.js - Line 2 - Msg: Uncaught (in promise) Error: Failed to initialize WebGL.
I use ternary operators that start like this:
const url = process.env.NODE_ENV === ‘production’ ?
to decide whether to go to the real website or use localhost.
Should I go back to a more stable version of capacitor?
There are 3 things I can suggest which worked for me..
Check the devtool and inspect the emulator. if you see a error something like this
Failed to load resource: net::ERR_CONTENT_LENGTH_MISMATCH
Then you can use npx capacitor run which should solve the issue, this is a quick fix though.
Replace your dev-flow and start using npx instead of ionic XXXX commands.
If you wish to update the deps and dev-deps in that case, based on package.json you have shared in your question you are missing a few plugins.
if you were to create a new ionic app using ionic start then the package.json will look something like this [ignore the vue deps]
"dependencies": {
"#capacitor/android": "3.0.2",
"#capacitor/app": "1.0.2",
"#capacitor/core": "3.0.2",
"#capacitor/haptics": "1.0.2",
"#capacitor/keyboard": "1.0.2",
"#capacitor/status-bar": "1.0.2",
"#ionic/vue": "^5.4.0",
"#ionic/vue-router": "^5.4.0",
"core-js": "^3.6.5",
"vue": "^3.0.0-0",
"vue-router": "^4.0.0-0"
}
So, you will need to manually install the package apart from #capacitor/android & #capacitor/core I believe these packages that are de-coupled packages that makes capacitor lighter than the prev version and need to be manually installed.
After that you need to build using ionic build then use ionic open to open the IDE and sync the project with Gradle for the android app. Once this is done you can use ionic capacitor run --livereload --external to open the emulator and the dev server with live-reload..
I am wanting to debug and install my application on a physical clock.
First I tried to create the application in Xamarin.Android, I finished the application and it worked very well in an emulator, but when I tried to send to the device, the following error appeared:
ADB0010: Failure [INSTALL_FAILED_MISSING_SHARED_LIBRARY: Package couldn't be >installed in /data/app/AppXamarinWear.AppXamarinWear-1: Package >AppXamarinWear.AppXamarinWear requires unavailable shared library >com.google.android.wearable; failing!]
em Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String >output, String packageName) na >E:\A_work\1824\s\External\androidtools\Mono.AndroidTools\Internal\AdbOutputP>arsing.cs:linha 341
em Mono.AndroidTools.AndroidDevice.<>c__DisplayClass95_0.>>b__0(Task1 t) na >E:\A\_work\1824\s\External\androidtools\Mono.AndroidTools\AndroidDevice.cs:li>nha 753
em System.Threading.Tasks.ContinuationTaskFromResultTask1.InnerInvoke()
em System.Threading.Tasks.Task.Execute() 0
Then I created an empty project in AndroidStudio, just created the project, did not change any line of code, and tried to run the application on the device, so I got the following error:
Installation failed with message Failed to commit install session 1131471407 >with command cmd package install-commit 1131471407. Error: >INSTALL_FAILED_MISSING_SHARED_LIBRARY: Package couldn't be installed in >/data/app/br.pinheiros.weardebug7-1: Package br.pinheiros.weardebug7 requires >unavailable shared library com.google.android.wearable; failing!.
It is possible that this issue is resolved by uninstalling an existing >version of the apk if it is present, and then re-installing.
I understood that the two solutions are bringing the same error, something with Google Api, I have already changed all the developer settings in Wear.
Model: Zeblaze Thor 4 Pro
Cloned the project from Git and started it with react..
Did not do any changes in the code for the project as I just wanted to run it using react..
but I got the following error in the emulator..
Application biqComponentApp has not been registered. This is either due to require() error during initialization or failure to call AppRegistry.registerComponent.
I am using windows 7 but same project up and running without any problem for colleagues with mac computers.Not sure whether it is a problem in the project with windows or any installation problem in windows..
please help to find the issue..
Error in the emulator
Make sure you don't have any other react-native/node process running in another terminal. If you do, close it and then re run it, it works for me.
or else
It could be an error caused by not matching name of project and your registered component.
You have created a project with a certain name, example:
react-native init biqComponentApp
But in your index.android.js file you register other component
AppRegistry.registerComponent('Bananas', () => Bananas);
When it must be
AppRegistry.registerComponent('biqComponentApp', () => Bananas);
I try to make an android application in delphi but when i build the project i get this error:
[PAClient Error] Error: E0002 Missing profile name; use paclient -?
for Help
How can i fix this?
You may check your configuration as well in Delphi XE 8.1:
Build Configuration: RELEASE
Android: APPLICATION STORE
For instance DEBUG and APPLICATION STORE may result in a E00002 error.
For building Android applications in delphi, you do not use the PAServer nor PAClient, so there is no profile: these are only needed for iOS or OS X development.
To figure out what is calling PAClient and why the call fails, follow these steps:
Run Delphi while the free Process Monitor from SysInternals is active,
watch the Process Monitor log to see when the PAClient is executed, and what parameters there are.
Relate these parameters to the selected profile
Note that error E00002 means the PAClient has no profile name in the parameters.
Also check Project -> Deployment that all items are checked. That worked for me.
(I unchecked all items by mistake when adding some files for deployment manually)
Via FFernandes https://forums.embarcadero.com/thread.jspa?threadID=118789