Stealth extension #1030
test/test_[a-e]* ❌
❌ junit-report.xml
20 tests were completed in 11s with 7 passed, 11 failed and 2 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
pytest | 7✅ | 11❌ | 2⚪ | 11s |
❌ pytest
test.test_callback
❌ test_local_callbacks
default_params = (ManagerParams(data_directory=PosixPath('/tmp/pytest-of-runner/pytest-0/test_local_callbacks0'), log_path=PosixPath('/...'/tmp'), maximum_profile_size=None, recovery_tar=None, donottrack=False, tracking_protection=False, custom_params={})])
test.test_callstack_instrument
⚪ test_http_stacktrace
test.test_crawl
❌ test_browser_profile_coverage
default_params = (ManagerParams(data_directory=PosixPath('/tmp/pytest-of-runner/pytest-0/test_browser_profile_coverage0'), log_path=Pos...'/tmp'), maximum_profile_size=None, recovery_tar=None, donottrack=False, tracking_protection=False, custom_params={})])
test.test_custom_function_command
❌ test_custom_function
default_params = (ManagerParams(data_directory=PosixPath('/tmp/pytest-of-runner/pytest-0/test_custom_function0'), log_path=PosixPath('/...'/tmp'), maximum_profile_size=None, recovery_tar=None, donottrack=False, tracking_protection=False, custom_params={})])
test.test_dataclass_validations
✅ test_display_mode
✅ test_browser_type
✅ test_tp_cookies_opt
✅ test_save_content_type
✅ test_log_file_extension
✅ test_failure_limit
✅ test_num_browser_crawl_config
test.test_dns_instrument
❌ test_name_resolution
default_params = (ManagerParams(data_directory=PosixPath('/tmp/pytest-of-runner/pytest-0/test_name_resolution0'), log_path=PosixPath('/...'/tmp'), maximum_profile_size=None, recovery_tar=None, donottrack=False, tracking_protection=False, custom_params={})])
test.test_extension.TestExtension
❌ test_property_enumeration
self = <test.test_extension.TestExtension object at 0x7f5174076fc0>
❌ test_canvas_fingerprinting
self = <test.test_extension.TestExtension object at 0x7f5174074770>
❌ test_extension_gets_correct_visit_id
self = <test.test_extension.TestExtension object at 0x7f5174074440>
❌ test_webrtc_localip
self = <test.test_extension.TestExtension object at 0x7f51740741d0>
❌ test_js_call_stack
self = <test.test_extension.TestExtension object at 0x7f51740760c0>
❌ test_js_time_stamp
self = <test.test_extension.TestExtension object at 0x7f5174076330>
❌ test_document_cookie_instrumentation
self = <test.test_extension.TestExtension object at 0x7f5174076660>
test.test_extension
⚪ test_audio_fingerprinting
Annotations
Check failure on line 0 in junit-report.xml
github-actions / test/test_[a-e]*
pytest ► test.test_callback ► test_local_callbacks
Failed test found in:
junit-report.xml
Error:
default_params = (ManagerParams(data_directory=PosixPath('/tmp/pytest-of-runner/pytest-0/test_local_callbacks0'), 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_local_callbacks0'), 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 0x7f5173f109a0>
def test_local_callbacks(
default_params: FullConfig, task_manager_creator: TaskManagerCreator
) -> None:
"""Test the storage controller as well as the entire callback machinery
to see if all callbacks get correctly called"""
> manager, _ = task_manager_creator(default_params)
/home/runner/work/OpenWPM/OpenWPM/test/test_callback.py:15:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/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
github-actions / test/test_[a-e]*
pytest ► test.test_crawl ► test_browser_profile_coverage
Failed test found in:
junit-report.xml
Error:
default_params = (ManagerParams(data_directory=PosixPath('/tmp/pytest-of-runner/pytest-0/test_browser_profile_coverage0'), log_path=Pos...'/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_browser_profile_coverage0'), log_path=Pos...'/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 0x7f5173f39760>
@pytest.mark.skipif(
"CI" not in os.environ or os.environ["CI"] == "false",
reason="Makes remote connections",
)
@pytest.mark.slow
def test_browser_profile_coverage(default_params, task_manager_creator):
"""Test the coverage of the browser's profile.
This verifies that Firefox's places.sqlite database contains all
visited sites. If it does not, it is likely the profile is lost at
some point during the crawl.
"""
# Run the test crawl
manager_params, browser_params = default_params
manager_params.num_browsers = 1
manager_params.testing = False
browser_params[0].profile_archive_dir = (
manager_params.data_directory / "browser_profile"
)
browser_params[0].http_instrument = True
> manager, crawl_db = task_manager_creator((manager_params, browser_params[:1]))
/home/runner/work/OpenWPM/OpenWPM/test/test_crawl.py:61:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/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
github-actions / test/test_[a-e]*
pytest ► test.test_custom_function_command ► test_custom_function
Failed test found in:
junit-report.xml
Error:
default_params = (ManagerParams(data_directory=PosixPath('/tmp/pytest-of-runner/pytest-0/test_custom_function0'), 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_custom_function0'), log_path=PosixPath('/...'/tmp'), maximum_profile_size=None, recovery_tar=None, donottrack=False, tracking_protection=False, custom_params={})])
xpi = None, server = None
def test_custom_function(default_params, xpi, server):
"""Test `custom_function` with an inline func that collects links"""
table_name = TableName("page_links")
manager_params, browser_params = default_params
path = manager_params.data_directory / "crawl-data.sqlite"
db = sqlite3.connect(path)
cur = db.cursor()
cur.execute(
"""CREATE TABLE IF NOT EXISTS %s (
top_url TEXT, link TEXT,
visit_id INTEGER, browser_id INTEGER);"""
% table_name
)
cur.close()
db.close()
storage_provider = SQLiteStorageProvider(path)
> manager = TaskManager(manager_params, browser_params, storage_provider, None)
/home/runner/work/OpenWPM/OpenWPM/test/test_custom_function_command.py:99:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/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
github-actions / test/test_[a-e]*
pytest ► test.test_dns_instrument ► test_name_resolution
Failed test found in:
junit-report.xml
Error:
default_params = (ManagerParams(data_directory=PosixPath('/tmp/pytest-of-runner/pytest-0/test_name_resolution0'), 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_name_resolution0'), 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 0x7f5173f3ae80>
def test_name_resolution(default_params, task_manager_creator):
manager_params, browser_params = default_params
for browser_param in browser_params:
browser_param.dns_instrument = True
> manager, db = task_manager_creator((manager_params, browser_params))
/home/runner/work/OpenWPM/OpenWPM/test/test_dns_instrument.py:11:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/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
github-actions / test/test_[a-e]*
pytest ► test.test_extension.TestExtension ► test_property_enumeration
Failed test found in:
junit-report.xml
Error:
self = <test.test_extension.TestExtension object at 0x7f5174076fc0>
Raw output
self = <test.test_extension.TestExtension object at 0x7f5174076fc0>
def test_property_enumeration(self) -> None:
test_url = utilities.BASE_TEST_URL + "/property_enumeration.html"
> db = self.visit(test_url)
/home/runner/work/OpenWPM/OpenWPM/test/test_extension.py:270:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/runner/work/OpenWPM/OpenWPM/test/openwpmtest.py:42: in visit
manager = task_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
github-actions / test/test_[a-e]*
pytest ► test.test_extension.TestExtension ► test_canvas_fingerprinting
Failed test found in:
junit-report.xml
Error:
self = <test.test_extension.TestExtension object at 0x7f5174074770>
Raw output
self = <test.test_extension.TestExtension object at 0x7f5174074770>
def test_canvas_fingerprinting(self) -> None:
> db = self.visit("/canvas_fingerprinting.html")
/home/runner/work/OpenWPM/OpenWPM/test/test_extension.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/runner/work/OpenWPM/OpenWPM/test/openwpmtest.py:42: in visit
manager = task_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
github-actions / test/test_[a-e]*
pytest ► test.test_extension.TestExtension ► test_extension_gets_correct_visit_id
Failed test found in:
junit-report.xml
Error:
self = <test.test_extension.TestExtension object at 0x7f5174074440>
Raw output
self = <test.test_extension.TestExtension object at 0x7f5174074440>
def test_extension_gets_correct_visit_id(self) -> None:
url_a = utilities.BASE_TEST_URL + "/simple_a.html"
url_b = utilities.BASE_TEST_URL + "/simple_b.html"
> self.visit(url_a)
/home/runner/work/OpenWPM/OpenWPM/test/test_extension.py:298:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/runner/work/OpenWPM/OpenWPM/test/openwpmtest.py:42: in visit
manager = task_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
github-actions / test/test_[a-e]*
pytest ► test.test_extension.TestExtension ► test_webrtc_localip
Failed test found in:
junit-report.xml
Error:
self = <test.test_extension.TestExtension object at 0x7f51740741d0>
Raw output
self = <test.test_extension.TestExtension object at 0x7f51740741d0>
def test_webrtc_localip(self) -> None:
> db = self.visit("/webrtc_localip.html")
/home/runner/work/OpenWPM/OpenWPM/test/test_extension.py:334:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/runner/work/OpenWPM/OpenWPM/test/openwpmtest.py:42: in visit
manager = task_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
github-actions / test/test_[a-e]*
pytest ► test.test_extension.TestExtension ► test_js_call_stack
Failed test found in:
junit-report.xml
Error:
self = <test.test_extension.TestExtension object at 0x7f51740760c0>
Raw output
self = <test.test_extension.TestExtension object at 0x7f51740760c0>
def test_js_call_stack(self):
> db = self.visit("/js_call_stack.html")
/home/runner/work/OpenWPM/OpenWPM/test/test_extension.py:357:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/runner/work/OpenWPM/OpenWPM/test/openwpmtest.py:42: in visit
manager = task_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
github-actions / test/test_[a-e]*
pytest ► test.test_extension.TestExtension ► test_js_time_stamp
Failed test found in:
junit-report.xml
Error:
self = <test.test_extension.TestExtension object at 0x7f5174076330>
Raw output
self = <test.test_extension.TestExtension object at 0x7f5174076330>
def test_js_time_stamp(self):
# Check that timestamp is recorded correctly for the javascript table
MAX_TIMEDELTA = 60 # max time diff in seconds
> db = self.visit("/js_call_stack.html")
/home/runner/work/OpenWPM/OpenWPM/test/test_extension.py:378:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/runner/work/OpenWPM/OpenWPM/test/openwpmtest.py:42: in visit
manager = task_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
github-actions / test/test_[a-e]*
pytest ► test.test_extension.TestExtension ► test_document_cookie_instrumentation
Failed test found in:
junit-report.xml
Error:
self = <test.test_extension.TestExtension object at 0x7f5174076660>
Raw output
self = <test.test_extension.TestExtension object at 0x7f5174076660>
def test_document_cookie_instrumentation(self):
> db = self.visit(utilities.BASE_TEST_URL + "/js_cookie.html")
/home/runner/work/OpenWPM/OpenWPM/test/test_extension.py:389:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/runner/work/OpenWPM/OpenWPM/test/openwpmtest.py:42: in visit
manager = task_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