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

With Drupal 10.3+: the requested URL returned error: 500 #41

Closed
andriokha opened this issue Apr 19, 2024 · 15 comments
Closed

With Drupal 10.3+: the requested URL returned error: 500 #41

andriokha opened this issue Apr 19, 2024 · 15 comments

Comments

@andriokha
Copy link
Contributor

Hi,

I'm finding that the latest version of Drupal this works with is 10.2. It seems to be down to #3240792 (see comment #63 onwards).

The following passes when $branch is 10.2.x but fails with 10.3.x.

git clone --depth 1 https://git.drupalcode.org/project/drupal -b $branch
cd drupal
ddev delete -Oy test-drupal || true
ddev config --project-name=test-drupal --php-version=8.1 --web-environment-add SYMFONY_DEPRECATIONS_HELPER=disabled
ddev start -y
ddev composer -n require "drupal/core-dev:^10"
ddev get ddev/ddev-selenium-standalone-chrome
ddev restart
ddev exec "curl -v selenium-chrome:4444/wd/hub/status"
ddev exec -d /var/www/html "vendor/bin/phpunit -v -c ./core/phpunit.xml.dist ./core/modules/system/tests/src/FunctionalJavascript/FrameworkTest.php"

As a workaround I'm using https://raw.githubusercontent.com/ddev/ddev-contrib/master/docker-compose-services/drupalci-chromedriver/docker-compose.chromedriver.yaml which uses drupalci/webdriver-chromedriver:production.

Thanks!

@andriokha
Copy link
Contributor Author

phpunit.log
selenium.log

@andriokha
Copy link
Contributor Author

It appears to be that \WebDriver\WebDriver::session() is checking for the w3c flag one level higher up than where it was being set, so it was using the W3C dialect, which won't be supported until #3421202 lands. Using the following worked for me:

[\"chrome\", {\"browserName\":\"chrome\",\"w3c\":false,\"goog:chromeOptions\":{\"args\":[\"--disable-gpu\",\"--headless\", \"--no-sandbox\", \"--disable-dev-shm-usage\"]}}, \"http://selenium-chrome:4444/wd/hub\"]

@rfay
Copy link
Member

rfay commented Apr 20, 2024

Does that mean this gas nothing to do with this repo?

@andriokha
Copy link
Contributor Author

I'm not sure I'm afraid. It seems to me either the config in this repo is wrong (and would be fixed with this change), or the new library being used (lullabot/php-webdriver) is looking in the wrong place. I can't find any reference on the matter (this is a flag to switch between two different standards, so I guess it isn't in either standard itself). It's not mentioned as a chrome capability here and it doesn't to my mind make much sense as a browser-specific capability. Quickly looking at some other webdrivers (ie I could easily have missed something) it seems that Facebook's driver automatically detects dialect, so I guess no flag needed; and instaclick's version seems to infer w3c mode from whether any capabilities are passed at all (which makes no sense to me!).

So yeah, not much help overall! I pinged this issue where I expect bigger brains will weigh in (:

@thijsboots
Copy link

Thank you for posting that fix, @andriokha! Works perfectly on my machine.

@penyaskito
Copy link
Member

Had the same issue, changing .ddev/config.selenium-standalone-chrome.yaml as suggested fixed it for me (working on contrib with 10.3.x HEAD)

@simesy
Copy link

simesy commented Jun 9, 2024

This change also fixed for me. ddev v1.23.1, Drupal 10.3, seleniarm/standalone-chromium:4.1.4-20220429

@simesy
Copy link

simesy commented Jun 10, 2024

I'm guessing this needs to be updated to a new image https://github.com/ddev/ddev-selenium-standalone-chrome/blob/main/docker-compose.selenium-chrome.yaml#L9

This core issure https://www.drupal.org/project/drupal/issues/3421202 is proposing 4.17 which is a couple of months old, versus this one is 2 years old.

@weitzman
Copy link
Collaborator

That upgrade has stalled. See #42

@slashrsm
Copy link

slashrsm commented Jul 1, 2024

Changing MINK_DRIVER_ARGS_WEBDRIVER as proposed by @andriokha fixes this issue for me. Would it be possible to pull this fix upstream?

@andriokha
Copy link
Contributor Author

@andriokha
Copy link
Contributor Author

And this which IIUC is an alternative to PR 10 above: https://www.drupal.org/i/3458751

rfay added a commit to rfay/ddev-selenium-standalone-chrome that referenced this issue Jul 3, 2024
@andriokha
Copy link
Contributor Author

OK the PR for lullabot/php-webdriver got merged in. If some kind soul with perms could rerun the tests, with a bit of luck we'll be able to close this issue I think.

@rfay
Copy link
Member

rfay commented Jul 4, 2024

@andriokha
Copy link
Contributor Author

Nice, thanks @rfay!

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

No branches or pull requests

7 participants