acquia / blt-behat

Acquia BLT plugin providing integration with Behat
GNU General Public License v2.0
0 stars 16 forks source link

DMore/chrome-mink-extension is breaking #21

Open bryanpizzillo opened 2 years ago

bryanpizzillo commented 2 years ago

The dmore/behat-chrome-extension repo looks to have been made private and requires a gitlab login. It looks like this repo has actually moved to behat-chrome/behat-chrome-extension. (v1.3.0 is the same commit)

It should also be noted that dmore/chrome-mink-driver has also moved, but that is still a dependency of behat-chrome/behat-chrome-extension. So maybe more breakage is to come?

xurizaemon commented 2 years ago

This is due to acquia/blt-behat having locked its dependency to the Git repo rather than consuming a released package of DMore/behat-chrome-extension.

Recently in https://gitlab.com/behat-chrome/chrome-mink-driver/-/issues/121 we made a relocation of the project on Gitlab (https://gitlab.com/dmore => https://gitlab.com/behat-chrome), but the Packagist component continues to have the same name (dmore/behat-chrome-extension, dmore/chrome-mink-driver).

Reproduction using a clone of this repo in Docker container (sandboxing from my available creds):

bash-5.1# composer install --ignore-platform-req=ext-gd --ignore-platform-req=ext-gd
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Package operations: 111 installs, 0 updates, 0 removals
  - Downloading psr/log (1.1.4)
  - Downloading zumba/amplitude-php (1.0.2)
  - Downloading symfony/polyfill-ctype (v1.23.0)
  - Downloading symfony/yaml (v4.4.29)
  - Downloading symfony/polyfill-mbstring (v1.23.1)
  - Downloading twig/twig (v2.14.7)
  - Downloading symfony/twig-bridge (v3.4.47)
  - Downloading psr/container (1.1.2)
  - Downloading symfony/service-contracts (v2.4.0)
  - Downloading symfony/polyfill-php80 (v1.23.1)
  - Downloading symfony/polyfill-php73 (v1.23.0)
  - Downloading symfony/console (v4.4.33)
  - Downloading symfony/polyfill-php81 (v1.23.0)
  - Downloading symfony/filesystem (v4.4.27)
  - Downloading symfony/config (v4.4.33)
  - Downloading loophp/phposinfo (1.7.2)
  - Downloading dflydev/dot-access-data (v1.1.0)
  - Downloading grasmash/yaml-expander (1.4.0)
  - Downloading grasmash/yaml-cli (2.0.1)
  - Downloading symfony/process (v4.4.30)
  - Downloading symfony/finder (v5.3.7)
  - Downloading symfony/polyfill-php72 (v1.23.0)
  - Downloading symfony/polyfill-intl-normalizer (v1.23.0)
  - Downloading symfony/polyfill-intl-idn (v1.23.0)
  - Downloading ralouphie/getallheaders (3.0.3)
  - Downloading psr/http-message (1.0.1)
  - Downloading guzzlehttp/psr7 (1.8.3)
  - Downloading guzzlehttp/promises (1.5.1)
  - Downloading guzzlehttp/guzzle (6.5.5)
  - Downloading enlightn/security-checker (v1.9.0)
  - Downloading webmozart/assert (1.10.0)
  - Downloading webmozart/path-util (2.3.0)
  - Downloading webflo/drupal-finder (1.2.2)
  - Downloading symfony/var-dumper (v5.3.10)
  - Downloading symfony/event-dispatcher-contracts (v1.1.9)
  - Downloading symfony/event-dispatcher (v4.4.30)
  - Downloading nikic/php-parser (v4.13.1)
  - Downloading psy/psysh (v0.10.9)
  - Downloading league/container (3.4.1)
  - Downloading grasmash/expander (1.0.0)
  - Downloading consolidation/config (1.2.1)
  - Downloading consolidation/site-alias (3.1.1)
  - Downloading consolidation/site-process (4.1.0)
  - Downloading composer/semver (3.2.6)
  - Downloading consolidation/self-update (2.0.0)
  - Downloading consolidation/output-formatters (4.1.2)
  - Downloading consolidation/log (2.0.2)
  - Downloading consolidation/annotated-command (4.4.0)
  - Downloading consolidation/robo (3.0.6)
  - Downloading consolidation/filter-via-dot-access-data (1.0.0)
  - Downloading chi-teck/drupal-code-generator (1.33.1)
  - Downloading drush/drush (10.6.1)
  - Downloading typo3/phar-stream-wrapper (v3.1.7)
  - Downloading symfony/translation-contracts (v2.4.0)
  - Downloading symfony/validator (v4.4.33)
  - Downloading symfony/translation (v4.4.32)
  - Downloading symfony/serializer (v4.4.33)
  - Downloading symfony/routing (v4.4.30)
  - Downloading symfony/deprecation-contracts (v2.4.0)
  - Downloading symfony/mime (v5.3.8)
  - Downloading symfony/http-foundation (v4.4.33)
  - Downloading symfony/psr-http-message-bridge (v2.1.2)
  - Downloading symfony/polyfill-iconv (v1.23.0)
  - Downloading symfony/http-client-contracts (v2.4.0)
  - Downloading symfony/debug (v4.4.31)
  - Downloading symfony/error-handler (v4.4.30)
  - Downloading symfony/http-kernel (v4.4.33)
  - Downloading symfony/dependency-injection (v4.4.33)
  - Downloading symfony-cmf/routing (2.3.4)
  - Downloading stack/builder (v1.0.6)
  - Downloading pear/pear_exception (v1.0.2)
  - Downloading pear/console_getopt (v1.4.3)
  - Downloading pear/pear-core-minimal (v1.10.11)
  - Downloading pear/archive_tar (1.4.14)
  - Downloading masterminds/html5 (2.7.5)
  - Downloading laminas/laminas-stdlib (3.6.1)
  - Downloading laminas/laminas-escaper (2.9.0)
  - Downloading laminas/laminas-feed (2.15.0)
  - Downloading psr/http-factory (1.0.1)
  - Downloading laminas/laminas-diactoros (2.8.0)
  - Downloading doctrine/lexer (1.2.1)
  - Downloading egulias/email-validator (2.1.25)
  - Downloading psr/cache (1.0.1)
  - Downloading doctrine/annotations (1.13.2)
  - Downloading doctrine/reflection (1.2.2)
  - Downloading asm89/stack-cors (1.3.0)
  - Downloading drupal/core (9.2.9)
  - Downloading consolidation/comments (1.0.2)
  - Downloading acquia/drupal-environment-detector (v1.4.0)
  - Downloading acquia/blt (13.2.0)
  - Downloading behat/gherkin (v4.6.2)
  - Downloading symfony/dom-crawler (v4.4.17)
  - Downloading symfony/browser-kit (v4.4.17)
  - Downloading symfony/css-selector (v5.2.0)
  - Downloading behat/mink (v1.8.1)
  - Downloading behat/mink-browserkit-driver (v1.3.4)
  - Downloading behat/transliterator (v1.3.0)
  - Downloading behat/behat (v3.8.1)
  - Downloading bex/behat-extension-driver-locator (2.0.1)
  - Downloading behat/mink-extension (2.3.1)
  - Downloading bex/behat-screenshot (2.1.0)
  - Downloading textalk/websocket (1.5.0)
  - Downloading dmore/chrome-mink-driver (2.7.0)
  - Downloading dmore/behat-chrome-extension (1.3.0)
  - Downloading drupal/drupal-driver (v2.1.0)
  - Downloading instaclick/php-webdriver (1.4.7)
  - Downloading behat/mink-selenium2-driver (v1.4.0)
  - Downloading fabpot/goutte (v3.3.1)
  - Downloading behat/mink-goutte-driver (v1.2.1)
  - Downloading drupal/drupal-extension (v4.1.0)
  - Downloading jarnaiz/behat-junit-formatter (v1.3.2)
 100/111 [=========================>--]  90%
Could not fetch https://gitlab.com/api/v4/projects/DMore%2Fbehat-chrome-extension/repository/archive.zip?sha=6279986ef85ac179f055460502e9b11c3784146c, enter your gitlab.com credentials to access private repos
A token will be created and stored in "/tmp/auth.json", your password will never be stored
To revoke access to this token you can visit https://gitlab.com/-/profile/personal_access_tokens

What wasn't anticipated with this was that Gitlab rejects access to the downloads rather than providing a redirect.

Updated releases (which obtain working URLs) have been made, and can be used via an update.

xurizaemon commented 2 years ago

Hmm. Maybe I'm reading that wrong, after a moment the output continued:

  - Downloading jarnaiz/behat-junit-formatter (v1.3.2)
 100/111 [=========================>--]  90%
Could not fetch https://gitlab.com/api/v4/projects/DMore%2Fbehat-chrome-extension/repository/archive.zip?sha=6279986ef85ac179f055460502e9b11c3784146c, enter your gitlab.com credentials to access private repos
A token will be created and stored in "/tmp/auth.json", your password will never be stored
To revoke access to this token you can visit https://gitlab.com/-/profile/personal_access_tokens
Username: 
Password: 
    Failed to download dmore/behat-chrome-extension from dist: The "https://gitlab.com/oauth/token" file could not be downloaded (HTTP/2 400 ):
{"error":"invalid_grant","error_description":"The provided authorization grant is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to anot...
    Now trying to download from source
  - Syncing dmore/behat-chrome-extension (1.3.0) into cache
 108/111 [===========================>]  97%A connection timeout was encountered. If you intend to run Composer without connecting to the internet, run the command again prefixed with COMPOSER_DISABLE_NETWORK=1 to make Composer run in offline mode.
  - Downloading drupal/core (9.2.9)
  - Downloading dmore/chrome-mink-driver (2.7.0)
  - Downloading drupal/drupal-extension (v4.1.0)

Could not fetch https://gitlab.com/api/v4/projects/DMore%2Fchrome-mink-driver/repository/archive.zip?sha=d66765fb7f448e8b2bca2b899308a4a6d8a69264, enter your gitlab.com credentials to access private repos
A token will be created and stored in "/tmp/auth.json", your password will never be stored
To revoke access to this token you can visit https://gitlab.com/-/profile/personal_access_tokens
Username: 
Password: 
    Failed to download dmore/chrome-mink-driver from dist: The "https://gitlab.com/oauth/token" file could not be downloaded (HTTP/2 400 ):
{"error":"invalid_grant","error_description":"The provided authorization grant is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to anot...
    Now trying to download from source
  - Syncing dmore/chrome-mink-driver (2.7.0) into cache
  - Installing psr/log (1.1.4): Extracting archive

My understanding was that Packagist serves the releases, not Gitlab. If I'm wrong, then it might be that a release needs to be made that Packagist can refer people to.

xurizaemon commented 2 years ago

If the thing breaking for you is the interactive prompt, try adding -n to your composer install. This will disable interactive interface including the credentials prompt for that relocated file.

Composer will try the .zip URL which fails (sorry!), then fall back to source download and can continue.

xurizaemon commented 2 years ago

Released updated versions for your use:

Please update accordingly, but do not change your require from dmore/ to behat-chrome/ as that change has not been made upstream (and the behat-chrome/* packages referenced in #22 are unsupported placeholders only).