-
Notifications
You must be signed in to change notification settings - Fork 255
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
Fail to run on AWS Device Farm for Android >= 10 #425
Comments
Hi @Almouro - are you using Custom test environments in AWS device farm? |
Hi @vibin, sure here's a simple example to reproduce: version: 0.1
phases:
install:
commands:
- curl -Ls "https://get.maestro.mobile.dev" | bash
- export PATH="$PATH":"$HOME/.maestro/bin"
- echo YXBwSWQ6IGNvbS5leGFtcGxlCi0tLQotIGxhdW5jaEFwcAotIGFzc2VydFZpc2libGU6IC4qLioK | base64 -d > test.yaml
test:
commands:
- maestro test test.yaml |
Hi @Almouro, you mentioned you tried upgrading ADB. Is that done as part of the install phase? Can you share the snippet for that? |
Indeed, here goes: version: 0.1
phases:
install:
commands:
# Upgrade java
- java -version
- curl -s "https://get.sdkman.io" | bash
- source "$HOME/.sdkman/bin/sdkman-init.sh"
- sdk install java
- echo "Java upgraded"
- java -version
# Upgrade adb
- adb version
- wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip
- unzip platform-tools-latest-linux.zip
- export PATH=$(pwd)/platform-tools:$PATH
- echo "ADB upgraded"
- adb version
# Install Maestro
- curl -Ls "https://get.maestro.mobile.dev" | bash
- export PATH="$PATH":"$HOME/.maestro/bin"
- echo YXBwSWQ6IGNvbS5leGFtcGxlCi0tLQotIGxhdW5jaEFwcAotIGFzc2VydFZpc2libGU6IC4qLioK | base64 -d > test.yaml
test:
commands:
- maestro test test.yaml |
I'm also experiencing the same issue.
@Almouro can you share some more details on what this means? How is that achieved? Were you able to find a workaround to get Maestro + AWS DF to work together? |
Hi @tomoakley, I think @Almouro is referring to the if-else conditional in the Dadb.install function. fun install(file: File, vararg options: String) {
if (supportsFeature("abb_exec")) {
abbExec("package", "install", "-S", file.length().toString(), *options).use { stream ->
stream.sink.writeAll(file.source())
stream.sink.flush()
val response = stream.source.readString(Charsets.UTF_8)
if (!response.startsWith("Success")) {
throw IOException("Install failed: $response")
}
}
} else {
val fileName = file.name
val remotePath = "/data/local/tmp/$fileName"
push(file, remotePath)
shell("pm install ${options.joinToString(" ")} \"$remotePath\"")
}
} More on abb_exec here: https://malinskiy.github.io/adam/docs/abb Though, how to execute the else branch on Android 10+ remains unknown... |
Indeed, we just forked it replacing the condition with Since we have node installed on the aws machine, we run it with |
@Almouro : can you update @perf-profiler/maestro since its missing --debug-output command |
Dadb v1.2.7 replaces Waiting for Maestro to upgrade Dadb to new version... maestro/gradle/libs.versions.toml Lines 19 to 21 in ce0e2f7
|
@axelniklasson @Leland-Takamine Could you please take up the Dadb upgrade in the next Maestro release? |
Retested with latest Maestro version and it works for me now 👌🥳 |
This issue has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar problem, please file a new issue. Make sure to follow the template and provide all the information necessary to reproduce the issue. |
Hi! Thanks for providing Maestro to the community! ❤️
Trying to run Maestro in AWS Device Farm, I've noticed Android devices with version 10 and above will fail to run Maestro (basically devices supporting
abb_exe
)It fails here: https://github.com/mobile-dev-inc/dadb/blob/master/dadb/src/main/kotlin/dadb/Dadb.kt#L85 seemingly printing out the output of running
adb shell cmd package
as if everything afterpackage
was ignored:If I run Dadb from source on AWS, I'm running into the same issue.
I can log the commands sent via abb:
For instance, with:
I see:
If I force dadb to use the second version to install an APK (without abb), it works succesfully.
Kinda wondering if there is an issue with the null symbol \u0000 not being recognized somehow on AWS machines.
AWS Device Farm runs with Ubuntu 14 LTS / Java 8 / adb 1.0.39.
I've upgraded both
java
andadb
and I'm still running in the same issue thoughAny ideas what could be going on, what to try out next?
The text was updated successfully, but these errors were encountered: