Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for SessionNotCreatedException in troubleshooting errors #2119

Merged

Conversation

yvsvarma
Copy link
Contributor

@yvsvarma yvsvarma commented Jan 2, 2025

User description

Description
This PR adds documentation for the SessionNotCreatedException under the "Troubleshooting Errors" section of the Selenium site. It includes a concise explanation of the exception, its likely causes, and actionable solutions.

Motivation and Context
The SessionNotCreatedException is a common error encountered by users, often caused by browser-WebDriver version mismatches, macOS privacy settings, or permission issues on the WebDriver binary. Documenting this will help users quickly understand and resolve the issue, improving their experience with Selenium.

Types of Changes
Documentation improvement (added a new section under "Troubleshooting Errors").

Checklist
I have read the contributing guidelines.
I have tested the changes locally using Hugo.
I have ensured the documentation renders as expected and the format is consistent with other entries.


PR Type

Documentation


Description

  • Added documentation for SessionNotCreatedException under "Troubleshooting Errors".

  • Explained common causes of the exception, including version mismatches and system restrictions.

  • Provided actionable solutions to resolve the exception, such as matching WebDriver and browser versions.

  • Included macOS-specific guidance and Linux/macOS permission fixes.


Changes walkthrough 📝

Relevant files
Documentation
_index.en.md
Documented `SessionNotCreatedException` causes and solutions

website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.en.md

  • Added a new section for SessionNotCreatedException.
  • Described likely causes of the exception.
  • Provided detailed solutions for resolving the issue.
  • Included platform-specific troubleshooting steps.
  • +18/-0   

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    Copy link

    netlify bot commented Jan 2, 2025

    👷 Deploy request for selenium-dev pending review.

    Visit the deploys page to approve it

    Name Link
    🔨 Latest commit b05d7c3

    Copy link
    Contributor

    qodo-merge-pro bot commented Jan 2, 2025

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ No major issues detected

    Copy link
    Contributor

    qodo-merge-pro bot commented Jan 2, 2025

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Score
    General
    Add code samples for version compatibility checking to improve troubleshooting guidance

    Add code examples showing how to programmatically check WebDriver and browser
    versions to help users implement version compatibility checks.

    website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.en.md [160-164]

     ### Possible Solutions
     
     - Ensure the WebDriver version matches the browser version. For Chrome, check the browser version at `chrome://settings/help` and download the matching driver from [ChromeDriver Downloads](https://chromedriver.chromium.org/downloads).
    +  ```python
    +  from selenium import webdriver
    +  driver = webdriver.Chrome()
    +  print(f"Chrome Version: {driver.capabilities['browserVersion']}")
    +  print(f"ChromeDriver Version: {driver.capabilities['chrome']['chromedriverVersion']}")
    +  ```
     - On macOS, go to **System Settings > Privacy & Security**, and allow the driver to run if blocked.
     - Verify the driver binary is executable (`chmod +x /path/to/driver` on Linux/macOS).
    • Apply this suggestion
    Suggestion importance[1-10]: 7

    Why: The code example provides practical, actionable guidance for users to programmatically verify version compatibility, which significantly enhances the troubleshooting documentation.

    7
    Include system requirements verification in troubleshooting documentation to prevent compatibility issues

    Add a note about checking system requirements and browser compatibility matrix to
    help users proactively prevent version mismatch issues.

    website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.en.md [153-157]

     ### Likely Cause
     
     - The browser version and WebDriver version are incompatible (e.g., ChromeDriver v113 with Chrome v115).
     - macOS privacy settings may block the WebDriver from running.
     - The WebDriver binary is missing, inaccessible, or lacks the necessary execution permissions (e.g., on Linux/macOS, the driver file may not be executable).
    +- System requirements not met (check browser compatibility matrix and minimum system requirements).
    • Apply this suggestion
    Suggestion importance[1-10]: 5

    Why: Adding system requirements check is a helpful addition to the troubleshooting guide, though it's a minor enhancement to the already comprehensive list of likely causes.

    5

    Copy link
    Member

    @harsha509 harsha509 left a comment

    Choose a reason for hiding this comment

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

    HI @yvsvarma ,

    Thank you for the PR. Could you please add similar changes in other translated pages too. (zh-cn, pt-br, ja)

    Thanks,
    Sri

    @yvsvarma
    Copy link
    Contributor Author

    yvsvarma commented Jan 2, 2025

    Sure @harsha509 , I will update the same in other languages too and will update! Thank you very much for reviewing this 😊

    @yvsvarma
    Copy link
    Contributor Author

    yvsvarma commented Jan 3, 2025

    HI @yvsvarma ,

    Thank you for the PR. Could you please add similar changes in other translated pages too. (zh-cn, pt-br, ja)

    Thanks, Sri

    Hi Sri,
    I updated the content in other language files too.
    Chinese - I added in Chinese language only.
    For Ja & pt-br - The existing files are in English only. Hence added english version in those files.

    Please review.

    Thanks,
    Vinay

    Copy link
    Member

    @harsha509 harsha509 left a comment

    Choose a reason for hiding this comment

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

    Thank you @yvsvarma !

    @yvsvarma
    Copy link
    Contributor Author

    yvsvarma commented Jan 3, 2025

    Thank you @yvsvarma !

    Thanks again for your time in reviewing this Sri!

    @harsha509 harsha509 merged commit 18b7f8d into SeleniumHQ:trunk Jan 3, 2025
    3 checks passed
    @yvsvarma yvsvarma deleted the docs/session-not-created-exception branch January 3, 2025 05:29
    selenium-ci added a commit that referenced this pull request Jan 3, 2025
    …rrors (#2119)[deploy site]
    
    * Add documentation for SessionNotCreatedException in troubleshooting errors
    
    * Add SessionNotCreatedException to Chinese translation (_index.zh-cn.md)
    
    * Add SessionNotCreatedException to Portuguese translation (_index.pt-br.md)
    
    ---------
    
    Co-authored-by: Sri Harsha <[email protected]> 18b7f8d
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    3 participants