Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation of apks from aab with --local-testing flag fails when multiple emulators are connected #264

Closed
ShashankSR opened this issue Jan 10, 2022 · 3 comments · Fixed by #265

Comments

@ShashankSR
Copy link
Contributor

ShashankSR commented Jan 10, 2022

Describe the bug
Installing aab with --local-testing on host with multiple devices connected, fails, even when we pass --device-id

Bundletool version(s) affected
Version: 1.8.2

Stacktrace

com.android.tools.build.bundletool.model.exceptions.CommandExecutionException: Expected to find one connected device, but found 2.
	at com.android.tools.build.bundletool.model.exceptions.InternalExceptionBuilder.build(InternalExceptionBuilder.java:57)
	at com.android.tools.build.bundletool.device.AdbRunner.run(AdbRunner.java:49)
	at com.android.tools.build.bundletool.commands.InstallApksCommand.cleanUpEmulatedSplits(InstallApksCommand.java:227)
	at com.android.tools.build.bundletool.commands.InstallApksCommand.execute(InstallApksCommand.java:221)
	at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:91)
	at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:49)
Caused by: com.android.tools.build.bundletool.model.exceptions.DeviceNotFoundException$TooManyDevicesMatchedException: Unable to find one device matching the given criteria. Matched 2 devices.
	at com.android.tools.build.bundletool.device.AdbRunner.run(AdbRunner.java:78)
	at com.android.tools.build.bundletool.device.AdbRunner.run(AdbRunner.java:43)
	... 4 more

To Reproduce

  • Run build-apks command with a given device serial id with multiple devices connected
  • Run install-apks command with a given device serial id with multiple devices connected

Expected behavior

  • Installation should happen even with multiple devices connected

Known workaround
If you have found a workaround, please specify what it is.

Environment:
OS: [e.g. iOS 10.3.3]

Additional context
Add any other context about the problem here.

@uKetki
Copy link

uKetki commented Feb 2, 2022

@keyboardsurfer @wojtek-kalicinski Can you please check the PR? We are blocked on this issue and due to this, we need to keep the internal fork for Bundletool which will involve maintenance costs at our end. Any response will be highly appreciated, Thanks!

@plecesne
Copy link
Contributor

plecesne commented Feb 3, 2022

Have you tried the --device-id flag to specify a specific device per its serial name? You can get the serial name with adb devices

@ShashankSR
Copy link
Contributor Author

Yes , mentioned the same in the issue description. Will highlight it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants