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

[🐛 Bug]: Selenium tests failing on download #2032

Closed
cjproud opened this issue Nov 29, 2023 · 5 comments · Fixed by #2033
Closed

[🐛 Bug]: Selenium tests failing on download #2032

cjproud opened this issue Nov 29, 2023 · 5 comments · Fixed by #2033
Labels

Comments

@cjproud
Copy link

cjproud commented Nov 29, 2023

What happened?

We have some tests that run on a self-hosted runner that uses the standalone-chrome container as a service. I've noticed that some of these tests now fail on selenium/standalone-chrome:latest but successfully ran on the selenium/standalone-chrome:119.0 image. The specific tests were checking if a file download was successful.

Command used to start Selenium Grid with Docker

jobs: 
  test-lint:
    name: Test
    runs-on: [self-hosted, integration_tests]
    container: 
      image: ubuntu:22.04
      options: --name test
      volumes:
        - tmp_volume:/tmp_volume
    # Service containers to run with `container-job`
    services:
      # Label used to access the service container
      selenium_test:
        image: selenium/standalone-chrome
        ports: 
          - 4444:4444
          - 7900:7900
        env:
          SE_SCREEN_WIDTH: 1920
          SE_SCREEN_HEIGHT: 1080
        options: >-
          --shm-size 2gb
          --name selenium
        volumes:
          - tmp_volume:/tmp_volume

Relevant log output

FAIL: test_export_results (design.tests.integrations_tests.test_results_page.ResultsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/__w/<Folder1>/<App1>/<Folder2>/design/tests/integrations_tests/test_results_page.py", line 53, in test_export_results
    self.assertEquals(temp_files[0], "Test Simulation - Current.xlsx")
AssertionError: 'Test Simulation - Current.xlsx.crdownload' != 'Test Simulation - Current.xlsx'
- Test Simulation - Current.xlsx.crdownload
?                               -----------
+ Test Simulation - Current.xlsx

Operating System

Ubuntu

Docker Selenium version (tag)

4.15.0-20231128

Copy link

@cjproud, 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 Nov 29, 2023

@VietND96 we switched to Chrome for Testing, which might be the reason for this issue. Probably we need to revert 82603e9 and use the regular Chrome.

@VietND96
Copy link
Member

Hello @cjproud, may I know in your test is adding these args or not?

options.addArguments("--incognito")
options.addArguments("disable-features=DownloadBubble,DownloadBubbleV2")

In these 2 images, there is Chrome version different also
selenium/standalone-chrome:119.0 -> 119.0.6045.159
selenium/standalone-chrome:latest -> 119.0.6045.105

@VietND96
Copy link
Member

Ok, let's ignore the args. Something that I am able to reproduce when the docker volume is set to mount /home/seluser/Downloads, if permission is improper, the download is not triggered.
In your case, it is able to download, but the file with extension .crdownload which means the download is still in progress or stuck somewhere.
I will continue check this, if there is no clue, commit switch to Chrome for Testing will be reverted

VietND96 added a commit to NDViet/docker-selenium that referenced this issue Nov 29, 2023
@VietND96 VietND96 linked a pull request Nov 29, 2023 that will close this issue
8 tasks
VietND96 added a commit that referenced this issue Nov 29, 2023
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants