Skip to content

[BUG] Error after update to v1.32.0: 'stacks_id: expected string, got undefined' #1835

@sueskind

Description

@sueskind

Context:

  • Playwright Version: 1.32.0
  • Operating System: Linux 6.2.8-arch1-1
  • Python version: 3.10.10
  • Browser: All
  • Extra: -

Code Snippet

from playwright.sync_api import sync_playwright

with sync_playwright() as pw:
    browser = pw.webkit.launch()
    page = browser.new_page()

    page.context.tracing.start()

    page.context.tracing.stop()

    browser.close()

Describe the bug

When stopping the tracing, playwright throws an error:

Traceback (most recent call last):
  File "~/test/main.py", line 9, in <module>
    page.context.tracing.stop()
  File "~/test/venv/lib/python3.10/site-packages/playwright/sync_api/_generated.py", line 15178, in stop
    return mapping.from_maybe_impl(self._sync(self._impl_obj.stop(path=path)))
  File "~/test/venv/lib/python3.10/site-packages/playwright/_impl/_sync_base.py", line 104, in _sync
    return task.result()
  File "~/test/venv/lib/python3.10/site-packages/playwright/_impl/_tracing.py", line 74, in stop
    await self._do_stop_chunk(path)
  File "~/test/venv/lib/python3.10/site-packages/playwright/_impl/_tracing.py", line 86, in _do_stop_chunk
    await self._connection.local_utils.trace_discarded(self._stacks_id)
  File "~/test/venv/lib/python3.10/site-packages/playwright/_impl/_local_utils.py", line 66, in trace_discarded
    return await self._channel.send("traceDiscarded", {"stacks_id": stacks_id})
  File "~/test/venv/lib/python3.10/site-packages/playwright/_impl/_connection.py", line 61, in send
    return await self._connection.wrap_api_call(
  File "~/test/venv/lib/python3.10/site-packages/playwright/_impl/_connection.py", line 461, in wrap_api_call
    return await cb()
  File "~/test/venv/lib/python3.10/site-packages/playwright/_impl/_connection.py", line 96, in inner_send
    result = next(iter(done)).result()
playwright._impl._api_types.Error: stacks_id: expected string, got undefined

This only happens on the new v1.32.0 not on v1.31.1.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions