Exopackage installer fails with exception
Created by: kageiit
When trying to install exopackage apks, the following stacktrace is thrown
BUILD FAILED: Failed: install exopackage apk
java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:500)
at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:479)
at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:76)
at com.facebook.buck.android.AdbHelper.adbCall(AdbHelper.java:374)
at com.facebook.buck.android.exopackage.ExopackageInstaller$RealAdbInterface.adbCall(ExopackageInstaller.java:128)
at com.facebook.buck.android.exopackage.ExopackageInstaller.install(ExopackageInstaller.java:193)
at com.facebook.buck.android.AdbHelper.installApk(AdbHelper.java:563)
at com.facebook.buck.cli.InstallCommand.installApk(InstallCommand.java:364)
at com.facebook.buck.cli.InstallCommand.install(InstallCommand.java:243)
at com.facebook.buck.cli.InstallCommand.runWithoutHelp(InstallCommand.java:211)
at com.facebook.buck.cli.AbstractCommand.run(AbstractCommand.java:222)
at com.facebook.buck.cli.AbstractContainerCommand.run(AbstractContainerCommand.java:66)
at com.facebook.buck.cli.BuckCommand.run(BuckCommand.java:80)
at com.facebook.buck.cli.Main.runMainWithExitCode(Main.java:910)
at com.facebook.buck.cli.Main.runMainThenExit(Main.java:330)
at com.facebook.buck.cli.Main.main(Main.java:1485)
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 com.facebook.buck.cli.bootstrapper.ClassLoaderBootstrapper.main(ClassLoaderBootstrapper.java:55)
Caused by: java.lang.RuntimeException: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at com.facebook.buck.android.exopackage.ExopackageInstaller$SingleDeviceInstaller.lambda$12(ExopackageInstaller.java:510)
at java.util.Map.forEach(Map.java:630)
at com.facebook.buck.android.exopackage.ExopackageInstaller$SingleDeviceInstaller.installFiles(ExopackageInstaller.java:502)
at com.facebook.buck.android.exopackage.ExopackageInstaller$SingleDeviceInstaller.installMissingFiles(ExopackageInstaller.java:441)
at com.facebook.buck.android.exopackage.ExopackageInstaller$SingleDeviceInstaller.installSecondaryDexFiles(ExopackageInstaller.java:279)
at com.facebook.buck.android.exopackage.ExopackageInstaller$SingleDeviceInstaller.doInstall(ExopackageInstaller.java:240)
at com.facebook.buck.android.exopackage.ExopackageInstaller.lambda$0(ExopackageInstaller.java:195)
at com.facebook.buck.android.exopackage.ExopackageInstaller$RealAdbInterface$1.call(ExopackageInstaller.java:132)
at com.facebook.buck.android.AdbHelper$AdbCallable$1.call(AdbHelper.java:439)
at com.facebook.buck.android.AdbHelper$AdbCallable$1.call(AdbHelper.java:1)
at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:111)
at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:58)
at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:75)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1967)
at com.facebook.buck.android.AdbHelper.checkReceiverOutput(AdbHelper.java:533)
at com.facebook.buck.android.exopackage.RealExopackageDevice.installFile(RealExopackageDevice.java:288)
at com.facebook.buck.android.exopackage.ExopackageInstaller$SingleDeviceInstaller.lambda$12(ExopackageInstaller.java:508)
... 15 more
Suppressed: java.lang.RuntimeException: java.net.ConnectException: Connection refused (Connection refused)
at com.facebook.buck.android.exopackage.RealExopackageDevice$1.addOutput(RealExopackageDevice.java:257)
at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:519)
at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:382)
at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:353)
at com.android.ddmlib.Device.executeShellCommand(Device.java:599)
at com.facebook.buck.android.exopackage.RealExopackageDevice.installFile(RealExopackageDevice.java:279)
... 16 more
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at java.net.Socket.connect(Socket.java:538)
at java.net.Socket.<init>(Socket.java:434)
at java.net.Socket.<init>(Socket.java:211)
at com.facebook.buck.android.exopackage.RealExopackageDevice$1.addOutput(RealExopackageDevice.java:232)
... 21 more
Buck version: 5229bfcf