appium / appium/appium-docker-android
Latest release of Appium has broken shell commands
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 672
- Forks
- 239
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 5
Description
I have a Jenkinsfile which runs our Appium Smoke tests, for the past few days the jenkins job has been failing with absolutely no clear explaining, it all runs perfectly fine until it enters the Appium container and tries to run it's first sh command, in which it will hang for about 5 minutes then fail with:
[Pipeline] container
[Pipeline] {
[Pipeline] sh
process apparently never started in /home/jenkins/agent/workspace/android-at-tests@tmp/durable-0f6a0121
(running Jenkins temporarily with -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.LAUNCH_DIAGNOSTICS=true might make the problem clearer)
So I've now just changed the image from image: "appium/appium" to image: "appium/appium:v1.22.0-p0" and it's working, which leads me to believe a recent update is causing the hang to occur. Maybe since a big refactor?
Jenkinsfile code to reproduce issue:
pipeline {
agent {
kubernetes {
label 'android-at'
defaultContainer 'jnlp'
yaml '''
apiVersion: v1
kind: Pod
metadata:
labels:
deploy: android-at
spec:
containers:
- name: jnlp
image: jenkins/jnlp-slave
- name: appium
image: appium/appium
volumeMounts:
- mountPath: /root/.android/
name: adb
readOnly: true
- name: at-app
image: xxxxxx
command:
- cat
tty: true
volumes:
- name: adb
secret:
defaultMode: 420
optional: false
secretName: adb
'''
}
}
stages {
stage('Fetch apk') {
steps {
container('at-app') {
sh "curl ${APK_BUILD_OUTPUT_PATH} > app-global-debug.apk" // This all works okay
}
}
}
stage('Run tests') {
environment {
// settings env vars
}
steps {
container('appium') {
// Everything hangs and fails from here
sh "echo 'connecting to $params.DEVICE device...'"
sh "adb connect ${GALAXY_TAB_S8_IP}:5555"
}
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Jenkinsfile reproduction, comparing the unpinned appium/appium image with appium/appium:v1.22.0-p0 and reviewing the container startup behavior around the first sh command. Use Jenkins durable-task launch diagnostics if needed. Done means the current image starts shell commands successfully in this Kubernetes pipeline and the adb command can run without hanging.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, docker, shell
- Domain
- devops, infrastructure, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100