Skip to content

fix: handle Chrome browser version mismatch in base profile#153

Merged
Ashif4354 merged 1 commit intomasterfrom
feat/any-chrome-version
Mar 9, 2026
Merged

fix: handle Chrome browser version mismatch in base profile#153
Ashif4354 merged 1 commit intomasterfrom
feat/any-chrome-version

Conversation

@Ashif4354
Copy link
Copy Markdown
Owner

@Ashif4354 Ashif4354 commented Mar 9, 2026

When ChromeDriver's version doesn't match the installed Chrome browser, extract the installed version from the error message and retry initialization with the correct version_main parameter to allow compatibility with any Chrome version.

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Enhanced error handling for browser initialization to automatically detect and adapt to the installed browser version when version mismatches occur, improving reliability and reducing manual configuration requirements.

When ChromeDriver's version doesn't match the installed Chrome browser, extract
the installed version from the error message and retry initialization with
the correct version_main parameter to allow compatibility with any Chrome
version.
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying streamstorm-ui with  Cloudflare Pages  Cloudflare Pages

Latest commit: fe5daec
Status: ✅  Deploy successful!
Preview URL: https://024e9028.streamstorm.pages.dev
Branch Preview URL: https://feat-any-chrome-version.streamstorm.pages.dev

View logs

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 9, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

The change adds error handling to Chrome initialization in UndetectedDrivers.py. When the base-profile Chrome initialization fails due to an unsupported browser version, the code now extracts the installed major version from the error message and retries with the corrected version, while re-raising unrelated errors.

Changes

Cohort / File(s) Summary
Chrome Initialization Error Handling
src/Engine/lib/core/UndetectedDrivers.py
Added try/except wrapper in initiate_base_profile method to catch browser version mismatch errors, extract the installed major version from the error message, and retry Chrome initialization with the corrected version parameter.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A version mismatch once caused despair,
But now the driver knows just how to care—
It reads the error, finds what's true,
Extracts the number, retries anew! 🔄

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and clearly summarizes the main change: handling Chrome browser version mismatch in base profile initialization, which aligns with the PR's core objective of dynamic version matching.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/any-chrome-version

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Ashif4354
Copy link
Copy Markdown
Owner Author

@coderabbitai generate changelog in markdown format

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 9, 2026

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Get PR details and diff
gh pr view 153 --repo Ashif4354/StreamStorm --json title,body,files,commits

Length of output: 1442


🏁 Script executed:

#!/bin/bash
# Get the actual diff for the PR
gh pr diff 153 --repo Ashif4354/StreamStorm

Length of output: 1314


@Ashif4354 Here is the changelog in Markdown format:


# Changelog

## [Unreleased]

### Bug Fixes

- **Chrome version mismatch auto-recovery** (`src/Engine/lib/core/UndetectedDrivers.py`)
  - Wrapped the `Chrome` driver initialization in `initiate_base_profile()` with a
    `try/except` block to gracefully handle ChromeDriver ↔ Chrome version mismatches.
  - When the exception message contains `"Current browser version is"`, the installed
    Chrome major version is extracted from the error message using a regex pattern and
    the driver is re-initialized with the correct `version_main` parameter automatically.
  - All other initialization failures are re-raised as a `RuntimeError` with a
    descriptive message, preserving the original exception as context.
  - Added `from re import search` to support the version extraction logic.

### Improvements

- Eliminates the need for manual `version_main` configuration when ChromeDriver and
  the locally installed Chrome browser are on different versions.
- Improves reliability and resilience of browser initialization across diverse
  environments and Chrome update cycles.

### Files Changed

| File | Additions | Deletions |
|------|-----------|-----------|
| `src/Engine/lib/core/UndetectedDrivers.py` | +17 | -3 |

@Ashif4354 Ashif4354 merged commit 3f3ead3 into master Mar 9, 2026
7 of 8 checks passed
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.

1 participant