Skip to content

[Bug]: Page.goto() method throw error: interrupted by another navigation #42050

Closed

Description

Version

1.61.0

Steps to reproduce

Example steps (replace with your own):

  1. Create test.html and test.py in the same directory.
  2. paste the following code:
import asyncio
from pathlib import Path

from playwright.async_api import async_playwright


async def main():
  _playwright = await async_playwright().start()
  _browser = await _playwright.firefox.launch(headless=False)
  _context = await _browser.new_context(device_scale_factor=3)
  
  page = await _context.new_page()
  _ = await page.goto((Path(__file__).parent / 'test.html').as_uri())
  
  await page.wait_for_load_state('networkidle')
  _ = await page.goto('about:blank')
  
  await page.close()
  await _browser.close()
  return
  
if __name__ == '__main__':
  asyncio.run(main())
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <p class="aaa">
    test
  </p>
</body>
<style>
  .aaa {
    background-color: blue;
  }
</style>
</html>
  1. Run this code with playwright 1.61.0 installed

Output:

(bot) PS E:\bot\plugins\render_plugin> uv run .\test.py
Traceback (most recent call last):
  File "E:\bot\plugins\render_plugin\test.py", line 23, in <module>
    asyncio.run(main())
  File "C:\Users\Administrator\AppData\Roaming\uv\python\cpython-3.12-windows-x86_64-none\Lib\asyncio\runners.py", line 195, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Roaming\uv\python\cpython-3.12-windows-x86_64-none\Lib\asyncio\runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Administrator\AppData\Roaming\uv\python\cpython-3.12-windows-x86_64-none\Lib\asyncio\base_events.py", line 691, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "E:\bot\plugins\render_plugin\test.py", line 15, in main
    _ = await page.goto('about:blank')
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\bot\.venv\Lib\site-packages\playwright\async_api\_generated.py", line 9764, in goto
    await self._impl_obj.goto(
  File "E:\bot\.venv\Lib\site-packages\playwright\_impl\_page.py", line 560, in goto
    return await self._main_frame.goto(**locals_to_params(locals()))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\bot\.venv\Lib\site-packages\playwright\_impl\_frame.py", line 156, in goto
    await self._channel.send(
  File "E:\bot\.venv\Lib\site-packages\playwright\_impl\_connection.py", line 69, in send
    return await self._connection.wrap_api_call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\bot\.venv\Lib\site-packages\playwright\_impl\_connection.py", line 563, in wrap_api_call
    raise rewrite_error(error, f"{parsed_st['apiName']}: {error}") from None
playwright._impl._errors.Error: Page.goto: Navigation to "about:blank" is interrupted by another navigation to "about:blank"
Call log:
  - navigating to "about:blank", waiting until "load"

Traceback (most recent call last):
  File "C:\Users\Administrator\AppData\Roaming\uv\python\cpython-3.12-windows-x86_64-none\Lib\asyncio\base_subprocess.py", line 126, in __del__
  File "C:\Users\Administrator\AppData\Roaming\uv\python\cpython-3.12-windows-x86_64-none\Lib\asyncio\base_subprocess.py", line 104, in close
  File "C:\Users\Administrator\AppData\Roaming\uv\python\cpython-3.12-windows-x86_64-none\Lib\asyncio\proactor_events.py", line 109, in closeevents.py", line 799, in call_soon
  File "C:\Users\Administrator\AppData\Roaming\uv\python\cpython-3.12-windows-x86_64-none\Lib\asyncio\base_events.py", line 545, in _check_closed
RuntimeError: Event loop is closed
(bot) PS E:\bot\plugins\render_plugin> uv pip list | grep.exe 'playwright'
Using Python 3.12.13 environment at: E:\bot\.venv
playwright                1.61.0

Expected behavior

There isn't any error.

Actual behavior

raise playwright._impl._errors.Error: Page.goto: Navigation to "about:blank" is interrupted by another navigation to "about:blank"

Additional context

In fact, it's so strange that the page only goto about:blank once, but it raises error navigation to the link while navigating to itself. I understand and it doesn't affect my service if navigating to new service when another one isn't complted. Is there any way to ignore this error?

Environment

- Operating System: [Windows 10 22H2]
- CPU: [amd64]
- Browser: [Firefox]
- Python Version: [3.12.13]
- uv: [0.11.29]

Activity

  1. Skn0tt commented on Jul 30, 2026

    @Skn0tt
    Contributor

    Moving over to Playwright Core, this seems to be specific to Firefox across past versions, except 1.59, weirdly. I'm looking into it.

  2. github-actions commented on Jul 30, 2026

    @github-actions
    Contributor

    Hi, I'm the Playwright bot and I took a first look at this.

    Couldn't reproduce it on Linux, so this looks platform-specific (Windows). Simon Knott (@Skn0tt) has already confirmed it's Firefox-only (across versions, oddly except 1.59) and is on it — so this is just extra data on what I tried.

    The error comes from Firefox committing its own about:blank navigation with a different document id than the one Playwright kicked off, so Playwright sees its navigation replaced and throws "interrupted by another navigation" (frames.ts:732). Only one explicit goto('about:blank') in your script, so the second one is coming from the engine.

    What I ran (none reproduced)
    • tip-of-tree (npm 1.63.0-next), Firefox, Linux
    • headless, and headed via xvfb-run
    • deviceScaleFactor: 3 + file:// page, matching your script; also an 8× loop of newContext → goto(file) → waitForLoadState('networkidle') → goto('about:blank')
    • every run passed — no "interrupted by another navigation"

    Your repro is Windows 10 + headed Firefox, which I can't match here, so the trigger looks tied to that environment.

    Triaged by the Playwright bot - agent run

  3. Skn0tt commented on Jul 30, 2026

    @Skn0tt
    Contributor

    Here's the minimum repro I found, it's very straightforward:

    it('should navigate from file URL to about:blank', async ({ page, asset, isAndroid, channel }) => {
      it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/42050' });
      it.skip(isAndroid, 'No files on Android');
      it.skip(channel === 'webkit-wsl', 'separate filesystem on wsl');
      await page.goto(url.pathToFileURL(asset('empty.html')).href);
      await page.goto('about:blank');
    });

    Interestingly, while it fails on 1.61, it's fine on 1.62 and #41859 seems to be what fixed it. The fix seems to be related to #39624. I'll commit this test to ensure we don't regress again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions