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

Update to latest Debian (Bookworm/12) #54

Open
wants to merge 8 commits into
base: trunk
Choose a base branch
from

Conversation

fhoeben
Copy link

@fhoeben fhoeben commented Dec 9, 2023

Debian 12

Uses Eclipse Adoptium Temurin JDK 11 (as OpenJDK 11 is no longer supported)
No longer includes xfonts-cyrillic, as it is no longer supported
Uses official firefox from Debian (not the extended support one)

Thanks for contributing to the Docker-Selenium project!
A PR well described will help maintainers to quickly review and merge it

Before submitting your PR, please check our contributing guidelines, applied for this repository.
Avoid large PRs, help reviewers by making them as simple and short as possible.

Description

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@fhoeben
Copy link
Author

fhoeben commented Dec 9, 2023

Test failed on arm64 for Chromium. I don't know how to interpret this error

    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: Could not start a new session. Could not start a new session. Unable to obtain: Capabilities {browserName: chrome, browserVersion: 119.0, goog:chromeOptions: {args: [], extensions: []}, pageLoadStrategy: normal, platformName: linux, se:noVncPort: 7900, se:vncEnabled: true}, error Command failed with code: 2, executed: [--browser, chrome, --output, json, --browser-version, 119.0]
/tmp/selenium-manager15213643794124591921/manager/0.4.15/selenium-manager: 1: cannot create �@: Permission denied
/tmp/selenium-manager15213643794124591921/manager/0.4.15/selenium-manager: 2: H�: not found
/tmp/selenium-manager15213643794124591921/manager/0.4.15/selenium-manager: 3: h�: not found
/tmp/selenium-manager15213643794124591921/manager/0.4.15/selenium-manager: 4: Syntax error: Unterminated quoted string

@jamesmortensen
Copy link

Thanks for contributing. I think the problem with Chromium is something to do with changes in the upstream repo related to Chrome for Testing. There's also changes that happened on the upstream server that I'm working on resolving.

I'll look into the errors you faced and see if it's the same thing.

@jamesmortensen
Copy link

@fhoeben Do you know how to disable Selenium Manager? This is something @diemol mentioned here: #46 (comment) but aside from adding the env variable, I haven't had time to troubleshoot and really dig in.

It's been awhile since I've synced from upstream, so there's a lot of changes to sort through, and I'm working on that now.

Once synced, I plan to dig into it more. If you're able to get Chromium figured out, that would be awesome. Let me know if there's any other questions I can answer.

@fhoeben
Copy link
Author

fhoeben commented Dec 9, 2023

@jamesmortensen I did see some stuff comparing the upstream test scripts (tests/SeleniumTests/__init__.py):

class ChromeTests(SeleniumGenericTests):
    def setUp(self):
        options = ChromeOptions()
        options.enable_downloads = True
        options.add_argument('disable-features=DownloadBubble,DownloadBubbleV2')
        self.driver = webdriver.Remote(
            options=options,
            command_executor="http://%s:%s" % (SELENIUM_GRID_HOST,SELENIUM_GRID_PORT)
        )

@fhoeben fhoeben closed this Dec 9, 2023
@fhoeben fhoeben reopened this Dec 9, 2023
@fhoeben
Copy link
Author

fhoeben commented Dec 9, 2023

@jamesmortensen I thought it might be easier to start from the latest selenium/trunk branch, as their ubuntu version also comes with arm64 support these days.
It turns out the main issue was getting chromium instead of chrome, but now it seems to work on my M1 mac with only the changes in https://github.com/fhoeben/docker-seleniarm/tree/ubuntu-cross (specifically fhoeben@8df5822)

Of course it is not a true cross platform set of images yet, and I just put chromium in the chrome image (and removed edge), but I think this might be a good path forward staying closer to the amd64 trunk. Otherwise maybe some inspiration for your efforts

@fhoeben
Copy link
Author

fhoeben commented Dec 10, 2023

@jamesmortensen I was a bit premature in my previous comment. Although the build process worked, the images did not :-(
Now I believe I put a version in that branch that does work, for chromium and firefox.

Locally (on my M1 Mac) the tests pass, on GitHub the amd64 tests pass, but the arm64 tests fail. I suspect that is due to the fact the GitHub runners are amd64 and I try to run the tests using emulation there.

@diemol
Copy link
Member

diemol commented Dec 11, 2023

@fhoeben Do you know how to disable Selenium Manager? This is something @diemol mentioned here: #46 (comment) but aside from adding the env variable, I haven't had time to troubleshoot and really dig in.

It's been awhile since I've synced from upstream, so there's a lot of changes to sort through, and I'm working on that now.

Once synced, I plan to dig into it more. If you're able to get Chromium figured out, that would be awesome. Let me know if there's any other questions I can answer.

@jamesmortensen I can help with that. Which branch should I use to do the same changes I did to avoid Selenium Manager?

@diemol
Copy link
Member

diemol commented Dec 11, 2023

BTW, avoiding Selenium Manager will make Chromium work.

@jamesmortensen
Copy link

@fhoeben - Just FYI, the images don't use the extended support Firefox. They pull from Debian snapshots so I can control the specific Firefox version that gets installed. If the latest Firefox is ever broken on one of the architectures, this gives us control to pull a more stable version of Firefox into the images and make sure all 3 architectures use the same Firefox, but without having to rely on the old ESR build.

I'll work on documenting this as well at some point.

Also, just FYI we are planning to potentially move the base image to Ubuntu and replace Debian. I need to open a draft pull request to showcase what I've done so far on this. I will do this once we stabilize the images. Thank you for the work you've done to upgrade to the latest Debian release.

@fhoeben
Copy link
Author

fhoeben commented Dec 14, 2023

@jamesmortensen thanks for all YOUR work.

I believe I have working images based on Ubuntu (using Debian packages for chromium, and packages from team-mozilla for Firefox) in my test branch. Again no fixed versions, but also not ESR, but that should be possible by adding a version to their apt-get command I suppose.

I'll create a draft PR for those, maybe those can provide some input to further your efforts in that area...

@fhoeben fhoeben mentioned this pull request Dec 14, 2023
8 tasks
@jamesmortensen
Copy link

jamesmortensen commented Dec 14, 2023 via email

@diemol
Copy link
Member

diemol commented Dec 14, 2023

IIRC, the permissions issue should be fixed already.
I wanted to add the changes I did to avoid Selenium Manager get used. Should I do the in this PR or is there another one?

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.

None yet

3 participants