]
Stefan Miklosovic commented on ARQ-1273:
----------------------------------------
This logic is from now on implemented in the upcomming Android container. It is welcome to
merge these changes as you wish.
Reinstalling of android-server in android-drone fails when other
version is specified
-------------------------------------------------------------------------------------
Key: ARQ-1273
URL:
https://issues.jboss.org/browse/ARQ-1273
Project: Arquillian
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Components: Extension - Android
Affects Versions: 1.0.0.Final
Reporter: Stefan Miklosovic
Assignee: Karel Piwko
Priority: Optional
Since there is the possibility to have an Android virtual device connected and online
while doing some tests so starting up the emulator is not neccessary every time one is
testing something, the android-drone module installs (and reinstalls) an
android-server.apk on the device in order to prepare it for e.g testing via
android-extension-drone.
When running the test, specifying one version of the apk server (e.g. 2.16), this APK is
installed. In the case we are executing the test the second time with the same version of
the APK, all is good since the APK is just reinstalled.
The error arise when we are trying to reinstall the APK when other version of the server
is specified (e.g. 2.21.0) because it seems that Android checks upon reinstalling if the
certificates of APK files match and in this case, it is not true. The next error appears
while doing so:
{code}org.jboss.arquillian.android.api.AndroidExecutionException: Unable to install APK
from (path)/android-server-2.21.0.apk.
Command failed with status code: INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES
at
org.jboss.arquillian.android.impl.AndroidDeviceImpl.installPackage(AndroidDeviceImpl.java:169)
at
org.jboss.arquillian.android.drone.impl.AndroidWebDriverSupport.prepareWebDriverEnvironment(AndroidDroneWebDriverSupport.java:66)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
at
org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
at
org.jboss.arquillian.android.impl.AndroidDeviceSelector.getOrCreateAndroidDevice(AndroidDeviceSelector.java:110)
{code}
I would suggest to not only reinstall the package, which is not sufficient,
but I would check if some package of some particular name is installed and
after that it should be removed explicitly.
The command which writes out the list of all installed applications is
{code}pm list packages -f{code}
so this can be easilly checked and tested for the presence of the string
{code}package:/data/app/org.openqa.selenium.android.app-1.apk=org.openqa.selenium.android.app{code}
or its appropriate part.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: