Skip to content

Commit 63aa1c9

Browse files
author
maebahesioru
committed
fix: increase timeouts for STREAM proxy and page initialization
- STREAM proxy port wait: 10s -> 30s (Windows multiprocessing startup is slow) - initialization: textarea visibility wait: 10s -> 30s
1 parent 63bc4d6 commit 63aa1c9

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/api/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ async def _start_stream_proxy():
9292
server.STREAM_PROCESS = multiprocessing.Process(target=proxy.start, args=(server.STREAM_QUEUE, port, STREAM_PROXY_SERVER_ENV))
9393
server.STREAM_PROCESS.start()
9494
server.logger.info('STREAM proxy process started. Waiting for port readiness...')
95-
if await _wait_for_port(port):
95+
if await _wait_for_port(port, timeout=30.0):
9696
server.logger.info(f'STREAM proxy port {port} is ready.')
9797
else:
9898
server.logger.error(f'STREAM proxy port {port} not ready after timeout. Browser may fail to connect.')

src/browser/initialization.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,11 +313,11 @@ async def _initialize_page_logic(browser: AsyncBrowser):
313313
logger.info(f'✅ 输入框wrapper可见 (匹配: {wrapper_matched})')
314314
else:
315315
logger.warning('⚠️ 未找到任何wrapper,尝试直接查找输入框')
316-
input_locator, matched = await wait_for_any_selector(found_page, PROMPT_TEXTAREA_SELECTORS, timeout=10000)
316+
input_locator, matched = await wait_for_any_selector(found_page, PROMPT_TEXTAREA_SELECTORS, timeout=30000)
317317
if input_locator:
318318
logger.info(f'✅ 核心输入区域可见 (匹配: {matched})')
319319
else:
320-
await expect_async(found_page.locator(INPUT_SELECTOR)).to_be_visible(timeout=10000)
320+
await expect_async(found_page.locator(INPUT_SELECTOR)).to_be_visible(timeout=30000)
321321
logger.info('✅ 核心输入区域可见 (默认选择器)')
322322
try:
323323
from config.selectors import MODEL_SELECTORS_LIST

0 commit comments

Comments
 (0)