Closed
Bug 1237947
Opened 10 years ago
Closed 10 years ago
[tc-gip] Can't connect to a device with `adb logcat`
Categories
(Firefox Build System :: Task Configuration, task)
Firefox Build System
Task Configuration
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jlorenzo, Assigned: jlorenzo)
References
Details
Attachments
(2 files)
Bug 1236947 already landed in master, so I'll go with this follow-up. There we managed to run adb logcat in background. Here's what we get:
> - waiting for device -
> ** Cannot start server on remote host
> error: cannot connect to daemon
Example: https://tools.taskcluster.net/task-inspector/#euKRt7hnTRmIyxIehRjIaQ/0
Assignee | ||
Comment 1•10 years ago
|
||
Based on the logs in Jenkins[1], the command line in TC [2] to connect to a remote ADB device is correct:
> adb -H HOST -P PORT logcat -v threadtime
I wonder if there's a problem on the proxy side.
[1] http://jenkins1.qa.scl3.mozilla.com/view/Bitbar/job/flame-kk-512.b2g-inbound.tinderbox.ui.brick.bitbar/1896/console
[2] https://dxr.mozilla.org/mozilla-central/rev/d4213241bb796fdfa7a5ad4f1989e97b44474364/testing/taskcluster/tasks/phone_test.yml#60
Assignee | ||
Comment 2•10 years ago
|
||
The gaiatest command line does use the ADB host. For instance, to run mozdevice and get the version of the device[1]. So I think we can put aside the network-related issues.
One different thing in Jenkins, though: we first flush the logs, execute the tests and then dump them. This is not a good idea as the logcat is a circular list, so we can loose the first logs if the phone becomes verbose.
This makes me wonder if the bitbar firewall doesn't accept only one connection at the same time on a device.
[1] https://dxr.mozilla.org/mozilla-central/rev/d4213241bb796fdfa7a5ad4f1989e97b44474364/testing/marionette/client/marionette/runner/base.py#856
Assignee | ||
Updated•10 years ago
|
Summary: [tc-gip] Can't connect to a device with ADB → [tc-gip] Can't connect to a device with `adb logcat`
Assignee | ||
Comment 3•10 years ago
|
||
TaskCluster is not always verbose about the bad configuration you might input. Then, here's attached a working example, you can upload to https://tools.taskcluster.net/task-creator/
Before using it, please update these variables:
MANDATORY
* created and deadline: Make sure Task Creator put current timestamps
* payload > artifacts > each of them > expires: Put a date in the future
OPTIONAL
* payload > env: Take a more recent gaia HG commit. You may find them here: https://hg.mozilla.org/integration/gaia-central/shortlog
* scopes and payload > image: make sure tester-device is at the most recent version (https://dxr.mozilla.org/mozilla-central/source/testing/docker/tester-device/VERSION )
* payload > capabilities > devices > phone > build: Take a more recent taskId. You can find it here: https://tools.taskcluster.net/index/artifacts/#gecko.v2.mozilla-central.latest.b2g/gecko.v2.mozilla-central.latest.b2g.flame-kk-eng-opt
Assignee | ||
Comment 4•10 years ago
|
||
I found what's the issue. Unlike the Jenkins plugin which set ANDROID_SERIAL[1], the "tester-device" docker image stores the ADB serial in SERIAL_ID[2].
In Jenkins, we won't explicitly call `-s $ANDROID_SERIAL` because that variable is already used if -s is not set[3]. Then, the fix is just to call append `-s $SERIAL_ID` at [4]. See this example[5]
[1] https://github.com/mozilla/testdroid-marionette-plugin/blob/6d4ff2893827981bdea6a310a6352000eba30c23/src/main/java/jenkins/plugins/testdroid/DeviceSessionWrapper.java#L221
[2] https://dxr.mozilla.org/mozilla-central/rev/ad1f85f172b7302bef0fa9780df8e2b962780ac6/testing/docker/tester-device/bin/entrypoint#23
[3] http://wiki.cyanogenmod.org/w/Adb_--help See bottom of the page
[4] https://dxr.mozilla.org/mozilla-central/rev/ad1f85f172b7302bef0fa9780df8e2b962780ac6/testing/taskcluster/tasks/phone_test.yml#63
[5] https://tools.taskcluster.net/task-inspector/#SrvscqAXRou-H04TVbNwLg/0
Assignee | ||
Comment 5•10 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/30885/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/30885/
Attachment #8707811 -
Flags: review?(garndt)
Comment 6•10 years ago
|
||
Comment on attachment 8707811 [details]
MozReview Request: Bug 1237947 - [tc-gip] Can't connect to a device with `adb logcat` r=garndt
https://reviewboard.mozilla.org/r/30885/#review27677
Attachment #8707811 -
Flags: review?(garndt) → review+
Assignee | ||
Comment 7•10 years ago
|
||
https://hg.mozilla.org/integration/b2g-inbound/rev/f931026f68dd7d1feb3c35bfd289580bc3ed7a51
Bug 1237947 - [tc-gip] Can't connect to a device with `adb logcat` r=garndt
Assignee | ||
Comment 8•10 years ago
|
||
Logcats are now populated: https://tools.taskcluster.net/task-inspector/#McAZhZx7S96J9ll4S7Hy8A/0
Comment 9•10 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Product: TaskCluster → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•