Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Instrumentation target is failing to find APK #1510

Closed
cwoodwar6 opened this issue Sep 6, 2017 · 9 comments
Closed

Instrumentation target is failing to find APK #1510

cwoodwar6 opened this issue Sep 6, 2017 · 9 comments

Comments

@cwoodwar6
Copy link
Contributor

Error:

BUILD FAILED: Failed to install apk on 192.168.56.101:5555 (Google Nexus 5 - 6.0.0 - API 23 - 1080x1920).
com.android.ddmlib.InstallException: Local path doesn't exist.
    at com.android.ddmlib.Device.installPackage(Device.java:894)
    at com.facebook.buck.android.exopackage.RealAndroidDevice.installApkOnDevice(RealAndroidDevice.java:538)
    at com.facebook.buck.android.exopackage.AndroidDevice.installApkOnDevice(AndroidDevice.java:28)

The issue is that the APK being tested is not being generated and thus can't be found.

I've bisected the issue down to this commit: fec4a62
Before that commit, the issue does not exist.

My instrumentation target:

android_instrumentation_apk(
  name = 'instrumentation_debug_apk',
  manifest = ':manifest_debug_test',
  apk = ':bin_debug',
  deps = [
    ':res_debug_test',
    ':src_debug_test',
  ],
  visibility = [
    'PUBLIC',
  ],
)

bin_debug.apk never gets created. Building it with buck build app:bin_debug works fine.

@cwoodwar6
Copy link
Contributor Author

cc @cjhopman - Perhaps you could provide more context? Am I missing something that I need to do with that new change?

@kageiit
Copy link
Contributor

kageiit commented Sep 8, 2017

We have fec4a62 in our version and do not see this issue. strange

Can you check the buck log to see why the test apk build failed?

@cwoodwar6
Copy link
Contributor Author

@kageiit The test APK build doesn't fail, it just never builds the main APK. The same exception occurs on: https://travis-ci.org/uber/okbuck/builds/274047893?utm_source=github_status&utm_medium=notification but I'm not sure if it is the same root cause.

@kageiit
Copy link
Contributor

kageiit commented Sep 11, 2017

we build all apk targets in the travis config before the ui test command is run. It is strange that buck errors out like that.

We do not rely on buck to run ui test commands, but have our own wrapper, that is probably why we did not see this particular error.

@cwoodwar6
Copy link
Contributor Author

This has been blocking us from using the latest buck changes since that commit is now the foundation for later commits and I cannot revert it. We have a custom wrapper that we can use to get around it but would prefer if we could continue to use the test command.

@styurin styurin assigned styurin and unassigned styurin Oct 10, 2017
@cjhopman
Copy link
Contributor

Should be a straightforward fix, the test apk just needs a runtime dep on the tested apk.

@kageiit
Copy link
Contributor

kageiit commented Oct 27, 2017

@cjhopman Does cfdefd2 fix this?

@cjhopman
Copy link
Contributor

@kageiit it should.

@cwoodwar6
Copy link
Contributor Author

Confirmed cfdefd2 fixes this issue.

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

No branches or pull requests

4 participants