Symptom
With Browser(keep_alive=True), the script finishes the first task and asyncio.run never returns. The linked issue does not give an exception string.
Evidence what you'll see
- The constructor in the report is
browser = Browser(keep_alive=True). - The log starts an agent on browser-use
0.11.2.
Why it happens
asyncio.run waits until every task on the loop is done. A keep-alive browser is supposed to stay open, but closing that session was leaving its EventBus running, so the loop still had work and asyncio.run never returned. Pull request #4112 says it stops and resets the EventBus when a keep-alive session closes, so asyncio can exit and the session can be reused.
Affected versions
Browser Use 0.11.2 on Ubuntu 22.04.1, as the report states.
Fix steps
0 of 3 done
Your check marks stay in this browser only.
How to check it worked
- Run the script from the report again.
asyncio.runshould return, and the process should exit after the work instead of sitting there after the first task.
If it still fails
- The single-agent comment said a multi-agent script needs the merged pull request. The linked issue does not give a second code change beyond pull request #4112 and the single-agent workaround.
Sources and credit
Summarized in our own words from these public reports. Credit goes to their authors.
Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change
Hit an error we don't cover? Submit it