Commit 34c0996
committed
fix: Add CDP endpoint verification with exponential backoff for managed browsers (unclecode#1445)
browser_manager:
- Add CDP endpoint verification with retry logic and exponential backoff
- Call verification before connecting to CDP in `start()` method
- Graceful handling of timing issues during browser startup
test_cdp_strategy:
- Fix cookie persistence test by adding storage state management
- Fix session management test to work with managed browser architecture
- Add comprehensive CDP timing tests covering:
- Fast startup scenarios
- Delayed browser startup simulation
- Exponential backoff behavior validation
- Concurrent browser connections
- Stress testing with multiple successive startups
- Retry count verification
Impact:
- Eliminates browser startup failures due to CDP timing issues
- Provides robust fallback with automatic retries
- Maintains fast startup when CDP is immediately available
- Comprehensive test coverage ensures reliability
Resolves CDP connection timing issues in managed browser mode.1 parent 3fe49a7 commit 34c0996
File tree
2 files changed
+301
-36
lines changed- crawl4ai
- tests/browser
2 files changed
+301
-36
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
658 | 658 | | |
659 | 659 | | |
660 | 660 | | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
661 | 666 | | |
662 | 667 | | |
663 | 668 | | |
| |||
678 | 683 | | |
679 | 684 | | |
680 | 685 | | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
681 | 704 | | |
682 | 705 | | |
683 | 706 | | |
| |||
0 commit comments