How Can I install the app directly from the WEB using Appium Studio?

We Have our App in Hockey.

In Appium i can install app directly from the WEB.
dc.setCapability(MobileCapabilityType.APP, “https://URLToApp”);

If i try the Same with AppiumStudio i get the Error:
org.openqa.selenium.WebDriverException: unknown error (An unknown server-side error occurred. status=‘false’. Failed to complete internal method: ‘install args: [https://URLToApp, false, false]’, details: Failed to install application. Failed to install application. Failed to install application) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: ‘3.5.2’, revision: ‘10229a9’, time: ‘2017-08-21T17:29:55.15Z’
System info: host: ‘XXXX.local’, ip: ‘XXXX’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.12.6’, java.version: ‘1.8.0_144’
Driver info: io.appium.java_client.android.AndroidDriver
Capabilities [{device.majorVersion=5.x, dontGoHomeOnQuit=false, device.os=Android, noReset=false, dontStopAppOnReset=false, reservationDuration=240, reportFormat=xml, fullReset=false, platform=ANY, device.serialNumber=XXXX, device.version=5.1.1, reportDirectory=reports, javascriptEnabled=true, autoWebview=false, enableClientLog=false, udid=XXXX, platformName=Android, testName=Untitled, device.screenSize=1080x1920, device.screen=Large, instrumentApp=true, device.manufacture=XXXX, autoDismissAlerts=false, waitForDeviceTimeout=120000, device.model=XXXX, device.name=XXXX, projectName=, autoAcceptAlerts=false}]
Session ID: b24d41b7-68d1-4cc1-b818-bf6bc13f8763
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

How Can I install the app directly from the WEB using Appium Studio?

Hi Felix, your code should work - can you share with me in private the URL to the application?

Update

If i Using Appium Studio 11.0.64 to install the App from Web it works.
But if i put the Generated code in to my IDE i get An Error.

If i use
driver.executeScript("client:client.install(\"https://URL-TO-APK\", \"true\", \"false\")");

instead of
driver.installApp("https://URL-TO-APK");

it works.

package utility;
import io.appium.java_client.remote.AndroidMobileCapabilityType;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import io.appium.java_client.remote.MobileCapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;

import java.net.URL;
import java.net.MalformedURLException;

public class Untitled {
    private String reportDirectory = "reports";
    private String reportFormat = "xml";
    private String testName = "Untitled";
    protected AndroidDriver<AndroidElement> driver = null;

    DesiredCapabilities dc = new DesiredCapabilities();

    @BeforeTest
    public void setUp() throws MalformedURLException {
        dc.setCapability("reportDirectory", reportDirectory);
        dc.setCapability("reportFormat", reportFormat);
        dc.setCapability("testName", testName);
        dc.setCapability(MobileCapabilityType.UDID, "XXXX");
        dc.setCapability(AndroidMobileCapabilityType.APP_PACKAGE, "XXXX");
        dc.setCapability(AndroidMobileCapabilityType.APP_ACTIVITY, "XXXX");
        dc.setCapability("instrumentApp", true);
        driver = new AndroidDriver<AndroidElement>(new URL("http://localhost:4723/wd/hub"), dc);
    }

    @Test
    public void testUntitled() {
        driver.installApp("https://URL-TO-APK");
        driver.startActivity("XXXX", "XXXX");
    }

    @AfterTest
    public void tearDown() {
        driver.quit();
    }
}

org.openqa.selenium.SessionNotCreatedException: session not created (failed to launch com.immmr.android.dev, because it is not installed on the device) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 1.38 seconds
Build info: version: ‘2.53.1’, revision: ‘a36b8b1cd5757287168e54b817830adce9b0158d’, time: ‘2016-06-30 19:26:09’
System info: host: ‘XXXX.local’, ip: ‘XXX’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.12.6’, java.version: ‘1.8.0_144’
Driver info: io.appium.java_client.android.AndroidDriver

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:40)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:144)
at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:36)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:114)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:132)
at io.appium.java_client.android.AndroidDriver.(AndroidDriver.java:92)
at utility.Untitled.setUp(Untitled.java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:108)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:523)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:224)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:146)
at org.testng.TestRunner.beforeRun(TestRunner.java:626)
at org.testng.TestRunner.run(TestRunner.java:594)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:380)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:375)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)
at org.testng.SuiteRunner.run(SuiteRunner.java:289)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1226)
at org.testng.TestNG.runSuites(TestNG.java:1144)
at org.testng.TestNG.run(TestNG.java:1115)
at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:72)
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:123)

Test ignored.

===============================================
Default Suite
Total tests run: 1, Failures: 0, Skips: 1
Configuration Failures: 1, Skips: 1

Process finished with exit code 0

thanks Felix,

I’ve identified the same issue over here and opened a bug (it’s a problem with the code export)

we are about to release 11.2, this will be fixed in the 11.3 or 11.4 release

thanks for the update

Best Regards,

Tom