Note: There are a few cases of duplicates in user autocompletion which are being worked on.

Issue with killProcess on devicemanagerADB

RESOLVED FIXED

Status

Testing
Mozbase
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: wlach, Assigned: wlach)

Tracking

Trunk
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

We're seeing an error with dmADB's version of killProcess:

(mozbase)wlach@eideticker:~/src/eideticker$ dm killapp com.mozilla.SUTAgentAndroid
Android Debug Bridge version 1.0.29

Traceback (most recent call last):
  File "/home/wlach/src/mozbase/bin/dm", line 9, in <module>
    load_entry_point('mozdevice==0.11', 'console_scripts', 'dm')()
  File "/home/wlach/src/mozbase/mozdevice/mozdevice/dmcli.py", line 247, in cli
    cli = DMCli(args)
  File "/home/wlach/src/mozbase/mozdevice/mozdevice/dmcli.py", line 127, in __init__
    command['function'](*command_args)
  File "/home/wlach/src/mozbase/mozdevice/mozdevice/dmcli.py", line 212, in killapp
    self.dm.killProcess(appname)
  File "/home/wlach/src/mozbase/mozdevice/mozdevice/devicemanagerADB.py", line 400, in killProcess
    p = self._runCmdAs(args)
  File "/home/wlach/src/mozbase/mozdevice/mozdevice/devicemanagerADB.py", line 732, in _runCmdAs
    return self._runCmd(args)
  File "/home/wlach/src/mozbase/mozdevice/mozdevice/devicemanagerADB.py", line 720, in _runCmd
    return subprocess.Popen(finalArgs, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
    raise child_exception
TypeError: execv() arg 2 must contain only strings


After bug 799507, the pid needs to be passed as a string argument. I think I actually fixed this earlier but forgot to include it as part of the patch.
Created attachment 672845 [details] [diff] [review]
Fix dmADB's version of killApp

This fixes the problem for me.

Based on :gcp's earlier report, it looks like this is causing problems for (at least) mochitest robotium over adb.
Attachment #672845 - Flags: review?(jmaher)
Comment on attachment 672845 [details] [diff] [review]
Fix dmADB's version of killApp

Review of attachment 672845 [details] [diff] [review]:
-----------------------------------------------------------------

simple.
Attachment #672845 - Flags: review?(jmaher) → review+
Pushed: https://github.com/mozilla/mozbase/commit/94e9a49155de4a03467a5d68fc5cfec03953bb06

(this will take effect the next time mozbase is merged to m-i, probably early next week)
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.