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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[馃悰 Bug]: Selenium 4.20.0(greater 4.6.0) - AWS Lambda #13917

Closed
hwk06023 opened this issue May 8, 2024 · 3 comments
Closed

[馃悰 Bug]: Selenium 4.20.0(greater 4.6.0) - AWS Lambda #13917

hwk06023 opened this issue May 8, 2024 · 3 comments
Labels
I-question Applied to questions. Issues should be closed and send the user to community resources.

Comments

@hwk06023
Copy link

hwk06023 commented May 8, 2024

What happened?

def setup_driver() -> webdriver.Chrome:
    options = Options()
    options.add_argument("--headless")
    options.add_argument("--no-sandbox")
    options.add_argument("--disable-dev-shm-usage")
    driver = webdriver.Chrome(
        service=Service(), options=options
    )
    return driver
raise NoSuchDriverException(msg) from errINIT_REPORT Init Duration: 13653.08 ms	Phase: invoke	Status: error	Error Type: Runtime.ExitError

As I known, "If you are using Selenium 4.6 or greater, you shouldn鈥檛 need to set a driver location.".

But lambda is Read-only. So, it occurs os error. I tried below.

def setup_driver() -> webdriver.Chrome:
    options = Options()
    options.add_argument("--headless")
    options.add_argument("--no-sandbox")
    options.add_argument("--disable-dev-shm-usage")
    driver = webdriver.Chrome(
        service=Service(executable_path="./opt/chromedriver"), options=options
    )
    return driver

But this doesn't seem to be the right way to use it.

Help me please.. 馃檹

Thank you.

How can we reproduce the issue?

python
def setup_driver() -> webdriver.Chrome:
    options = Options()
    options.add_argument("--headless")
    options.add_argument("--no-sandbox")
    options.add_argument("--disable-dev-shm-usage")
    driver = webdriver.Chrome(
        service=Service(), options=options
    )
    return driver
def setup_driver() -> webdriver.Chrome:
    options = Options()
    options.add_argument("--headless")
    options.add_argument("--no-sandbox")
    options.add_argument("--disable-dev-shm-usage")
    driver = webdriver.Chrome(
        service=Service(executable_path="./opt/chromedriver"), options=options
    )
    return driver


### Relevant log output

```shell
.cache/selenium) cannot be created: Read-only file system

...

raise NoSuchDriverException(msg) from errINIT_REPORT Init Duration: 13653.08 ms	Phase: invoke	Status: error	Error Type: Runtime.ExitError


### Operating System

AWS lambda(x86_64)

### Selenium version

Python: 3.12.0, Selenium : 4.20.0

### What are the browser(s) and version(s) where you see this issue?

Not in there. If i need, tell me please.

### What are the browser driver(s) and version(s) where you see this issue?

Not in there. If i need, tell me please.

### Are you using Selenium Grid?

_No response_
Copy link

github-actions bot commented May 8, 2024

@hwk06023, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

@diemol
Copy link
Member

diemol commented May 8, 2024

You can set the driver location and here is the complete example.

If you need more help, please use the links below.

@diemol diemol added I-question Applied to questions. Issues should be closed and send the user to community resources. and removed I-defect needs-triaging labels May 8, 2024
Copy link

github-actions bot commented May 8, 2024

馃挰 Please ask questions at:

@github-actions github-actions bot closed this as completed May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-question Applied to questions. Issues should be closed and send the user to community resources.
Projects
None yet
Development

No branches or pull requests

2 participants