microsoft / microsoft/playwright
[Bug]: Navigation interrupted by another navigation when launching from persistent context for second time
@dgozman is already working on this.
Since Jun 25, 2026.
- Dominant language
- TypeScript
- Stars
- 96.3k
- Forks
- 6.5k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 180
Description
### Version
1.60.0
### Steps to reproduce
1. Clone my repo at https://github.com/fwdekker-pc/playwright_python_navigation_interrupted_by_another_navigation_at_second_launch
2. Run
```shell
uv sync
```
3. Run
```shell
# EITHER
uv run playwright install firefox
# OR
PLAYWRIGHT_SKIP_BROWSER_GC=1 uv run playwright install firefox
# OR
$env:PLAYWRIGHT_SKIP_BROWSER_GC=1 ; uv run playwright install firefox
```
4. Ensure the directory `profile` does not exist:
```shell
# EITHER
rm -r profile
# OR
remove-item -recurse profile
```
5. Run
```shell
uv run -m playwright_python_navigation_interrupted_by_another_navigation_at_second_launch
```
The browser will launch and then close again.
6. Repeat step 5.
### Expected behavior
In both step 5 and step 6, the browser should launch, and after launching is complete, explicitly navigate to `about:blank`. After all, the main body is:
```python
context = await p.firefox.launch_persistent_context("profile", headless=False)
await context.pages[0].goto("about:blank")
```
Since we're using a persistent context, the profile should be reused when launching again in step 6.
The output of step 6 should be the same as that of step 5, namely: nothing.
### Actual behavior
Step 5 runs as intended. However, during step 6, an error is raised with the following message:
`Page.goto: Navigation to "about:blank" is interrupted by another navigation to "about:blank"`
Full traceback
```python
Traceback (most recent call last):
File "", line 203, in _run_module_as_main
File "", line 88, in _run_code
File "C:\Users\FlorineDekker\Workspace\playwright_python_navigation_interrupted_by_another_navigation_at_second_launch\src\playwright_python_navigation_interrupted_by_another_navigation_at_second_launch\__main__.py", line 12, in
run(async_main())
~~~^^^^^^^^^^^^^^
File "C:\Users\FlorineDekker\AppData\Local\Python\pythoncore-3.14-64\Lib\asyncio\runners.py", line 204, in run
return runner.run(main)
~~~~~~~~~~^^^^^^
File "C:\Users\FlorineDekker\AppData\Local\Python\pythoncore-3.14-64\Lib\asyncio\runners.py", line 127, in run
return self._loop.run_until_complete(task)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "C:\Users\FlorineDekker\AppData\Local\Python\pythoncore-3.14-64\Lib\asyncio\base_events.py", line 719, in run_until_complete
return future.result()
~~~~~~~~~~~~~^^
File "C:\Users\FlorineDekker\Workspace\playwright_python_navigation_interrupted_by_another_navigation_at_second_launch\src\playwright_python_navigation_interrupted_by_another_navigation_at_second_launch\__main__.py", line 9, in async_main
await context.pages[0].goto("about:blank")
File "C:\Users\FlorineDekker\Workspace\playwright_python_navigation_interrupted_by_another_navigation_at_second_launch\.venv\Lib\site-packages\playwright\async_api\_generated.py", line 9611, in goto
await self._impl_obj.goto(
...<4 lines>...
)
File "C:\Users\FlorineDekker\Workspace\playwright_python_navigation_interrupted_by_another_navigation_at_second_launch\.venv\Lib\site-packages\playwright\_impl\_page.py", line 557, in goto
return await self._main_frame.goto(**locals_to_params(locals()))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\FlorineDekker\Workspace\playwright_python_navigation_interrupted_by_another_navigation_at_second_launch\.venv\Lib\site-packages\playwright\_impl\_frame.py", line 156, in goto
await self._channel.send(
"goto", self._navigation_timeout, locals_to_params(locals())
)
File "C:\Users\FlorineDekker\Workspace\playwright_python_navigation_interrupted_by_another_navigation_at_second_launch\.venv\Lib\site-packages\playwright\_impl\_connection.py", line 69, in send
return await self._connection.wrap_api_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<3 lines>...
)
^
File "C:\Users\FlorineDekker\Workspace\playwright_python_navigation_interrupted_by_another_navigation_at_second_launch\.venv\Lib\site-packages\playwright\_impl\_connection.py", line 559, 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"
```
### Additional context
* This bug does not occur when using Chromium.
* This bug does not occur when using Firefox' headless mode.
* This bug started occurring in v1.60.0. This bug was not present in v1.59.0.
* This bug does not occur if you navigate to any page other than `about:blank` directly after launch
### Environment
```Text
- Operating System: Windows 11 25H2
- CPU: x64
- Browser: Firefox
- Python Version: 3.14
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.