Skip to content

Stealth extension #1030

Stealth extension

Stealth extension #1030

GitHub Actions / test/test_[p]* failed Jan 25, 2024 in 1s

test/test_[p]* ❌

Tests failed

❌ junit-report.xml

21 tests were completed in 12s with 1 passed, 20 failed and 0 skipped.

Test suite Passed Failed Skipped Time
pytest 1✅ 20❌ 12s

❌ pytest

test.test_profile
  ❌ test_saving
	default_params = (ManagerParams(data_directory=PosixPath('/tmp/pytest-of-runner/pytest-0/test_saving0'), log_path=PosixPath('/tmp/pytes...'/tmp'), maximum_profile_size=None, recovery_tar=None, donottrack=False, tracking_protection=False, custom_params={})])
  ❌ test_save_incomplete_profile_error
	default_params = (ManagerParams(data_directory=PosixPath('/tmp/pytest-of-runner/pytest-0/test_save_incomplete_profile_e0'), log_path=Po...'/tmp'), maximum_profile_size=None, recovery_tar=None, donottrack=False, tracking_protection=False, custom_params={})])
  ❌ test_crash_profile
	default_params = (ManagerParams(data_directory=PosixPath('/tmp/pytest-of-runner/pytest-0/test_crash_profile0'), log_path=PosixPath('/tm...'/tmp'), maximum_profile_size=None, recovery_tar=None, donottrack=False, tracking_protection=False, custom_params={})])
  ❌ test_profile_error
	default_params = (ManagerParams(data_directory=PosixPath('/tmp/pytest-of-runner/pytest-0/test_profile_error0'), log_path=PosixPath('/tm...'/tmp'), maximum_profile_size=None, recovery_tar=None, donottrack=False, tracking_protection=False, custom_params={})])
  ❌ test_profile_saved_when_launch_crashes
	monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f1baf8f7590>
  ❌ test_seed_persistence
	default_params = (ManagerParams(data_directory=PosixPath('/tmp/pytest-of-runner/pytest-0/test_seed_persistence0'), log_path=PosixPath('...'/tmp'), maximum_profile_size=None, recovery_tar=None, donottrack=False, tracking_protection=False, custom_params={})])
  ❌ test_dump_profile_command
	default_params = (ManagerParams(data_directory=PosixPath('/tmp/pytest-of-runner/pytest-0/test_dump_profile_command0'), log_path=PosixPa...'/tmp'), maximum_profile_size=None, recovery_tar=None, donottrack=False, tracking_protection=False, custom_params={})])
  ✅ test_load_tar_file
  ❌ test_crash_during_init
	default_params = (ManagerParams(data_directory=PosixPath('/tmp/pytest-of-runner/pytest-0/test_crash_during_init0'), log_path=PosixPath(...'/tmp'), maximum_profile_size=None, recovery_tar=None, donottrack=False, tracking_protection=False, custom_params={})])
  ❌ test_profile_recovery[on_normal_operation-stateful-without_seed_tar]
	monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f1baf78eb40>
  ❌ test_profile_recovery[on_normal_operation-stateful-with_seed_tar]
	monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f1baf7cc6e0>
  ❌ test_profile_recovery[on_normal_operation-stateless-with_seed_tar]
	monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f1baf78fd40>
  ❌ test_profile_recovery[on_crash-stateful-without_seed_tar]
	monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f1bae7018b0>
  ❌ test_profile_recovery[on_crash-stateful-with_seed_tar]
	monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f1bae6193d0>
  ❌ test_profile_recovery[on_crash-stateless-with_seed_tar]
	monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f1bae703440>
  ❌ test_profile_recovery[on_crash_during_launch-stateful-without_seed_tar]
	monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f1baf7cf290>
  ❌ test_profile_recovery[on_crash_during_launch-stateful-with_seed_tar]
	monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f1baf7cde20>
  ❌ test_profile_recovery[on_crash_during_launch-stateless-with_seed_tar]
	monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f1bae66e3f0>
  ❌ test_profile_recovery[on_timeout-stateful-without_seed_tar]
	monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f1bae6bc3e0>
  ❌ test_profile_recovery[on_timeout-stateful-with_seed_tar]
	monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f1bae7003b0>
  ❌ test_profile_recovery[on_timeout-stateless-with_seed_tar]
	monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f1bae66fe90>

Annotations

Check failure on line 0 in junit-report.xml

See this annotation in the file changed.

@github-actions github-actions / test/test_[p]*

pytest ► test.test_profile ► test_saving

Failed test found in:
  junit-report.xml
Error:
  default_params = (ManagerParams(data_directory=PosixPath('/tmp/pytest-of-runner/pytest-0/test_saving0'), log_path=PosixPath('/tmp/pytes...'/tmp'), maximum_profile_size=None, recovery_tar=None, donottrack=False, tracking_protection=False, custom_params={})])
Raw output
default_params = (ManagerParams(data_directory=PosixPath('/tmp/pytest-of-runner/pytest-0/test_saving0'), log_path=PosixPath('/tmp/pytes...'/tmp'), maximum_profile_size=None, recovery_tar=None, donottrack=False, tracking_protection=False, custom_params={})])
task_manager_creator = <function task_manager_creator.<locals>._create_task_manager at 0x7f1baf77ee80>

    def test_saving(default_params, task_manager_creator):
        manager_params, browser_params = default_params
        manager_params.num_browsers = 1
        browser_params[0].profile_archive_dir = (
            manager_params.data_directory / "browser_profile"
        )
>       manager, _ = task_manager_creator((manager_params, browser_params[:1]))

/home/runner/work/OpenWPM/OpenWPM/test/test_profile.py:27: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/OpenWPM/OpenWPM/test/conftest.py:80: in _create_task_manager
    manager = TaskManager(
/home/runner/work/OpenWPM/OpenWPM/openwpm/task_manager.py:99: in __init__
    cleaned_js_settings = clean_js_instrumentation_settings(js_settings)
/home/runner/work/OpenWPM/OpenWPM/openwpm/js_instrumentation.py:245: in clean_js_instrumentation_settings
    _validate(settings)
/home/runner/work/OpenWPM/OpenWPM/openwpm/js_instrumentation.py:27: in _validate
    jsonschema.validate(instance=python_list_to_validate, schema=schema)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

instance = [{'instrumentedName': 'ScriptProcessorNode', 'logSettings': {'depth': 5, 'excludedProperties': [], 'logCallStack': Fal...erties': [], 'logCallStack': False, 'logFunctionGets': False, ...}, 'object': "window['AudioContext'].prototype"}, ...]
schema = {'$id': 'http://example.com/js-instrument-settings.schema', '$schema': 'http://json-schema.org/draft-07/schema#', 'des... 'type': 'string'}}, 'required': ['object', 'instrumentedName', 'logSettings'], 'title': 'Settings objects', ...}, ...}
cls = <class 'jsonschema.validators.Draft7Validator'>, args = (), kwargs = {}
validator = Draft7Validator(schema={'$id': 'http://examp...ttings.schema', '$schema': 'http://json-...ft-07/schema#', 'description...required': ['object', 'instrumentedName', 'logSettings'], 'title': 'Settings objects', ...}, ...}, format_checker=None)
error = <ValidationError: "'sessionStorage' is not of type 'object'">

    def validate(instance, schema, cls=None, *args, **kwargs):  # noqa: D417
        """
        Validate an instance under the given schema.
    
            >>> validate([2, 3, 4], {"maxItems": 2})
            Traceback (most recent call last):
                ...
            ValidationError: [2, 3, 4] is too long
    
        :func:`~jsonschema.validators.validate` will first verify that the
        provided schema is itself valid, since not doing so can lead to less
        obvious error messages and fail in less obvious or consistent ways.
    
        If you know you have a valid schema already, especially
        if you intend to validate multiple instances with
        the same schema, you likely would prefer using the
        `jsonschema.protocols.Validator.validate` method directly on a
        specific validator (e.g. ``Draft202012Validator.validate``).
    
    
        Arguments:
    
            instance:
    
                The instance to validate
    
            schema:
    
                The schema to validate with
    
            cls (jsonschema.protocols.Validator):
    
                The class that will be used to validate the instance.
    
        If the ``cls`` argument is not provided, two things will happen
        in accordance with the specification. First, if the schema has a
        :kw:`$schema` keyword containing a known meta-schema [#]_ then the
        proper validator will be used. The specification recommends that
        all schemas contain :kw:`$schema` properties for this reason. If no
        :kw:`$schema` property is found, the default validator class is the
        latest released draft.
    
        Any other provided positional and keyword arguments will be passed
        on when instantiating the ``cls``.
    
        Raises:
    
            `jsonschema.exceptions.ValidationError`:
    
                if the instance is invalid
    
            `jsonschema.exceptions.SchemaError`:
    
                if the schema itself is invalid
    
        .. rubric:: Footnotes
        .. [#] known by a validator registered with
            `jsonschema.validators.validates`
        """
        if cls is None:
            cls = validator_for(schema)
    
        cls.check_schema(schema)
        validator = cls(schema, *args, **kwargs)
        error = exceptions.best_match(validator.iter_errors(instance))
        if error is not None:
>           raise error
E           jsonschema.exceptions.ValidationError: 'sessionStorage' is not of type 'object'
E           
E           Failed validating 'type' in schema['items']['properties']['logSettings']['properties']['propertiesToInstrument']['items']:
E               {'properties': {'depth': {'type': 'integer'},
E                               'propertyNames': {'items': {'type': 'string'},
E                                                 'type': 'array'}},
E                'type': 'object'}
E           
E           On instance[11]['logSettings']['propertiesToInstrument'][0]:
E               'sessionStorage'

/home/runner/mamba/envs/openwpm/lib/python3.12/site-packages/jsonschema/validators.py:1312: ValidationError

Check failure on line 0 in junit-report.xml

See this annotation in the file changed.

@github-actions github-actions / test/test_[p]*

pytest ► test.test_profile ► test_save_incomplete_profile_error

Failed test found in:
  junit-report.xml
Error:
  default_params = (ManagerParams(data_directory=PosixPath('/tmp/pytest-of-runner/pytest-0/test_save_incomplete_profile_e0'), log_path=Po...'/tmp'), maximum_profile_size=None, recovery_tar=None, donottrack=False, tracking_protection=False, custom_params={})])
Raw output
default_params = (ManagerParams(data_directory=PosixPath('/tmp/pytest-of-runner/pytest-0/test_save_incomplete_profile_e0'), log_path=Po...'/tmp'), maximum_profile_size=None, recovery_tar=None, donottrack=False, tracking_protection=False, custom_params={})])
task_manager_creator = <function task_manager_creator.<locals>._create_task_manager at 0x7f1baf79fb00>

    def test_save_incomplete_profile_error(default_params, task_manager_creator):
        manager_params, browser_params = default_params
        manager_params.num_browsers = 1
        browser_params[0].profile_archive_dir = (
            manager_params.data_directory / "browser_profile"
        )
>       manager, _ = task_manager_creator((manager_params, browser_params[:1]))

/home/runner/work/OpenWPM/OpenWPM/test/test_profile.py:54: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/OpenWPM/OpenWPM/test/conftest.py:80: in _create_task_manager
    manager = TaskManager(
/home/runner/work/OpenWPM/OpenWPM/openwpm/task_manager.py:99: in __init__
    cleaned_js_settings = clean_js_instrumentation_settings(js_settings)
/home/runner/work/OpenWPM/OpenWPM/openwpm/js_instrumentation.py:245: in clean_js_instrumentation_settings
    _validate(settings)
/home/runner/work/OpenWPM/OpenWPM/openwpm/js_instrumentation.py:27: in _validate
    jsonschema.validate(instance=python_list_to_validate, schema=schema)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

instance = [{'instrumentedName': 'ScriptProcessorNode', 'logSettings': {'depth': 5, 'excludedProperties': [], 'logCallStack': Fal...erties': [], 'logCallStack': False, 'logFunctionGets': False, ...}, 'object': "window['AudioContext'].prototype"}, ...]
schema = {'$id': 'http://example.com/js-instrument-settings.schema', '$schema': 'http://json-schema.org/draft-07/schema#', 'des... 'type': 'string'}}, 'required': ['object', 'instrumentedName', 'logSettings'], 'title': 'Settings objects', ...}, ...}
cls = <class 'jsonschema.validators.Draft7Validator'>, args = (), kwargs = {}
validator = Draft7Validator(schema={'$id': 'http://examp...ttings.schema', '$schema': 'http://json-...ft-07/schema#', 'description...required': ['object', 'instrumentedName', 'logSettings'], 'title': 'Settings objects', ...}, ...}, format_checker=None)
error = <ValidationError: "'sessionStorage' is not of type 'object'">

    def validate(instance, schema, cls=None, *args, **kwargs):  # noqa: D417
        """
        Validate an instance under the given schema.
    
            >>> validate([2, 3, 4], {"maxItems": 2})
            Traceback (most recent call last):
                ...
            ValidationError: [2, 3, 4] is too long
    
        :func:`~jsonschema.validators.validate` will first verify that the
        provided schema is itself valid, since not doing so can lead to less
        obvious error messages and fail in less obvious or consistent ways.
    
        If you know you have a valid schema already, especially
        if you intend to validate multiple instances with
        the same schema, you likely would prefer using the
        `jsonschema.protocols.Validator.validate` method directly on a
        specific validator (e.g. ``Draft202012Validator.validate``).
    
    
        Arguments:
    
            instance:
    
                The instance to validate
    
            schema:
    
                The schema to validate with
    
            cls (jsonschema.protocols.Validator):
    
                The class that will be used to validate the instance.
    
        If the ``cls`` argument is not provided, two things will happen
        in accordance with the specification. First, if the schema has a
        :kw:`$schema` keyword containing a known meta-schema [#]_ then the
        proper validator will be used. The specification recommends that
        all schemas contain :kw:`$schema` properties for this reason. If no
        :kw:`$schema` property is found, the default validator class is the
        latest released draft.
    
        Any other provided positional and keyword arguments will be passed
        on when instantiating the ``cls``.
    
        Raises:
    
            `jsonschema.exceptions.ValidationError`:
    
                if the instance is invalid
    
            `jsonschema.exceptions.SchemaError`:
    
                if the schema itself is invalid
    
        .. rubric:: Footnotes
        .. [#] known by a validator registered with
            `jsonschema.validators.validates`
        """
        if cls is None:
            cls = validator_for(schema)
    
        cls.check_schema(schema)
        validator = cls(schema, *args, **kwargs)
        error = exceptions.best_match(validator.iter_errors(instance))
        if error is not None:
>           raise error
E           jsonschema.exceptions.ValidationError: 'sessionStorage' is not of type 'object'
E           
E           Failed validating 'type' in schema['items']['properties']['logSettings']['properties']['propertiesToInstrument']['items']:
E               {'properties': {'depth': {'type': 'integer'},
E                               'propertyNames': {'items': {'type': 'string'},
E                                                 'type': 'array'}},
E                'type': 'object'}
E           
E           On instance[11]['logSettings']['propertiesToInstrument'][0]:
E               'sessionStorage'

/home/runner/mamba/envs/openwpm/lib/python3.12/site-packages/jsonschema/validators.py:1312: ValidationError

Check failure on line 0 in junit-report.xml

See this annotation in the file changed.

@github-actions github-actions / test/test_[p]*

pytest ► test.test_profile ► test_crash_profile

Failed test found in:
  junit-report.xml
Error:
  default_params = (ManagerParams(data_directory=PosixPath('/tmp/pytest-of-runner/pytest-0/test_crash_profile0'), log_path=PosixPath('/tm...'/tmp'), maximum_profile_size=None, recovery_tar=None, donottrack=False, tracking_protection=False, custom_params={})])
Raw output
default_params = (ManagerParams(data_directory=PosixPath('/tmp/pytest-of-runner/pytest-0/test_crash_profile0'), log_path=PosixPath('/tm...'/tmp'), maximum_profile_size=None, recovery_tar=None, donottrack=False, tracking_protection=False, custom_params={})])
task_manager_creator = <function task_manager_creator.<locals>._create_task_manager at 0x7f1baf808220>

    def test_crash_profile(default_params, task_manager_creator):
        manager_params, browser_params = default_params
        manager_params.num_browsers = 1
        manager_params.failure_limit = 2
        browser_params[0].profile_archive_dir = (
            manager_params.data_directory / "browser_profile"
        )
>       manager, _ = task_manager_creator((manager_params, browser_params[:1]))

/home/runner/work/OpenWPM/OpenWPM/test/test_profile.py:69: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/OpenWPM/OpenWPM/test/conftest.py:80: in _create_task_manager
    manager = TaskManager(
/home/runner/work/OpenWPM/OpenWPM/openwpm/task_manager.py:99: in __init__
    cleaned_js_settings = clean_js_instrumentation_settings(js_settings)
/home/runner/work/OpenWPM/OpenWPM/openwpm/js_instrumentation.py:245: in clean_js_instrumentation_settings
    _validate(settings)
/home/runner/work/OpenWPM/OpenWPM/openwpm/js_instrumentation.py:27: in _validate
    jsonschema.validate(instance=python_list_to_validate, schema=schema)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

instance = [{'instrumentedName': 'ScriptProcessorNode', 'logSettings': {'depth': 5, 'excludedProperties': [], 'logCallStack': Fal...erties': [], 'logCallStack': False, 'logFunctionGets': False, ...}, 'object': "window['AudioContext'].prototype"}, ...]
schema = {'$id': 'http://example.com/js-instrument-settings.schema', '$schema': 'http://json-schema.org/draft-07/schema#', 'des... 'type': 'string'}}, 'required': ['object', 'instrumentedName', 'logSettings'], 'title': 'Settings objects', ...}, ...}
cls = <class 'jsonschema.validators.Draft7Validator'>, args = (), kwargs = {}
validator = Draft7Validator(schema={'$id': 'http://examp...ttings.schema', '$schema': 'http://json-...ft-07/schema#', 'description...required': ['object', 'instrumentedName', 'logSettings'], 'title': 'Settings objects', ...}, ...}, format_checker=None)
error = <ValidationError: "'sessionStorage' is not of type 'object'">

    def validate(instance, schema, cls=None, *args, **kwargs):  # noqa: D417
        """
        Validate an instance under the given schema.
    
            >>> validate([2, 3, 4], {"maxItems": 2})
            Traceback (most recent call last):
                ...
            ValidationError: [2, 3, 4] is too long
    
        :func:`~jsonschema.validators.validate` will first verify that the
        provided schema is itself valid, since not doing so can lead to less
        obvious error messages and fail in less obvious or consistent ways.
    
        If you know you have a valid schema already, especially
        if you intend to validate multiple instances with
        the same schema, you likely would prefer using the
        `jsonschema.protocols.Validator.validate` method directly on a
        specific validator (e.g. ``Draft202012Validator.validate``).
    
    
        Arguments:
    
            instance:
    
                The instance to validate
    
            schema:
    
                The schema to validate with
    
            cls (jsonschema.protocols.Validator):
    
                The class that will be used to validate the instance.
    
        If the ``cls`` argument is not provided, two things will happen
        in accordance with the specification. First, if the schema has a
        :kw:`$schema` keyword containing a known meta-schema [#]_ then the
        proper validator will be used. The specification recommends that
        all schemas contain :kw:`$schema` properties for this reason. If no
        :kw:`$schema` property is found, the default validator class is the
        latest released draft.
    
        Any other provided positional and keyword arguments will be passed
        on when instantiating the ``cls``.
    
        Raises:
    
            `jsonschema.exceptions.ValidationError`:
    
                if the instance is invalid
    
            `jsonschema.exceptions.SchemaError`:
    
                if the schema itself is invalid
    
        .. rubric:: Footnotes
        .. [#] known by a validator registered with
            `jsonschema.validators.validates`
        """
        if cls is None:
            cls = validator_for(schema)
    
        cls.check_schema(schema)
        validator = cls(schema, *args, **kwargs)
        error = exceptions.best_match(validator.iter_errors(instance))
        if error is not None:
>           raise error
E           jsonschema.exceptions.ValidationError: 'sessionStorage' is not of type 'object'
E           
E           Failed validating 'type' in schema['items']['properties']['logSettings']['properties']['propertiesToInstrument']['items']:
E               {'properties': {'depth': {'type': 'integer'},
E                               'propertyNames': {'items': {'type': 'string'},
E                                                 'type': 'array'}},
E                'type': 'object'}
E           
E           On instance[11]['logSettings']['propertiesToInstrument'][0]:
E               'sessionStorage'

/home/runner/mamba/envs/openwpm/lib/python3.12/site-packages/jsonschema/validators.py:1312: ValidationError

Check failure on line 0 in junit-report.xml

See this annotation in the file changed.

@github-actions github-actions / test/test_[p]*

pytest ► test.test_profile ► test_profile_error

Failed test found in:
  junit-report.xml
Error:
  default_params = (ManagerParams(data_directory=PosixPath('/tmp/pytest-of-runner/pytest-0/test_profile_error0'), log_path=PosixPath('/tm...'/tmp'), maximum_profile_size=None, recovery_tar=None, donottrack=False, tracking_protection=False, custom_params={})])
Raw output
default_params = (ManagerParams(data_directory=PosixPath('/tmp/pytest-of-runner/pytest-0/test_profile_error0'), log_path=PosixPath('/tm...'/tmp'), maximum_profile_size=None, recovery_tar=None, donottrack=False, tracking_protection=False, custom_params={})])
task_manager_creator = <function task_manager_creator.<locals>._create_task_manager at 0x7f1baf8089a0>

    def test_profile_error(default_params, task_manager_creator):
        manager_params, browser_params = default_params
        manager_params.num_browsers = 1
        browser_params[0].seed_tar = Path("/tmp/NOTREAL")
        with pytest.raises(ProfileLoadError):
>           task_manager_creator((manager_params, browser_params[:1]))

/home/runner/work/OpenWPM/OpenWPM/test/test_profile.py:86: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/OpenWPM/OpenWPM/test/conftest.py:80: in _create_task_manager
    manager = TaskManager(
/home/runner/work/OpenWPM/OpenWPM/openwpm/task_manager.py:99: in __init__
    cleaned_js_settings = clean_js_instrumentation_settings(js_settings)
/home/runner/work/OpenWPM/OpenWPM/openwpm/js_instrumentation.py:245: in clean_js_instrumentation_settings
    _validate(settings)
/home/runner/work/OpenWPM/OpenWPM/openwpm/js_instrumentation.py:27: in _validate
    jsonschema.validate(instance=python_list_to_validate, schema=schema)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

instance = [{'instrumentedName': 'ScriptProcessorNode', 'logSettings': {'depth': 5, 'excludedProperties': [], 'logCallStack': Fal...erties': [], 'logCallStack': False, 'logFunctionGets': False, ...}, 'object': "window['AudioContext'].prototype"}, ...]
schema = {'$id': 'http://example.com/js-instrument-settings.schema', '$schema': 'http://json-schema.org/draft-07/schema#', 'des... 'type': 'string'}}, 'required': ['object', 'instrumentedName', 'logSettings'], 'title': 'Settings objects', ...}, ...}
cls = <class 'jsonschema.validators.Draft7Validator'>, args = (), kwargs = {}
validator = Draft7Validator(schema={'$id': 'http://examp...ttings.schema', '$schema': 'http://json-...ft-07/schema#', 'description...required': ['object', 'instrumentedName', 'logSettings'], 'title': 'Settings objects', ...}, ...}, format_checker=None)
error = <ValidationError: "'sessionStorage' is not of type 'object'">

    def validate(instance, schema, cls=None, *args, **kwargs):  # noqa: D417
        """
        Validate an instance under the given schema.
    
            >>> validate([2, 3, 4], {"maxItems": 2})
            Traceback (most recent call last):
                ...
            ValidationError: [2, 3, 4] is too long
    
        :func:`~jsonschema.validators.validate` will first verify that the
        provided schema is itself valid, since not doing so can lead to less
        obvious error messages and fail in less obvious or consistent ways.
    
        If you know you have a valid schema already, especially
        if you intend to validate multiple instances with
        the same schema, you likely would prefer using the
        `jsonschema.protocols.Validator.validate` method directly on a
        specific validator (e.g. ``Draft202012Validator.validate``).
    
    
        Arguments:
    
            instance:
    
                The instance to validate
    
            schema:
    
                The schema to validate with
    
            cls (jsonschema.protocols.Validator):
    
                The class that will be used to validate the instance.
    
        If the ``cls`` argument is not provided, two things will happen
        in accordance with the specification. First, if the schema has a
        :kw:`$schema` keyword containing a known meta-schema [#]_ then the
        proper validator will be used. The specification recommends that
        all schemas contain :kw:`$schema` properties for this reason. If no
        :kw:`$schema` property is found, the default validator class is the
        latest released draft.
    
        Any other provided positional and keyword arguments will be passed
        on when instantiating the ``cls``.
    
        Raises:
    
            `jsonschema.exceptions.ValidationError`:
    
                if the instance is invalid
    
            `jsonschema.exceptions.SchemaError`:
    
                if the schema itself is invalid
    
        .. rubric:: Footnotes
        .. [#] known by a validator registered with
            `jsonschema.validators.validates`
        """
        if cls is None:
            cls = validator_for(schema)
    
        cls.check_schema(schema)
        validator = cls(schema, *args, **kwargs)
        error = exceptions.best_match(validator.iter_errors(instance))
        if error is not None:
>           raise error
E           jsonschema.exceptions.ValidationError: 'sessionStorage' is not of type 'object'
E           
E           Failed validating 'type' in schema['items']['properties']['logSettings']['properties']['propertiesToInstrument']['items']:
E               {'properties': {'depth': {'type': 'integer'},
E                               'propertyNames': {'items': {'type': 'string'},
E                                                 'type': 'array'}},
E                'type': 'object'}
E           
E           On instance[11]['logSettings']['propertiesToInstrument'][0]:
E               'sessionStorage'

/home/runner/mamba/envs/openwpm/lib/python3.12/site-packages/jsonschema/validators.py:1312: ValidationError

Check failure on line 0 in junit-report.xml

See this annotation in the file changed.

@github-actions github-actions / test/test_[p]*

pytest ► test.test_profile ► test_profile_saved_when_launch_crashes

Failed test found in:
  junit-report.xml
Error:
  monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f1baf8f7590>
Raw output
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f1baf8f7590>
default_params = (ManagerParams(data_directory=PosixPath('/tmp/pytest-of-runner/pytest-0/test_profile_saved_when_launch0'), log_path=Po...'/tmp'), maximum_profile_size=None, recovery_tar=None, donottrack=False, tracking_protection=False, custom_params={})])
task_manager_creator = <function task_manager_creator.<locals>._create_task_manager at 0x7f1baf808ea0>

    def test_profile_saved_when_launch_crashes(
        monkeypatch, default_params, task_manager_creator
    ):
        manager_params, browser_params = default_params
        manager_params.num_browsers = 1
        browser_params[0].profile_archive_dir = (
            manager_params.data_directory / "browser_profile"
        )
>       manager, _ = task_manager_creator((manager_params, browser_params[:1]))

/home/runner/work/OpenWPM/OpenWPM/test/test_profile.py:97: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/OpenWPM/OpenWPM/test/conftest.py:80: in _create_task_manager
    manager = TaskManager(
/home/runner/work/OpenWPM/OpenWPM/openwpm/task_manager.py:99: in __init__
    cleaned_js_settings = clean_js_instrumentation_settings(js_settings)
/home/runner/work/OpenWPM/OpenWPM/openwpm/js_instrumentation.py:245: in clean_js_instrumentation_settings
    _validate(settings)
/home/runner/work/OpenWPM/OpenWPM/openwpm/js_instrumentation.py:27: in _validate
    jsonschema.validate(instance=python_list_to_validate, schema=schema)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

instance = [{'instrumentedName': 'ScriptProcessorNode', 'logSettings': {'depth': 5, 'excludedProperties': [], 'logCallStack': Fal...erties': [], 'logCallStack': False, 'logFunctionGets': False, ...}, 'object': "window['AudioContext'].prototype"}, ...]
schema = {'$id': 'http://example.com/js-instrument-settings.schema', '$schema': 'http://json-schema.org/draft-07/schema#', 'des... 'type': 'string'}}, 'required': ['object', 'instrumentedName', 'logSettings'], 'title': 'Settings objects', ...}, ...}
cls = <class 'jsonschema.validators.Draft7Validator'>, args = (), kwargs = {}
validator = Draft7Validator(schema={'$id': 'http://examp...ttings.schema', '$schema': 'http://json-...ft-07/schema#', 'description...required': ['object', 'instrumentedName', 'logSettings'], 'title': 'Settings objects', ...}, ...}, format_checker=None)
error = <ValidationError: "'sessionStorage' is not of type 'object'">

    def validate(instance, schema, cls=None, *args, **kwargs):  # noqa: D417
        """
        Validate an instance under the given schema.
    
            >>> validate([2, 3, 4], {"maxItems": 2})
            Traceback (most recent call last):
                ...
            ValidationError: [2, 3, 4] is too long
    
        :func:`~jsonschema.validators.validate` will first verify that the
        provided schema is itself valid, since not doing so can lead to less
        obvious error messages and fail in less obvious or consistent ways.
    
        If you know you have a valid schema already, especially
        if you intend to validate multiple instances with
        the same schema, you likely would prefer using the
        `jsonschema.protocols.Validator.validate` method directly on a
        specific validator (e.g. ``Draft202012Validator.validate``).
    
    
        Arguments:
    
            instance:
    
                The instance to validate
    
            schema:
    
                The schema to validate with
    
            cls (jsonschema.protocols.Validator):
    
                The class that will be used to validate the instance.
    
        If the ``cls`` argument is not provided, two things will happen
        in accordance with the specification. First, if the schema has a
        :kw:`$schema` keyword containing a known meta-schema [#]_ then the
        proper validator will be used. The specification recommends that
        all schemas contain :kw:`$schema` properties for this reason. If no
        :kw:`$schema` property is found, the default validator class is the
        latest released draft.
    
        Any other provided positional and keyword arguments will be passed
        on when instantiating the ``cls``.
    
        Raises:
    
            `jsonschema.exceptions.ValidationError`:
    
                if the instance is invalid
    
            `jsonschema.exceptions.SchemaError`:
    
                if the schema itself is invalid
    
        .. rubric:: Footnotes
        .. [#] known by a validator registered with
            `jsonschema.validators.validates`
        """
        if cls is None:
            cls = validator_for(schema)
    
        cls.check_schema(schema)
        validator = cls(schema, *args, **kwargs)
        error = exceptions.best_match(validator.iter_errors(instance))
        if error is not None:
>           raise error
E           jsonschema.exceptions.ValidationError: 'sessionStorage' is not of type 'object'
E           
E           Failed validating 'type' in schema['items']['properties']['logSettings']['properties']['propertiesToInstrument']['items']:
E               {'properties': {'depth': {'type': 'integer'},
E                               'propertyNames': {'items': {'type': 'string'},
E                                                 'type': 'array'}},
E                'type': 'object'}
E           
E           On instance[11]['logSettings']['propertiesToInstrument'][0]:
E               'sessionStorage'

/home/runner/mamba/envs/openwpm/lib/python3.12/site-packages/jsonschema/validators.py:1312: ValidationError

Check failure on line 0 in junit-report.xml

See this annotation in the file changed.

@github-actions github-actions / test/test_[p]*

pytest ► test.test_profile ► test_seed_persistence

Failed test found in:
  junit-report.xml
Error:
  default_params = (ManagerParams(data_directory=PosixPath('/tmp/pytest-of-runner/pytest-0/test_seed_persistence0'), log_path=PosixPath('...'/tmp'), maximum_profile_size=None, recovery_tar=None, donottrack=False, tracking_protection=False, custom_params={})])
Raw output
default_params = (ManagerParams(data_directory=PosixPath('/tmp/pytest-of-runner/pytest-0/test_seed_persistence0'), log_path=PosixPath('...'/tmp'), maximum_profile_size=None, recovery_tar=None, donottrack=False, tracking_protection=False, custom_params={})])
task_manager_creator = <function task_manager_creator.<locals>._create_task_manager at 0x7f1baf808fe0>

    def test_seed_persistence(default_params, task_manager_creator):
        manager_params, browser_params = default_params
        p = Path("profile.tar.gz")
        for browser_param in browser_params:
            browser_param.seed_tar = p
>       manager, db = task_manager_creator(default_params)

/home/runner/work/OpenWPM/OpenWPM/test/test_profile.py:119: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/OpenWPM/OpenWPM/test/conftest.py:80: in _create_task_manager
    manager = TaskManager(
/home/runner/work/OpenWPM/OpenWPM/openwpm/task_manager.py:99: in __init__
    cleaned_js_settings = clean_js_instrumentation_settings(js_settings)
/home/runner/work/OpenWPM/OpenWPM/openwpm/js_instrumentation.py:245: in clean_js_instrumentation_settings
    _validate(settings)
/home/runner/work/OpenWPM/OpenWPM/openwpm/js_instrumentation.py:27: in _validate
    jsonschema.validate(instance=python_list_to_validate, schema=schema)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

instance = [{'instrumentedName': 'ScriptProcessorNode', 'logSettings': {'depth': 5, 'excludedProperties': [], 'logCallStack': Fal...erties': [], 'logCallStack': False, 'logFunctionGets': False, ...}, 'object': "window['AudioContext'].prototype"}, ...]
schema = {'$id': 'http://example.com/js-instrument-settings.schema', '$schema': 'http://json-schema.org/draft-07/schema#', 'des... 'type': 'string'}}, 'required': ['object', 'instrumentedName', 'logSettings'], 'title': 'Settings objects', ...}, ...}
cls = <class 'jsonschema.validators.Draft7Validator'>, args = (), kwargs = {}
validator = Draft7Validator(schema={'$id': 'http://examp...ttings.schema', '$schema': 'http://json-...ft-07/schema#', 'description...required': ['object', 'instrumentedName', 'logSettings'], 'title': 'Settings objects', ...}, ...}, format_checker=None)
error = <ValidationError: "'sessionStorage' is not of type 'object'">

    def validate(instance, schema, cls=None, *args, **kwargs):  # noqa: D417
        """
        Validate an instance under the given schema.
    
            >>> validate([2, 3, 4], {"maxItems": 2})
            Traceback (most recent call last):
                ...
            ValidationError: [2, 3, 4] is too long
    
        :func:`~jsonschema.validators.validate` will first verify that the
        provided schema is itself valid, since not doing so can lead to less
        obvious error messages and fail in less obvious or consistent ways.
    
        If you know you have a valid schema already, especially
        if you intend to validate multiple instances with
        the same schema, you likely would prefer using the
        `jsonschema.protocols.Validator.validate` method directly on a
        specific validator (e.g. ``Draft202012Validator.validate``).
    
    
        Arguments:
    
            instance:
    
                The instance to validate
    
            schema:
    
                The schema to validate with
    
            cls (jsonschema.protocols.Validator):
    
                The class that will be used to validate the instance.
    
        If the ``cls`` argument is not provided, two things will happen
        in accordance with the specification. First, if the schema has a
        :kw:`$schema` keyword containing a known meta-schema [#]_ then the
        proper validator will be used. The specification recommends that
        all schemas contain :kw:`$schema` properties for this reason. If no
        :kw:`$schema` property is found, the default validator class is the
        latest released draft.
    
        Any other provided positional and keyword arguments will be passed
        on when instantiating the ``cls``.
    
        Raises:
    
            `jsonschema.exceptions.ValidationError`:
    
                if the instance is invalid
    
            `jsonschema.exceptions.SchemaError`:
    
                if the schema itself is invalid
    
        .. rubric:: Footnotes
        .. [#] known by a validator registered with
            `jsonschema.validators.validates`
        """
        if cls is None:
            cls = validator_for(schema)
    
        cls.check_schema(schema)
        validator = cls(schema, *args, **kwargs)
        error = exceptions.best_match(validator.iter_errors(instance))
        if error is not None:
>           raise error
E           jsonschema.exceptions.ValidationError: 'sessionStorage' is not of type 'object'
E           
E           Failed validating 'type' in schema['items']['properties']['logSettings']['properties']['propertiesToInstrument']['items']:
E               {'properties': {'depth': {'type': 'integer'},
E                               'propertyNames': {'items': {'type': 'string'},
E                                                 'type': 'array'}},
E                'type': 'object'}
E           
E           On instance[11]['logSettings']['propertiesToInstrument'][0]:
E               'sessionStorage'

/home/runner/mamba/envs/openwpm/lib/python3.12/site-packages/jsonschema/validators.py:1312: ValidationError

Check failure on line 0 in junit-report.xml

See this annotation in the file changed.

@github-actions github-actions / test/test_[p]*

pytest ► test.test_profile ► test_dump_profile_command

Failed test found in:
  junit-report.xml
Error:
  default_params = (ManagerParams(data_directory=PosixPath('/tmp/pytest-of-runner/pytest-0/test_dump_profile_command0'), log_path=PosixPa...'/tmp'), maximum_profile_size=None, recovery_tar=None, donottrack=False, tracking_protection=False, custom_params={})])
Raw output
default_params = (ManagerParams(data_directory=PosixPath('/tmp/pytest-of-runner/pytest-0/test_dump_profile_command0'), log_path=PosixPa...'/tmp'), maximum_profile_size=None, recovery_tar=None, donottrack=False, tracking_protection=False, custom_params={})])
task_manager_creator = <function task_manager_creator.<locals>._create_task_manager at 0x7f1baf8098a0>

    def test_dump_profile_command(default_params, task_manager_creator):
        """Test saving the browser profile using a command."""
        manager_params, browser_params = default_params
        manager_params.num_browsers = 1
>       manager, _ = task_manager_creator((manager_params, browser_params[:1]))

/home/runner/work/OpenWPM/OpenWPM/test/test_profile.py:172: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/OpenWPM/OpenWPM/test/conftest.py:80: in _create_task_manager
    manager = TaskManager(
/home/runner/work/OpenWPM/OpenWPM/openwpm/task_manager.py:99: in __init__
    cleaned_js_settings = clean_js_instrumentation_settings(js_settings)
/home/runner/work/OpenWPM/OpenWPM/openwpm/js_instrumentation.py:245: in clean_js_instrumentation_settings
    _validate(settings)
/home/runner/work/OpenWPM/OpenWPM/openwpm/js_instrumentation.py:27: in _validate
    jsonschema.validate(instance=python_list_to_validate, schema=schema)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

instance = [{'instrumentedName': 'ScriptProcessorNode', 'logSettings': {'depth': 5, 'excludedProperties': [], 'logCallStack': Fal...erties': [], 'logCallStack': False, 'logFunctionGets': False, ...}, 'object': "window['AudioContext'].prototype"}, ...]
schema = {'$id': 'http://example.com/js-instrument-settings.schema', '$schema': 'http://json-schema.org/draft-07/schema#', 'des... 'type': 'string'}}, 'required': ['object', 'instrumentedName', 'logSettings'], 'title': 'Settings objects', ...}, ...}
cls = <class 'jsonschema.validators.Draft7Validator'>, args = (), kwargs = {}
validator = Draft7Validator(schema={'$id': 'http://examp...ttings.schema', '$schema': 'http://json-...ft-07/schema#', 'description...required': ['object', 'instrumentedName', 'logSettings'], 'title': 'Settings objects', ...}, ...}, format_checker=None)
error = <ValidationError: "'sessionStorage' is not of type 'object'">

    def validate(instance, schema, cls=None, *args, **kwargs):  # noqa: D417
        """
        Validate an instance under the given schema.
    
            >>> validate([2, 3, 4], {"maxItems": 2})
            Traceback (most recent call last):
                ...
            ValidationError: [2, 3, 4] is too long
    
        :func:`~jsonschema.validators.validate` will first verify that the
        provided schema is itself valid, since not doing so can lead to less
        obvious error messages and fail in less obvious or consistent ways.
    
        If you know you have a valid schema already, especially
        if you intend to validate multiple instances with
        the same schema, you likely would prefer using the
        `jsonschema.protocols.Validator.validate` method directly on a
        specific validator (e.g. ``Draft202012Validator.validate``).
    
    
        Arguments:
    
            instance:
    
                The instance to validate
    
            schema:
    
                The schema to validate with
    
            cls (jsonschema.protocols.Validator):
    
                The class that will be used to validate the instance.
    
        If the ``cls`` argument is not provided, two things will happen
        in accordance with the specification. First, if the schema has a
        :kw:`$schema` keyword containing a known meta-schema [#]_ then the
        proper validator will be used. The specification recommends that
        all schemas contain :kw:`$schema` properties for this reason. If no
        :kw:`$schema` property is found, the default validator class is the
        latest released draft.
    
        Any other provided positional and keyword arguments will be passed
        on when instantiating the ``cls``.
    
        Raises:
    
            `jsonschema.exceptions.ValidationError`:
    
                if the instance is invalid
    
            `jsonschema.exceptions.SchemaError`:
    
                if the schema itself is invalid
    
        .. rubric:: Footnotes
        .. [#] known by a validator registered with
            `jsonschema.validators.validates`
        """
        if cls is None:
            cls = validator_for(schema)
    
        cls.check_schema(schema)
        validator = cls(schema, *args, **kwargs)
        error = exceptions.best_match(validator.iter_errors(instance))
        if error is not None:
>           raise error
E           jsonschema.exceptions.ValidationError: 'sessionStorage' is not of type 'object'
E           
E           Failed validating 'type' in schema['items']['properties']['logSettings']['properties']['propertiesToInstrument']['items']:
E               {'properties': {'depth': {'type': 'integer'},
E                               'propertyNames': {'items': {'type': 'string'},
E                                                 'type': 'array'}},
E                'type': 'object'}
E           
E           On instance[11]['logSettings']['propertiesToInstrument'][0]:
E               'sessionStorage'

/home/runner/mamba/envs/openwpm/lib/python3.12/site-packages/jsonschema/validators.py:1312: ValidationError

Check failure on line 0 in junit-report.xml

See this annotation in the file changed.

@github-actions github-actions / test/test_[p]*

pytest ► test.test_profile ► test_crash_during_init

Failed test found in:
  junit-report.xml
Error:
  default_params = (ManagerParams(data_directory=PosixPath('/tmp/pytest-of-runner/pytest-0/test_crash_during_init0'), log_path=PosixPath(...'/tmp'), maximum_profile_size=None, recovery_tar=None, donottrack=False, tracking_protection=False, custom_params={})])
Raw output
default_params = (ManagerParams(data_directory=PosixPath('/tmp/pytest-of-runner/pytest-0/test_crash_during_init0'), log_path=PosixPath(...'/tmp'), maximum_profile_size=None, recovery_tar=None, donottrack=False, tracking_protection=False, custom_params={})])
task_manager_creator = <function task_manager_creator.<locals>._create_task_manager at 0x7f1baf80a5c0>

    def test_crash_during_init(default_params, task_manager_creator):
        """Test that no profile is saved when Task Manager initialization crashes."""
        manager_params, browser_params = default_params
        manager_params.num_browsers = 1
        browser_params[0].profile_archive_dir = (
            manager_params.data_directory / "browser_profile"
        )
        # This will cause the browser launch to fail
        browser_params[0].seed_tar = Path("/tmp/NOTREAL")
        with pytest.raises(ProfileLoadError):
>           manager, _ = task_manager_creator((manager_params, browser_params[:1]))

/home/runner/work/OpenWPM/OpenWPM/test/test_profile.py:202: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/OpenWPM/OpenWPM/test/conftest.py:80: in _create_task_manager
    manager = TaskManager(
/home/runner/work/OpenWPM/OpenWPM/openwpm/task_manager.py:99: in __init__
    cleaned_js_settings = clean_js_instrumentation_settings(js_settings)
/home/runner/work/OpenWPM/OpenWPM/openwpm/js_instrumentation.py:245: in clean_js_instrumentation_settings
    _validate(settings)
/home/runner/work/OpenWPM/OpenWPM/openwpm/js_instrumentation.py:27: in _validate
    jsonschema.validate(instance=python_list_to_validate, schema=schema)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

instance = [{'instrumentedName': 'ScriptProcessorNode', 'logSettings': {'depth': 5, 'excludedProperties': [], 'logCallStack': Fal...erties': [], 'logCallStack': False, 'logFunctionGets': False, ...}, 'object': "window['AudioContext'].prototype"}, ...]
schema = {'$id': 'http://example.com/js-instrument-settings.schema', '$schema': 'http://json-schema.org/draft-07/schema#', 'des... 'type': 'string'}}, 'required': ['object', 'instrumentedName', 'logSettings'], 'title': 'Settings objects', ...}, ...}
cls = <class 'jsonschema.validators.Draft7Validator'>, args = (), kwargs = {}
validator = Draft7Validator(schema={'$id': 'http://examp...ttings.schema', '$schema': 'http://json-...ft-07/schema#', 'description...required': ['object', 'instrumentedName', 'logSettings'], 'title': 'Settings objects', ...}, ...}, format_checker=None)
error = <ValidationError: "'sessionStorage' is not of type 'object'">

    def validate(instance, schema, cls=None, *args, **kwargs):  # noqa: D417
        """
        Validate an instance under the given schema.
    
            >>> validate([2, 3, 4], {"maxItems": 2})
            Traceback (most recent call last):
                ...
            ValidationError: [2, 3, 4] is too long
    
        :func:`~jsonschema.validators.validate` will first verify that the
        provided schema is itself valid, since not doing so can lead to less
        obvious error messages and fail in less obvious or consistent ways.
    
        If you know you have a valid schema already, especially
        if you intend to validate multiple instances with
        the same schema, you likely would prefer using the
        `jsonschema.protocols.Validator.validate` method directly on a
        specific validator (e.g. ``Draft202012Validator.validate``).
    
    
        Arguments:
    
            instance:
    
                The instance to validate
    
            schema:
    
                The schema to validate with
    
            cls (jsonschema.protocols.Validator):
    
                The class that will be used to validate the instance.
    
        If the ``cls`` argument is not provided, two things will happen
        in accordance with the specification. First, if the schema has a
        :kw:`$schema` keyword containing a known meta-schema [#]_ then the
        proper validator will be used. The specification recommends that
        all schemas contain :kw:`$schema` properties for this reason. If no
        :kw:`$schema` property is found, the default validator class is the
        latest released draft.
    
        Any other provided positional and keyword arguments will be passed
        on when instantiating the ``cls``.
    
        Raises:
    
            `jsonschema.exceptions.ValidationError`:
    
                if the instance is invalid
    
            `jsonschema.exceptions.SchemaError`:
    
                if the schema itself is invalid
    
        .. rubric:: Footnotes
        .. [#] known by a validator registered with
            `jsonschema.validators.validates`
        """
        if cls is None:
            cls = validator_for(schema)
    
        cls.check_schema(schema)
        validator = cls(schema, *args, **kwargs)
        error = exceptions.best_match(validator.iter_errors(instance))
        if error is not None:
>           raise error
E           jsonschema.exceptions.ValidationError: 'sessionStorage' is not of type 'object'
E           
E           Failed validating 'type' in schema['items']['properties']['logSettings']['properties']['propertiesToInstrument']['items']:
E               {'properties': {'depth': {'type': 'integer'},
E                               'propertyNames': {'items': {'type': 'string'},
E                                                 'type': 'array'}},
E                'type': 'object'}
E           
E           On instance[11]['logSettings']['propertiesToInstrument'][0]:
E               'sessionStorage'

/home/runner/mamba/envs/openwpm/lib/python3.12/site-packages/jsonschema/validators.py:1312: ValidationError

Check failure on line 0 in junit-report.xml

See this annotation in the file changed.

@github-actions github-actions / test/test_[p]*

pytest ► test.test_profile ► test_profile_recovery[on_normal_operation-stateful-without_seed_tar]

Failed test found in:
  junit-report.xml
Error:
  monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f1baf78eb40>
Raw output
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f1baf78eb40>
default_params = (ManagerParams(data_directory=PosixPath('/tmp/pytest-of-runner/pytest-0/test_profile_recovery_on_norma0'), log_path=Po...'/tmp'), maximum_profile_size=None, recovery_tar=None, donottrack=False, tracking_protection=False, custom_params={})])
task_manager_creator = <function task_manager_creator.<locals>._create_task_manager at 0x7f1baf809760>
testcase = 'on_normal_operation', stateful = True, seed_tar = None

    @pytest.mark.parametrize(
        "stateful,seed_tar",
        [(True, None), (True, Path("profile.tar.gz")), (False, Path("profile.tar.gz"))],
        ids=[
            "stateful-without_seed_tar",
            "stateful-with_seed_tar",
            "stateless-with_seed_tar",
        ],
    )
    @pytest.mark.parametrize(
        "testcase",
        ["on_normal_operation", "on_crash", "on_crash_during_launch", "on_timeout"],
    )
    # Use -k to run this test for a specific set of parameters. For example:
    # pytest -vv test_profile.py::test_profile_recovery -k on_crash-stateful-with_seed_tar
    def test_profile_recovery(
        monkeypatch, default_params, task_manager_creator, testcase, stateful, seed_tar
    ):
        """Test browser profile recovery in various scenarios."""
        manager_params, browser_params = default_params
        manager_params.num_browsers = 1
        browser_params[0].seed_tar = seed_tar
>       manager, db = task_manager_creator((manager_params, browser_params[:1]))

/home/runner/work/OpenWPM/OpenWPM/test/test_profile.py:229: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/OpenWPM/OpenWPM/test/conftest.py:80: in _create_task_manager
    manager = TaskManager(
/home/runner/work/OpenWPM/OpenWPM/openwpm/task_manager.py:99: in __init__
    cleaned_js_settings = clean_js_instrumentation_settings(js_settings)
/home/runner/work/OpenWPM/OpenWPM/openwpm/js_instrumentation.py:245: in clean_js_instrumentation_settings
    _validate(settings)
/home/runner/work/OpenWPM/OpenWPM/openwpm/js_instrumentation.py:27: in _validate
    jsonschema.validate(instance=python_list_to_validate, schema=schema)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

instance = [{'instrumentedName': 'ScriptProcessorNode', 'logSettings': {'depth': 5, 'excludedProperties': [], 'logCallStack': Fal...erties': [], 'logCallStack': False, 'logFunctionGets': False, ...}, 'object': "window['AudioContext'].prototype"}, ...]
schema = {'$id': 'http://example.com/js-instrument-settings.schema', '$schema': 'http://json-schema.org/draft-07/schema#', 'des... 'type': 'string'}}, 'required': ['object', 'instrumentedName', 'logSettings'], 'title': 'Settings objects', ...}, ...}
cls = <class 'jsonschema.validators.Draft7Validator'>, args = (), kwargs = {}
validator = Draft7Validator(schema={'$id': 'http://examp...ttings.schema', '$schema': 'http://json-...ft-07/schema#', 'description...required': ['object', 'instrumentedName', 'logSettings'], 'title': 'Settings objects', ...}, ...}, format_checker=None)
error = <ValidationError: "'sessionStorage' is not of type 'object'">

    def validate(instance, schema, cls=None, *args, **kwargs):  # noqa: D417
        """
        Validate an instance under the given schema.
    
            >>> validate([2, 3, 4], {"maxItems": 2})
            Traceback (most recent call last):
                ...
            ValidationError: [2, 3, 4] is too long
    
        :func:`~jsonschema.validators.validate` will first verify that the
        provided schema is itself valid, since not doing so can lead to less
        obvious error messages and fail in less obvious or consistent ways.
    
        If you know you have a valid schema already, especially
        if you intend to validate multiple instances with
        the same schema, you likely would prefer using the
        `jsonschema.protocols.Validator.validate` method directly on a
        specific validator (e.g. ``Draft202012Validator.validate``).
    
    
        Arguments:
    
            instance:
    
                The instance to validate
    
            schema:
    
                The schema to validate with
    
            cls (jsonschema.protocols.Validator):
    
                The class that will be used to validate the instance.
    
        If the ``cls`` argument is not provided, two things will happen
        in accordance with the specification. First, if the schema has a
        :kw:`$schema` keyword containing a known meta-schema [#]_ then the
        proper validator will be used. The specification recommends that
        all schemas contain :kw:`$schema` properties for this reason. If no
        :kw:`$schema` property is found, the default validator class is the
        latest released draft.
    
        Any other provided positional and keyword arguments will be passed
        on when instantiating the ``cls``.
    
        Raises:
    
            `jsonschema.exceptions.ValidationError`:
    
                if the instance is invalid
    
            `jsonschema.exceptions.SchemaError`:
    
                if the schema itself is invalid
    
        .. rubric:: Footnotes
        .. [#] known by a validator registered with
            `jsonschema.validators.validates`
        """
        if cls is None:
            cls = validator_for(schema)
    
        cls.check_schema(schema)
        validator = cls(schema, *args, **kwargs)
        error = exceptions.best_match(validator.iter_errors(instance))
        if error is not None:
>           raise error
E           jsonschema.exceptions.ValidationError: 'sessionStorage' is not of type 'object'
E           
E           Failed validating 'type' in schema['items']['properties']['logSettings']['properties']['propertiesToInstrument']['items']:
E               {'properties': {'depth': {'type': 'integer'},
E                               'propertyNames': {'items': {'type': 'string'},
E                                                 'type': 'array'}},
E                'type': 'object'}
E           
E           On instance[11]['logSettings']['propertiesToInstrument'][0]:
E               'sessionStorage'

/home/runner/mamba/envs/openwpm/lib/python3.12/site-packages/jsonschema/validators.py:1312: ValidationError

Check failure on line 0 in junit-report.xml

See this annotation in the file changed.

@github-actions github-actions / test/test_[p]*

pytest ► test.test_profile ► test_profile_recovery[on_normal_operation-stateful-with_seed_tar]

Failed test found in:
  junit-report.xml
Error:
  monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f1baf7cc6e0>
Raw output
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f1baf7cc6e0>
default_params = (ManagerParams(data_directory=PosixPath('/tmp/pytest-of-runner/pytest-0/test_profile_recovery_on_norma1'), log_path=Po...'/tmp'), maximum_profile_size=None, recovery_tar=None, donottrack=False, tracking_protection=False, custom_params={})])
task_manager_creator = <function task_manager_creator.<locals>._create_task_manager at 0x7f1baf80ae80>
testcase = 'on_normal_operation', stateful = True
seed_tar = PosixPath('profile.tar.gz')

    @pytest.mark.parametrize(
        "stateful,seed_tar",
        [(True, None), (True, Path("profile.tar.gz")), (False, Path("profile.tar.gz"))],
        ids=[
            "stateful-without_seed_tar",
            "stateful-with_seed_tar",
            "stateless-with_seed_tar",
        ],
    )
    @pytest.mark.parametrize(
        "testcase",
        ["on_normal_operation", "on_crash", "on_crash_during_launch", "on_timeout"],
    )
    # Use -k to run this test for a specific set of parameters. For example:
    # pytest -vv test_profile.py::test_profile_recovery -k on_crash-stateful-with_seed_tar
    def test_profile_recovery(
        monkeypatch, default_params, task_manager_creator, testcase, stateful, seed_tar
    ):
        """Test browser profile recovery in various scenarios."""
        manager_params, browser_params = default_params
        manager_params.num_browsers = 1
        browser_params[0].seed_tar = seed_tar
>       manager, db = task_manager_creator((manager_params, browser_params[:1]))

/home/runner/work/OpenWPM/OpenWPM/test/test_profile.py:229: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/OpenWPM/OpenWPM/test/conftest.py:80: in _create_task_manager
    manager = TaskManager(
/home/runner/work/OpenWPM/OpenWPM/openwpm/task_manager.py:99: in __init__
    cleaned_js_settings = clean_js_instrumentation_settings(js_settings)
/home/runner/work/OpenWPM/OpenWPM/openwpm/js_instrumentation.py:245: in clean_js_instrumentation_settings
    _validate(settings)
/home/runner/work/OpenWPM/OpenWPM/openwpm/js_instrumentation.py:27: in _validate
    jsonschema.validate(instance=python_list_to_validate, schema=schema)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

instance = [{'instrumentedName': 'ScriptProcessorNode', 'logSettings': {'depth': 5, 'excludedProperties': [], 'logCallStack': Fal...erties': [], 'logCallStack': False, 'logFunctionGets': False, ...}, 'object': "window['AudioContext'].prototype"}, ...]
schema = {'$id': 'http://example.com/js-instrument-settings.schema', '$schema': 'http://json-schema.org/draft-07/schema#', 'des... 'type': 'string'}}, 'required': ['object', 'instrumentedName', 'logSettings'], 'title': 'Settings objects', ...}, ...}
cls = <class 'jsonschema.validators.Draft7Validator'>, args = (), kwargs = {}
validator = Draft7Validator(schema={'$id': 'http://examp...ttings.schema', '$schema': 'http://json-...ft-07/schema#', 'description...required': ['object', 'instrumentedName', 'logSettings'], 'title': 'Settings objects', ...}, ...}, format_checker=None)
error = <ValidationError: "'sessionStorage' is not of type 'object'">

    def validate(instance, schema, cls=None, *args, **kwargs):  # noqa: D417
        """
        Validate an instance under the given schema.
    
            >>> validate([2, 3, 4], {"maxItems": 2})
            Traceback (most recent call last):
                ...
            ValidationError: [2, 3, 4] is too long
    
        :func:`~jsonschema.validators.validate` will first verify that the
        provided schema is itself valid, since not doing so can lead to less
        obvious error messages and fail in less obvious or consistent ways.
    
        If you know you have a valid schema already, especially
        if you intend to validate multiple instances with
        the same schema, you likely would prefer using the
        `jsonschema.protocols.Validator.validate` method directly on a
        specific validator (e.g. ``Draft202012Validator.validate``).
    
    
        Arguments:
    
            instance:
    
                The instance to validate
    
            schema:
    
                The schema to validate with
    
            cls (jsonschema.protocols.Validator):
    
                The class that will be used to validate the instance.
    
        If the ``cls`` argument is not provided, two things will happen
        in accordance with the specification. First, if the schema has a
        :kw:`$schema` keyword containing a known meta-schema [#]_ then the
        proper validator will be used. The specification recommends that
        all schemas contain :kw:`$schema` properties for this reason. If no
        :kw:`$schema` property is found, the default validator class is the
        latest released draft.
    
        Any other provided positional and keyword arguments will be passed
        on when instantiating the ``cls``.
    
        Raises:
    
            `jsonschema.exceptions.ValidationError`:
    
                if the instance is invalid
    
            `jsonschema.exceptions.SchemaError`:
    
                if the schema itself is invalid
    
        .. rubric:: Footnotes
        .. [#] known by a validator registered with
            `jsonschema.validators.validates`
        """
        if cls is None:
            cls = validator_for(schema)
    
        cls.check_schema(schema)
        validator = cls(schema, *args, **kwargs)
        error = exceptions.best_match(validator.iter_errors(instance))
        if error is not None:
>           raise error
E           jsonschema.exceptions.ValidationError: 'sessionStorage' is not of type 'object'
E           
E           Failed validating 'type' in schema['items']['properties']['logSettings']['properties']['propertiesToInstrument']['items']:
E               {'properties': {'depth': {'type': 'integer'},
E                               'propertyNames': {'items': {'type': 'string'},
E                                                 'type': 'array'}},
E                'type': 'object'}
E           
E           On instance[11]['logSettings']['propertiesToInstrument'][0]:
E               'sessionStorage'

/home/runner/mamba/envs/openwpm/lib/python3.12/site-packages/jsonschema/validators.py:1312: ValidationError

Check failure on line 0 in junit-report.xml

See this annotation in the file changed.

@github-actions github-actions / test/test_[p]*

pytest ► test.test_profile ► test_profile_recovery[on_normal_operation-stateless-with_seed_tar]

Failed test found in:
  junit-report.xml
Error:
  monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f1baf78fd40>
Raw output
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f1baf78fd40>
default_params = (ManagerParams(data_directory=PosixPath('/tmp/pytest-of-runner/pytest-0/test_profile_recovery_on_norma2'), log_path=Po...'/tmp'), maximum_profile_size=None, recovery_tar=None, donottrack=False, tracking_protection=False, custom_params={})])
task_manager_creator = <function task_manager_creator.<locals>._create_task_manager at 0x7f1baf80b4c0>
testcase = 'on_normal_operation', stateful = False
seed_tar = PosixPath('profile.tar.gz')

    @pytest.mark.parametrize(
        "stateful,seed_tar",
        [(True, None), (True, Path("profile.tar.gz")), (False, Path("profile.tar.gz"))],
        ids=[
            "stateful-without_seed_tar",
            "stateful-with_seed_tar",
            "stateless-with_seed_tar",
        ],
    )
    @pytest.mark.parametrize(
        "testcase",
        ["on_normal_operation", "on_crash", "on_crash_during_launch", "on_timeout"],
    )
    # Use -k to run this test for a specific set of parameters. For example:
    # pytest -vv test_profile.py::test_profile_recovery -k on_crash-stateful-with_seed_tar
    def test_profile_recovery(
        monkeypatch, default_params, task_manager_creator, testcase, stateful, seed_tar
    ):
        """Test browser profile recovery in various scenarios."""
        manager_params, browser_params = default_params
        manager_params.num_browsers = 1
        browser_params[0].seed_tar = seed_tar
>       manager, db = task_manager_creator((manager_params, browser_params[:1]))

/home/runner/work/OpenWPM/OpenWPM/test/test_profile.py:229: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/OpenWPM/OpenWPM/test/conftest.py:80: in _create_task_manager
    manager = TaskManager(
/home/runner/work/OpenWPM/OpenWPM/openwpm/task_manager.py:99: in __init__
    cleaned_js_settings = clean_js_instrumentation_settings(js_settings)
/home/runner/work/OpenWPM/OpenWPM/openwpm/js_instrumentation.py:245: in clean_js_instrumentation_settings
    _validate(settings)
/home/runner/work/OpenWPM/OpenWPM/openwpm/js_instrumentation.py:27: in _validate
    jsonschema.validate(instance=python_list_to_validate, schema=schema)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

instance = [{'instrumentedName': 'ScriptProcessorNode', 'logSettings': {'depth': 5, 'excludedProperties': [], 'logCallStack': Fal...erties': [], 'logCallStack': False, 'logFunctionGets': False, ...}, 'object': "window['AudioContext'].prototype"}, ...]
schema = {'$id': 'http://example.com/js-instrument-settings.schema', '$schema': 'http://json-schema.org/draft-07/schema#', 'des... 'type': 'string'}}, 'required': ['object', 'instrumentedName', 'logSettings'], 'title': 'Settings objects', ...}, ...}
cls = <class 'jsonschema.validators.Draft7Validator'>, args = (), kwargs = {}
validator = Draft7Validator(schema={'$id': 'http://examp...ttings.schema', '$schema': 'http://json-...ft-07/schema#', 'description...required': ['object', 'instrumentedName', 'logSettings'], 'title': 'Settings objects', ...}, ...}, format_checker=None)
error = <ValidationError: "'sessionStorage' is not of type 'object'">

    def validate(instance, schema, cls=None, *args, **kwargs):  # noqa: D417
        """
        Validate an instance under the given schema.
    
            >>> validate([2, 3, 4], {"maxItems": 2})
            Traceback (most recent call last):
                ...
            ValidationError: [2, 3, 4] is too long
    
        :func:`~jsonschema.validators.validate` will first verify that the
        provided schema is itself valid, since not doing so can lead to less
        obvious error messages and fail in less obvious or consistent ways.
    
        If you know you have a valid schema already, especially
        if you intend to validate multiple instances with
        the same schema, you likely would prefer using the
        `jsonschema.protocols.Validator.validate` method directly on a
        specific validator (e.g. ``Draft202012Validator.validate``).
    
    
        Arguments:
    
            instance:
    
                The instance to validate
    
            schema:
    
                The schema to validate with
    
            cls (jsonschema.protocols.Validator):
    
                The class that will be used to validate the instance.
    
        If the ``cls`` argument is not provided, two things will happen
        in accordance with the specification. First, if the schema has a
        :kw:`$schema` keyword containing a known meta-schema [#]_ then the
        proper validator will be used. The specification recommends that
        all schemas contain :kw:`$schema` properties for this reason. If no
        :kw:`$schema` property is found, the default validator class is the
        latest released draft.
    
        Any other provided positional and keyword arguments will be passed
        on when instantiating the ``cls``.
    
        Raises:
    
            `jsonschema.exceptions.ValidationError`:
    
                if the instance is invalid
    
            `jsonschema.exceptions.SchemaError`:
    
                if the schema itself is invalid
    
        .. rubric:: Footnotes
        .. [#] known by a validator registered with
            `jsonschema.validators.validates`
        """
        if cls is None:
            cls = validator_for(schema)
    
        cls.check_schema(schema)
        validator = cls(schema, *args, **kwargs)
        error = exceptions.best_match(validator.iter_errors(instance))
        if error is not None:
>           raise error
E           jsonschema.exceptions.ValidationError: 'sessionStorage' is not of type 'object'
E           
E           Failed validating 'type' in schema['items']['properties']['logSettings']['properties']['propertiesToInstrument']['items']:
E               {'properties': {'depth': {'type': 'integer'},
E                               'propertyNames': {'items': {'type': 'string'},
E                                                 'type': 'array'}},
E                'type': 'object'}
E           
E           On instance[11]['logSettings']['propertiesToInstrument'][0]:
E               'sessionStorage'

/home/runner/mamba/envs/openwpm/lib/python3.12/site-packages/jsonschema/validators.py:1312: ValidationError