Skip to content

Reduce unnecessary waiting when initializing cloud browsers#67

Merged
zizhengtai merged 4 commits into
mainfrom
ztai/no-wait
Feb 12, 2026
Merged

Reduce unnecessary waiting when initializing cloud browsers#67
zizhengtai merged 4 commits into
mainfrom
ztai/no-wait

Conversation

@zizhengtai

Copy link
Copy Markdown
Contributor

Now that the frontend /initialize page automatically transitions to the signed in page after a successful login with a custom token, we no longer need to do the extra wait & refresh in this SDK.

Comment on lines +237 to +249
# Wait for browser window ID. The extension can take a bit to be installed, so we retry a
# few times.
max_attempts = 5
for attempt in range(max_attempts):
try:
browser_window_id = await self._wait_for_browser_window_id(
initialization_page, config
)
except NaradaExtensionMissingError:
if attempt == max_attempts - 1:
raise
logging.info("Waiting for Narada extension to be installed...")
await asyncio.sleep(1)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what happens if browser_window_id is not initialized even after 5 retries? I think we should send a "stop-session" request with "failed" status

@zizhengtai zizhengtai merged commit 694b376 into main Feb 12, 2026
4 checks passed
@zizhengtai zizhengtai deleted the ztai/no-wait branch February 12, 2026 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants