Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

fix unawaited grant_permissions

Nick Sweeting79ca05f5340c
diff --git a/browser_use/browser/session.py b/browser_use/browser/session.py
index befa9e9ec..bcd4669c2 100644
--- a/browser_use/browser/session.py
+++ b/browser_use/browser/session.py
@@ -1160,7 +1160,7 @@ class BrowserSession(BaseModel):
# if we have any viewport settings in the profile, make sure to apply them to the entire browser_context as defaults
if self.browser_profile.permissions:
try:
- self.browser_context.grant_permissions(self.browser_profile.permissions)
+ await self.browser_context.grant_permissions(self.browser_profile.permissions)
except Exception as e:
self.logger.warning(
f'⚠️ Failed to grant browser permissions {self.browser_profile.permissions}: {type(e).__name__}: {e}'