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] Issues running selenium tests with headless Firefox #1540

Closed
cwperks opened this issue Aug 3, 2023 · 5 comments
Closed

[BUG] Issues running selenium tests with headless Firefox #1540

cwperks opened this issue Aug 3, 2023 · 5 comments
Assignees
Labels
bug Something isn't working untriaged

Comments

@cwperks
Copy link
Member

cwperks commented Aug 3, 2023

What is the bug?

The PR to fix the build on 2.x is running into issues in the integration tests running selenium tests with Firefox.

The build output contains an error stating InvalidArgumentError: binary is not a Firefox executable.

See example Github Action with the failure here: https://github.com/opensearch-project/security-dashboards-plugin/actions/runs/5744153275/job/15572648806?pr=1533

@cwperks cwperks added bug Something isn't working untriaged labels Aug 3, 2023
@cwperks
Copy link
Member Author

cwperks commented Aug 3, 2023

Not sure if its related, but the geckodriver release notes for 0.33.0 has known issues with FF: https://github.com/mozilla/geckodriver/releases/tag/v0.33.0

@cwperks
Copy link
Member Author

cwperks commented Aug 3, 2023

I see integration tests passing with the same runner and version 2.305.0, but its failing on 2.307.1.

More details:

2.305.0
Image: ubuntu-22.04
  Version: 20230702.1.0
  Included Software: https://github.com/actions/runner-images/blob/ubuntu22/20230702.1/images/linux/Ubuntu2204-Readme.md
  Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu22%2F20230702.1
2.307.1
Image: ubuntu-22.04
  Version: 2023072[8](https://github.com/opensearch-project/security-dashboards-plugin/actions/runs/5744153275/job/15572648806?pr=1533#step:1:9).3.0
  Included Software: https://github.com/actions/runner-images/blob/ubuntu22/20230728.3/images/linux/Ubuntu2204-Readme.md
  Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu22%2F20230728.3

@cwperks
Copy link
Member Author

cwperks commented Aug 3, 2023

One thing that's odd is that there are progressively more " surrounding the debug output of Browser path:

console.debug
    Driver path: /opt/hostedtoolcache/geckodriver/0.33.0/x64/geckodriver

      at logOutput (plugins/security-dashboards-plugin/node_modules/selenium-webdriver/common/seleniumManager.js:142:15)
          at runMicrotasks (<anonymous>)

  console.debug
    Browser path: "/usr/lib/firefox/firefox.sh"

      at logOutput (plugins/security-dashboards-plugin/node_modules/selenium-webdriver/common/seleniumManager.js:142:15)
          at runMicrotasks (<anonymous>)

  console.debug
    Driver path: /opt/hostedtoolcache/geckodriver/0.33.0/x64/geckodriver

      at logOutput (plugins/security-dashboards-plugin/node_modules/selenium-webdriver/common/seleniumManager.js:142:15)
          at runMicrotasks (<anonymous>)

  console.debug
    Browser path: ""/usr/lib/firefox/firefox.sh""

      at logOutput (plugins/security-dashboards-plugin/node_modules/selenium-webdriver/common/seleniumManager.js:142:15)
          at runMicrotasks (<anonymous>)

  console.log
    Remove the Sample Data

      at Object.<anonymous> (plugins/security-dashboards-plugin/test/jest_integration/saml_auth.test.ts:178:13)
          at runMicrotasks (<anonymous>)

  console.error
    Unhandled error

      at process.uncaught (node_modules/jest-jasmine2/build/jasmine/Env.js:241:19)
      at process.emit (node_modules/source-map-support/source-map-support.js:516:21)

  console.error
    InvalidArgumentError: binary is not a Firefox executable
        at Object.throwDecodedError (/home/runner/work/security-dashboards-plugin/security-dashboards-plugin/OpenSearch-Dashboards/plugins/security-dashboards-plugin/node_modules/selenium-webdriver/lib/error.js:524:15)
        at parseHttpResponse (/home/runner/work/security-dashboards-plugin/security-dashboards-plugin/OpenSearch-Dashboards/plugins/security-dashboards-plugin/node_modules/selenium-webdriver/lib/http.js:601:13)
        at Executor.execute (/home/runner/work/security-dashboards-plugin/security-dashboards-plugin/OpenSearch-Dashboards/plugins/security-dashboards-plugin/node_modules/selenium-webdriver/lib/http.js:529:28)
        at runMicrotasks (<anonymous>)
        at processTicksAndRejections (node:internal/process/task_queues:96:5)

      at process.uncaught (node_modules/jest-jasmine2/build/jasmine/Env.js:242:19)
      at process.emit (node_modules/source-map-support/source-map-support.js:516:21)

@cwperks
Copy link
Member Author

cwperks commented Aug 3, 2023

I have confirmed that this is an issue with selenium-webdriver 4.11.x, the build errors are resolved by forcing the resolution to 4.10.0

@cwperks
Copy link
Member Author

cwperks commented Aug 7, 2023

Closing the issue as its currently resolved by freezing the version of selenium to 4.10.0.

@cwperks cwperks closed this as completed Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged
Projects
None yet
Development

No branches or pull requests

1 participant