Skip to content

[ZEPPELIN-6195] Fix Selenium tests by switching from Chrome to Firefox and upgrading outdated Spark#4941

Merged
Reamer merged 9 commits into
apache:masterfrom
ParkGyeongTae:fix-selenium-runtime-evaluate-error
Aug 8, 2025
Merged

[ZEPPELIN-6195] Fix Selenium tests by switching from Chrome to Firefox and upgrading outdated Spark#4941
Reamer merged 9 commits into
apache:masterfrom
ParkGyeongTae:fix-selenium-runtime-evaluate-error

Conversation

@ParkGyeongTae

@ParkGyeongTae ParkGyeongTae commented Jun 7, 2025

Copy link
Copy Markdown
Member

What is this PR for?

The test-selenium-with-spark-module-for-spark-3-4 job in GitHub Actions was consistently failing with the error:

from unknown command: 'Runtime.evaluate' wasn't found

This issue was caused by ChromeDriver not recognizing the Runtime.evaluate command.
To resolve it, the browser used in the test was switched from Chrome to Firefox.

During the migration to Firefox, another issue occurred:

Unable to download from https://dlcdn.apache.org/spark/spark-3.4.2/spark-3.4.2-bin-hadoop3.tgz
java.io.FileNotFoundException: https://dlcdn.apache.org/spark/spark-3.4.2/spark-3.4.2-bin-hadoop3.tgz

This was due to the Spark 3.4.2 binaries no longer being available from the Apache mirror.
The test environment was therefore updated to use Spark 3.5.6, which resolved the download problem.

Summary of changes:

  • Switched Selenium tests from Chrome to Firefox (non-snap) using geckodriver.
  • Updated Spark version in the test environment from 3.4.2 to 3.5.6 to fix missing binary downloads.

Before: test-selenium-with-spark-module-for-spark-3-4 (Chrome, Spark 3.4.2)
After: test-selenium-with-spark-module-for-spark-3-5 (Firefox, Spark 3.5.6)

What type of PR is it?

Bug Fix

Todos

  • - Verified that other integration tests (if any) are not affected
  • - Confirmed long-term compatibility with the Chrome for Testing approach

What is the Jira issue?

How should this be tested?

  • Run the test-selenium-with-spark-module-for-spark-3-4 job in GitHub Actions.
  • Verify that AuthenticationIT and any other affected Selenium tests pass without encountering Runtime.evaluate errors.

Screenshots (if appropriate)

N/A

Questions:

  • Does the license files need to update? No.
  • Is there breaking changes for older versions? No.
  • Does this needs documentation? No.

…rome/ChromeDriver to 125 and upgrading selenium-java to 4.20.0
@Reamer

Reamer commented Jun 10, 2025

Copy link
Copy Markdown
Contributor

Thank you for wanting to correct the Selenium tests. I see that your solution works. However, I find the downgrade very problematic, as it is not future-proof.

I had also looked at the problem some time ago and found a problem with the maximize method.

The problem with Selenium is analyzed in more detail here.
SeleniumHQ/selenium#15358

I would suggest a fixed height and width. Unfortunately, my initial tests were not successful. Perhaps you can find suitable values.

I like the update of the Selenium version, but not the downgrade of Chrome.

@ParkGyeongTae

Copy link
Copy Markdown
Member Author

@Reamer
I always appreciate your feedback. I understand your point, and I’ve reviewed the discussion in the link you shared.
I’ll look into a way to keep Chrome up to date while ensuring the tests run without errors.

@Reamer Reamer self-assigned this Jun 13, 2025
@pan3793

pan3793 commented Aug 1, 2025

Copy link
Copy Markdown
Member

The issue looks to be there for a long time, if it is specific to Chrome, how about switching the test to Firefox?

@Reamer

Reamer commented Aug 2, 2025

Copy link
Copy Markdown
Contributor

Firefox has other bugs as far as I remember

@ParkGyeongTae

Copy link
Copy Markdown
Member Author

@pan3793 @Reamer
Thanks for the suggestion! I switched the tests to Firefox, and they are now passing successfully. Please take a look and let me know if you have any further concerns.

@Reamer Reamer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you for looking at the issue again. In my opinion, too much useful code for other platforms has been removed.

Comment thread .github/workflows/frontend.yml
Comment thread zeppelin-integration/src/test/java/org/apache/zeppelin/WebDriverManager.java Outdated
@pan3793

pan3793 commented Aug 6, 2025

Copy link
Copy Markdown
Member

I see the failed run-e2e-tests-in-zeppelin-web still prints

[INFO] [09:56:05] I/launcher - Running 1 instances of WebDriver
[INFO] [09:56:05] I/direct - Using ChromeDriver directly...

Comment thread zeppelin-integration/src/test/java/org/apache/zeppelin/WebDriverManager.java Outdated

@Reamer Reamer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please completely revert your changes to the run-e2e-tests-in-zeppelin-web test. We should stick with one frontend test for this pull request and not touch both.

Comment thread .github/workflows/frontend.yml Outdated
…state and scope Firefox setting to spark-3-5 job only

@Reamer Reamer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@Reamer Reamer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The question still needs to be clarified.

Comment thread zeppelin-web/package-lock.json Outdated
Comment thread zeppelin-web/package-lock.json Outdated
@pan3793

pan3793 commented Aug 8, 2025

Copy link
Copy Markdown
Member

@ParkGyeongTae thanks for fixing this, could you please update the PR title and description to reflect the final solution?

@ParkGyeongTae ParkGyeongTae changed the title [ZEPPELIN-6195] Fix Selenium Runtime.evaluate error by downgrading Chrome/ChromeDriver to 125 and upgrading selenium-java to 4.20.0 [ZEPPELIN-6195] Fix test-selenium-with-spark-module-for-spark-3-4 job failure caused by “from unknown command: 'Runtime.evaluate' wasn't found” error Aug 8, 2025
@ParkGyeongTae

Copy link
Copy Markdown
Member Author

@pan3793
I’ve updated the PR title and description, as well as the Jira issue title and description.

@pan3793 pan3793 changed the title [ZEPPELIN-6195] Fix test-selenium-with-spark-module-for-spark-3-4 job failure caused by “from unknown command: 'Runtime.evaluate' wasn't found” error [ZEPPELIN-6195] Fix Selenium tests by switching from Chrome to Firefox and upgrading outdated Spark Aug 8, 2025
@Reamer Reamer merged commit 8ec487f into apache:master Aug 8, 2025
29 of 33 checks passed
asf-gitbox-commits pushed a commit that referenced this pull request Aug 8, 2025
…x and upgrading outdated Spark

### What is this PR for?
 The `test-selenium-with-spark-module-for-spark-3-4` job in GitHub Actions was consistently failing with the error:
  ```bash
 from unknown command: 'Runtime.evaluate' wasn't found
 ```

 This issue was caused by ChromeDriver not recognizing the `Runtime.evaluate` command.
To resolve it, the browser used in the test was switched from Chrome to Firefox.

During the migration to Firefox, another issue occurred:
```bash
Unable to download from https://dlcdn.apache.org/spark/spark-3.4.2/spark-3.4.2-bin-hadoop3.tgz
java.io.FileNotFoundException: https://dlcdn.apache.org/spark/spark-3.4.2/spark-3.4.2-bin-hadoop3.tgz
```
This was due to the Spark 3.4.2 binaries no longer being available from the Apache mirror.
The test environment was therefore updated to use Spark 3.5.6, which resolved the download problem.

Summary of changes:
- Switched Selenium tests from Chrome to Firefox (non-snap) using geckodriver.
- Updated Spark version in the test environment from 3.4.2 to 3.5.6 to fix missing binary downloads.

Before: test-selenium-with-spark-module-for-spark-3-4 (Chrome, Spark 3.4.2)
After: test-selenium-with-spark-module-for-spark-3-5 (Firefox, Spark 3.5.6)

### What type of PR is it?
Bug Fix

### Todos
* [x] - Verified that other integration tests (if any) are not affected
* [x] - Confirmed long-term compatibility with the Chrome for Testing approach

### What is the Jira issue?
* Jira: https://issues.apache.org/jira/browse/ZEPPELIN-6195

### How should this be tested?
- Run the `test-selenium-with-spark-module-for-spark-3-4` job in GitHub Actions.
- Verify that `AuthenticationIT` and any other affected Selenium tests pass without encountering `Runtime.evaluate` errors.

### Screenshots (if appropriate)
N/A

### Questions:
* Does the license files need to update? No.
* Is there breaking changes for older versions? No.
* Does this needs documentation? No.

Closes #4941 from ParkGyeongTae/fix-selenium-runtime-evaluate-error.

Signed-off-by: Philipp Dallig <philipp.dallig@gmail.com>
(cherry picked from commit 8ec487f)
Signed-off-by: Philipp Dallig <philipp.dallig@gmail.com>
@Reamer

Reamer commented Aug 8, 2025

Copy link
Copy Markdown
Contributor

Merged into master and branch-0.12

tbonelee added a commit that referenced this pull request Oct 2, 2025
### What is this PR for?
This PR stabilizes the `test-selenium...` job by switching the Selenium browser from Firefox to Microsoft Edge.
In #4941, we worked around a Linux ChromeDriver issue (SeleniumHQ/selenium#15358) by moving from Chrome to Firefox, but that workaround also seems to be not working well.

I use Edge driver instead, since it does not have flakiness like Firefox driver and is more aligned with Chrome since it is also based on Chromium.

Limitation: The root cause of Firefox browser failures has not been fully analyzed.

### What type of PR is it?
Bug Fix

### What is the Jira issue?
[[ZEPPELIN-6350]](https://issues.apache.org/jira/browse/ZEPPELIN-6350)

### How should this be tested?
- Check `test-selenium...` job in `frontend`

### Questions:
* Does the license files need to update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No


Closes #5089 from tbonelee/fix-selenium-test.

Signed-off-by: Chan Lee <chanho0325@gmail.com>
tbonelee added a commit that referenced this pull request Oct 2, 2025
### What is this PR for?
This PR stabilizes the `test-selenium...` job by switching the Selenium browser from Firefox to Microsoft Edge.
In #4941, we worked around a Linux ChromeDriver issue (SeleniumHQ/selenium#15358) by moving from Chrome to Firefox, but that workaround also seems to be not working well.

I use Edge driver instead, since it does not have flakiness like Firefox driver and is more aligned with Chrome since it is also based on Chromium.

Limitation: The root cause of Firefox browser failures has not been fully analyzed.

### What type of PR is it?
Bug Fix

### What is the Jira issue?
[[ZEPPELIN-6350]](https://issues.apache.org/jira/browse/ZEPPELIN-6350)

### How should this be tested?
- Check `test-selenium...` job in `frontend`

### Questions:
* Does the license files need to update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Closes #5089 from tbonelee/fix-selenium-test.

Signed-off-by: Chan Lee <chanho0325@gmail.com>
(cherry picked from commit 3d1ee7c)
Signed-off-by: Chan Lee <chanho0325@gmail.com>
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.

3 participants