Closed Bug 1637608 Opened 4 years ago Closed 4 years ago

./mach android-emulator fails with python import error (psutil)

Categories

(Testing :: Mozbase, defect, P1)

Version 3
defect

Tracking

(firefox78 fixed)

VERIFIED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: kats, Assigned: gbrown)

References

(Blocks 1 open bug)

Details

(Whiteboard: [dev-prod-2020] [kaios])

Attachments

(1 file)

$ ./mach android-emulator
Error running mach:

    ['android-emulator']

The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.
You can invoke |./mach busted| to check if this issue is already on file. If it
isn't, please use |./mach busted file| to report it. If |./mach busted| is
misbehaving, you can also inspect the dependencies of bug 1543241.

If filing a bug, please include the full output of mach, including this error
message.

The details of the failure are as follows:

ImportError: cannot import name _psutil_linux

  File "/home/kats/zspace/gecko-mobile/mobile/android/mach_commands.py", line 390, in emulator
    if emulator.is_running():
  File "/home/kats/zspace/gecko-mobile/testing/mozbase/mozrunner/mozrunner/devices/android_device.py", line 371, in is_running
    from psutil import process_iter
  File "/home/kats/zspace/gecko-mobile/build/mach_bootstrap.py", line 475, in __call__
    module = self._original_import(name, globals, locals, fromlist, level)
  File "/home/kats/zspace/gecko-mobile/third_party/python/psutil/psutil/__init__.py", line 101, in <module>
    from . import _pslinux as _psplatform
  File "/home/kats/zspace/gecko-mobile/build/mach_bootstrap.py", line 475, in __call__
    module = self._original_import(name, globals, locals, fromlist, level)
  File "/home/kats/zspace/gecko-mobile/third_party/python/psutil/psutil/_pslinux.py", line 26, in <module>
    from . import _psutil_linux as cext

Backing out bug 1634717 does not solve the problem.

For now I just replaced the emulator.is_running() call with False to get the emulator started.

Unfortunately, wfm, on Ubuntu 18.04.

See Also: → 1620513
Whiteboard: dev-prod-2020
Assignee: nobody → gbrown
Status: NEW → ASSIGNED
Pushed by gbrown@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/dba24278315e
Use adb instead of psutil to check for running emulator; r=bc
Severity: -- → S4
Priority: -- → P1

[kaios] in that I had a similar psutil import error in the KaiOS environment!

Whiteboard: dev-prod-2020 → [dev-prod-2020] [kaios]
Summary: ./mach android-emulator fails with python import error → ./mach android-emulator fails with python import error (psutil)
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78

Thanks, on latest m-c this works for me now!

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: