Closed Bug 1729410 Opened 3 years ago Closed 3 years ago

[wdspec] Running tests on Android fails with: "OSError: No devices connected. Ensure the device is on and remote debugging via adb is enabled in the settings."

Categories

(Testing :: geckodriver, defect, P3)

Default
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1748328

People

(Reporter: whimboo, Unassigned)

References

(Blocks 1 open bug)

Details

While Mochitests are running fine, the wdspec tests cannot be run on my Motorola device (which is not rooted). The following command always fails:

mach wpt --webdriver-binary=target/debug/geckodriver --webdriver-arg=-vv testing/web-platform/tests/webdriver/tests

Here the detailed failure:

 0:45.52 ERROR Traceback (most recent call last):
  File "/Users/henrik/code/gecko/testing/web-platform/tests/tools/wptrunner/wptrunner/testrunner.py", line 209, in init
    self.browser.start(group_metadata=group_metadata, **self.browser_settings)
  File "/Users/henrik/code/gecko/testing/web-platform/tests/tools/wptrunner/wptrunner/browsers/firefox_android.py", line 244, in start
    self.runner.device.connect()
  File "/Users/henrik/code/gecko/testing/mozbase/mozrunner/mozrunner/devices/emulator.py", line 162, in connect
    super(BaseEmulator, self).connect()
  File "/Users/henrik/code/gecko/testing/mozbase/mozrunner/mozrunner/devices/base.py", line 152, in connect
    raise IOError(
OSError: No devices connected. Ensure the device is on and remote debugging via adb is enabled in the settings.

Not sure what's different to mochitest but it looks like we do not properly propagate the device name to mozdevice? Note that I also only have a single device connected. So we wouldn't even have to name a device. By using an emulator I do not get this failure, but it's not what I want here.

James, could this be related to the non-rooted state of the device? Why do we need root to run the tests?

Flags: needinfo?(james)

Note that other wpt tests immediately fail with that error, and abort the mach command while for wdspec we are trying to run each and every test file.

I don't know much about this. https://bugzilla.mozilla.org/show_bug.cgi?id=1486004 seems relevant; that claimed to cover wpt, but maybe it wasn't enough. I notice that mochitest seems to be using mozdevice directly rather than going via mozrunner. It may also be that we need to use FennecRunner rather than FennecEmulatorRunner at https://searchfox.org/mozilla-central/source/testing/web-platform/tests/tools/wptrunner/wptrunner/browsers/firefox_android.py#231 in the case the device isn't an emulator.

Flags: needinfo?(james)
Severity: -- → S3
Priority: -- → P3

This is actually a dupe of bug 1748328 and is fixed now.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.