Skip to content

[Bug]: trace viewer mangles collapsible group names that include text such as double curly braces (e.g. {{ stuff }}) #36483

Open
@rkechols

Description

@rkechols

Version

1.53.0

Steps to reproduce

  1. Download this playwright trace: example-trace.zip
  2. Use playwright version 1.52 trace viewer to view the trace, e.g. playwright show-trace example-trace.zip
    • Observe that the trace correctly shows hidden_stuff in the collapsible group text:
      Correct display with version 1.52
  3. Use playwright version 1.53.0 trace viewer to view the trace, e.g. playwright show-trace example-trace.zip
    • Observe that the trace does not correctly show hidden_stuff in the collapsible group text:
      Incorrect display with version 1.53.0

Expected behavior

Playwright trace viewer should show the collapsible group name exactly as given in the string passed to Tracing.group(name), even if it has unusual characters such as curly braces

E.g. as with version 1.52:
Correct display with version 1.52

Actual behavior

Collapsible group names are sometimes mangled if the have unusual characters such as curly braces

E.g.:
Incorrect display with version 1.53.0

Additional context

The following script was used to generate the attached example trace:

# /// script
# requires-python = ">=3.11"
# dependencies = [
#     "playwright~=1.52.0",
# ]
# ///

from pathlib import Path

from playwright.sync_api import sync_playwright


def main():
    with (
        sync_playwright() as pw,
        pw.chromium.launch(headless=False) as browser,
        browser.new_context() as browser_context,
        browser_context.new_page() as page,
    ):
        browser_context.tracing.start(snapshots=True, screenshots=True, sources=True)
        try:
            browser_context.tracing.group("This group has curly braces here --> {{ hidden_stuff }} <--")
            page.evaluate("console.log('hello world')")
            browser_context.tracing.group_end()
        finally:
            browser_context.tracing.stop(path=Path("example-trace.zip"))


if __name__ == "__main__":
    main()

NOTE: while the given trace was generated with playwright version 1.52.0, the issue also occurs for traces generated with 1.53.0

Environment

- Operating System: macOS 15.3.2
- CPU: arm64
- Browser: All
- Python Version: Any

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy