Closed
Bug 1887548
Opened 8 months ago
Closed 8 months ago
Intermittent mozilla/tests/webdriver/harness/preferences_remote_agent.py | <test> - PermissionError: [Errno 13] Permission denied: <path>
Categories
(Remote Protocol :: Marionette, defect, P5)
Remote Protocol
Marionette
Tracking
(firefox126 fixed)
RESOLVED
FIXED
126 Branch
Tracking | Status | |
---|---|---|
firefox126 | --- | fixed |
People
(Reporter: intermittent-bug-filer, Assigned: whimboo)
References
Details
(Keywords: intermittent-failure, intermittent-testcase, Whiteboard: [webdriver:m11])
Attachments
(1 file)
Filed by: sstanca [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=452068466&repo=autoland
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/QNavHpO3RD2XtokMce9rwg/runs/0/artifacts/public/logs/live_backing.log
[task 2024-03-24T12:12:14.052Z] 12:12:14 INFO - TEST-PASS | /_mozilla/webdriver/harness/preferences_remote_agent.py | test_remote_agent_recommended_preferences_applied[bidi only]
[task 2024-03-24T12:12:14.052Z] 12:12:14 INFO - TEST-UNEXPECTED-FAIL | /_mozilla/webdriver/harness/preferences_remote_agent.py | test_remote_agent_recommended_preferences_applied[cdp only] - PermissionError: [Errno 13] Permission denied: 'C:\\Users\\task_171127970250660\\AppData\\Local\\Temp\\tmpbehlagy_\\prefs.js'
[task 2024-03-24T12:12:14.052Z] 12:12:14 INFO - browser = <function browser.<locals>._browser at 0x000001A29C447880>
[task 2024-03-24T12:12:14.052Z] 12:12:14 INFO - value = {'pref_value': 2, 'use_bidi': False, 'use_cdp': True}
[task 2024-03-24T12:12:14.052Z] 12:12:14 INFO -
[task 2024-03-24T12:12:14.052Z] 12:12:14 INFO - @pytest.mark.parametrize(
[task 2024-03-24T12:12:14.052Z] 12:12:14 INFO - "value",
[task 2024-03-24T12:12:14.052Z] 12:12:14 INFO - [
[task 2024-03-24T12:12:14.053Z] 12:12:14 INFO - {"pref_value": 1, "use_cdp": False, "use_bidi": True},
[task 2024-03-24T12:12:14.053Z] 12:12:14 INFO - {"pref_value": 2, "use_cdp": True, "use_bidi": False},
[task 2024-03-24T12:12:14.053Z] 12:12:14 INFO - {"pref_value": 3, "use_cdp": True, "use_bidi": True},
[task 2024-03-24T12:12:14.053Z] 12:12:14 INFO - ],
[task 2024-03-24T12:12:14.053Z] 12:12:14 INFO - ids=["bidi only", "cdp only", "bidi and cdp"],
[task 2024-03-24T12:12:14.053Z] 12:12:14 INFO - )
[task 2024-03-24T12:12:14.053Z] 12:12:14 INFO - def test_remote_agent_recommended_preferences_applied(browser, value):
[task 2024-03-24T12:12:14.053Z] 12:12:14 INFO - # Marionette cannot be enabled for this test because it will also set the
[task 2024-03-24T12:12:14.053Z] 12:12:14 INFO - # recommended preferences. Therefore only enable Remote Agent protocols.
[task 2024-03-24T12:12:14.053Z] 12:12:14 INFO - current_browser = browser(
[task 2024-03-24T12:12:14.053Z] 12:12:14 INFO - extra_prefs={
[task 2024-03-24T12:12:14.053Z] 12:12:14 INFO - "remote.active-protocols": value["pref_value"],
[task 2024-03-24T12:12:14.053Z] 12:12:14 INFO - },
[task 2024-03-24T12:12:14.053Z] 12:12:14 INFO - use_cdp=value["use_cdp"],
[task 2024-03-24T12:12:14.053Z] 12:12:14 INFO - use_bidi=value["use_bidi"],
[task 2024-03-24T12:12:14.053Z] 12:12:14 INFO - )
[task 2024-03-24T12:12:14.053Z] 12:12:14 INFO -
[task 2024-03-24T12:12:14.053Z] 12:12:14 INFO - def pref_is_set(_):
[task 2024-03-24T12:12:14.053Z] 12:12:14 INFO - preferences = read_user_preferences(current_browser.profile.profile, "prefs.js")
[task 2024-03-24T12:12:14.053Z] 12:12:14 INFO - return preferences.get("remote.prefs.recommended.applied", False)
[task 2024-03-24T12:12:14.054Z] 12:12:14 INFO -
[task 2024-03-24T12:12:14.054Z] 12:12:14 INFO - # Without Marionette enabled preferences cannot be retrieved via script evaluation yet.
[task 2024-03-24T12:12:14.054Z] 12:12:14 INFO - wait = Poll(
[task 2024-03-24T12:12:14.054Z] 12:12:14 INFO - None,
[task 2024-03-24T12:12:14.054Z] 12:12:14 INFO - timeout=5,
[task 2024-03-24T12:12:14.054Z] 12:12:14 INFO - ignored_exceptions=FileNotFoundError,
[task 2024-03-24T12:12:14.054Z] 12:12:14 INFO - message="""Preference "remote.prefs.recommended.applied" is not true""",
[task 2024-03-24T12:12:14.054Z] 12:12:14 INFO - )
[task 2024-03-24T12:12:14.054Z] 12:12:14 INFO - > wait.until(pref_is_set)
[task 2024-03-24T12:12:14.054Z] 12:12:14 INFO -
[task 2024-03-24T12:12:14.054Z] 12:12:14 INFO - browser = <function browser.<locals>._browser at 0x000001A29C447880>
[task 2024-03-24T12:12:14.054Z] 12:12:14 INFO - current_browser = <support.helpers.Browser object at 0x000001A29D505710>
[task 2024-03-24T12:12:14.054Z] 12:12:14 INFO - pref_is_set = <function test_remote_agent_recommended_preferences_applied.<locals>.pref_is_set at 0x000001A29C4BC4A0>
[task 2024-03-24T12:12:14.054Z] 12:12:14 INFO - value = {'pref_value': 2, 'use_bidi': False, 'use_cdp': True}
[task 2024-03-24T12:12:14.054Z] 12:12:14 INFO - wait = <tests.support.sync.Poll object at 0x000001A29D4BB1D0>
[task 2024-03-24T12:12:14.054Z] 12:12:14 INFO -
[task 2024-03-24T12:12:14.054Z] 12:12:14 INFO - tests\web-platform\mozilla\tests\webdriver\harness\preferences_remote_agent.py:37:
[task 2024-03-24T12:12:14.054Z] 12:12:14 INFO - _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[task 2024-03-24T12:12:14.054Z] 12:12:14 INFO - tests\web-platform\tests\webdriver\tests\support\sync.py:118: in until
[task 2024-03-24T12:12:14.054Z] 12:12:14 INFO - rv = condition(self.session)
[task 2024-03-24T12:12:14.054Z] 12:12:14 INFO - condition = <function test_remote_agent_recommended_preferences_applied.<locals>.pref_is_set at 0x000001A29C4BC4A0>
[task 2024-03-24T12:12:14.054Z] 12:12:14 INFO - end = 1711282332.8598187
[task 2024-03-24T12:12:14.054Z] 12:12:14 INFO - next = 1711282327.9598186
[task 2024-03-24T12:12:14.054Z] 12:12:14 INFO - rv = None
[task 2024-03-24T12:12:14.055Z] 12:12:14 INFO - self = <tests.support.sync.Poll object at 0x000001A29D4BB1D0>
[task 2024-03-24T12:12:14.055Z] 12:12:14 INFO - start = 1711282327.8598187
[task 2024-03-24T12:12:14.055Z] 12:12:14 INFO - tb = None
[task 2024-03-24T12:12:14.055Z] 12:12:14 INFO - tests\web-platform\mozilla\tests\webdriver\harness\preferences_remote_agent.py:27: in pref_is_set
[task 2024-03-24T12:12:14.055Z] 12:12:14 INFO - preferences = read_user_preferences(current_browser.profile.profile, "prefs.js")
[task 2024-03-24T12:12:14.055Z] 12:12:14 INFO - _ = None
[task 2024-03-24T12:12:14.055Z] 12:12:14 INFO - current_browser = <support.helpers.Browser object at 0x000001A29D505710>
[task 2024-03-24T12:12:14.055Z] 12:12:14 INFO - tests\web-platform\mozilla\tests\webdriver\support\helpers.py:293: in read_user_preferences
[task 2024-03-24T12:12:14.055Z] 12:12:14 INFO - for pref_name, pref_value in Preferences().read_prefs(prefs_file):
[task 2024-03-24T12:12:14.055Z] 12:12:14 INFO - filename = 'prefs.js'
[task 2024-03-24T12:12:14.055Z] 12:12:14 INFO - prefs = {}
[task 2024-03-24T12:12:14.055Z] 12:12:14 INFO - prefs_file = 'C:\\Users\\task_171127970250660\\AppData\\Local\\Temp\\tmpbehlagy_\\prefs.js'
[task 2024-03-24T12:12:14.055Z] 12:12:14 INFO - profile_path = 'C:\\Users\\task_171127970250660\\AppData\\Local\\Temp\\tmpbehlagy_'
[task 2024-03-24T12:12:14.055Z] 12:12:14 INFO - venv\Lib\site-packages\mozprofile\prefs.py:181: in read_prefs
[task 2024-03-24T12:12:14.055Z] 12:12:14 INFO - lines = [i.strip() for i in mozfile.load(path).readlines()]
[task 2024-03-24T12:12:14.055Z] 12:12:14 INFO - cls = <class 'mozprofile.prefs.Preferences'>
[task 2024-03-24T12:12:14.055Z] 12:12:14 INFO - interpolation = None
[task 2024-03-24T12:12:14.055Z] 12:12:14 INFO - marker = '##//'
[task 2024-03-24T12:12:14.055Z] 12:12:14 INFO - path = 'C:\\Users\\task_171127970250660\\AppData\\Local\\Temp\\tmpbehlagy_\\prefs.js'
[task 2024-03-24T12:12:14.056Z] 12:12:14 INFO - pref_setter = 'user_pref'
[task 2024-03-24T12:12:14.056Z] 12:12:14 INFO - _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[task 2024-03-24T12:12:14.056Z] 12:12:14 INFO -
[task 2024-03-24T12:12:14.056Z] 12:12:14 INFO - resource = 'C:\\Users\\task_171127970250660\\AppData\\Local\\Temp\\tmpbehlagy_\\prefs.js'
[task 2024-03-24T12:12:14.056Z] 12:12:14 INFO -
[task 2024-03-24T12:12:14.056Z] 12:12:14 INFO - def load(resource):
[task 2024-03-24T12:12:14.056Z] 12:12:14 INFO - """
[task 2024-03-24T12:12:14.056Z] 12:12:14 INFO - open a file or URL for reading. If the passed resource string is not a URL,
[task 2024-03-24T12:12:14.056Z] 12:12:14 INFO - or begins with 'file://', return a ``file``. Otherwise, return the
[task 2024-03-24T12:12:14.056Z] 12:12:14 INFO - result of urllib.urlopen()
[task 2024-03-24T12:12:14.056Z] 12:12:14 INFO - """
[task 2024-03-24T12:12:14.056Z] 12:12:14 INFO -
[task 2024-03-24T12:12:14.056Z] 12:12:14 INFO - # handle file URLs separately due to python stdlib limitations
[task 2024-03-24T12:12:14.056Z] 12:12:14 INFO - if resource.startswith("file://"):
[task 2024-03-24T12:12:14.056Z] 12:12:14 INFO - resource = resource[len("file://") :]
[task 2024-03-24T12:12:14.056Z] 12:12:14 INFO -
[task 2024-03-24T12:12:14.056Z] 12:12:14 INFO - if not is_url(resource):
[task 2024-03-24T12:12:14.056Z] 12:12:14 INFO - # if no scheme is given, it is a file path
[task 2024-03-24T12:12:14.056Z] 12:12:14 INFO - > return open(resource)
[task 2024-03-24T12:12:14.056Z] 12:12:14 INFO - E PermissionError: [Errno 13] Permission denied: 'C:\\Users\\task_171127970250660\\AppData\\Local\\Temp\\tmpbehlagy_\\prefs.js'
[task 2024-03-24T12:12:14.056Z] 12:12:14 INFO -
[task 2024-03-24T12:12:14.056Z] 12:12:14 INFO - resource = 'C:\\Users\\task_171127970250660\\AppData\\Local\\Temp\\tmpbehlagy_\\prefs.js'
[task 2024-03-24T12:12:14.056Z] 12:12:14 INFO -
[task 2024-03-24T12:12:14.056Z] 12:12:14 INFO - venv\Lib\site-packages\mozfile\mozfile.py:631: PermissionError
[task 2024-03-24T12:12:14.057Z] 12:12:14 INFO - .
[task 2024-03-24T12:12:14.057Z] 12:12:14 INFO - TEST-OK | /_mozilla/webdriver/harness/preferences_remote_agent.py | took 13604ms
Assignee | ||
Comment 1•8 months ago
|
||
Most likely we should add the PermissionError
as well to the list of ignored exceptions, or directly change the FileNotFoundError
to an OSError
to cover all OS errors while Firefox is creating that file and writing the preferences into it.
Comment hidden (Intermittent Failures Robot) |
Comment hidden (Intermittent Failures Robot) |
Assignee | ||
Comment 4•8 months ago
|
||
Updated•8 months ago
|
Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Assignee | ||
Updated•8 months ago
|
Points: --- → 1
Whiteboard: [webdriver:m11]
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/85795e516636
[wdspec] Ignore all IOError and not just FileNotFoundError for preferences_remote_agent.py. r=webdriver-reviewers,jgraham
Comment 6•8 months ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
status-firefox126:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 126 Branch
Comment hidden (Intermittent Failures Robot) |
You need to log in
before you can comment on or make changes to this bug.
Description
•