WordPress / phpunit-test-runner

GNU General Public License v2.0
65 stars 58 forks source link

Some error, maybe related to "webpack:prod" (webpack) task" #174

Closed javiercasares closed 2 years ago

javiercasares commented 2 years ago

I'm running the test and getting this message:

> gifsicle@4.0.1 postinstall /webs/wpsabot/wpsabot-test/node_modules/gifsicle
> node lib/install.js

  ✔ gifsicle pre-build test passed successfully

> jpegtran-bin@4.0.0 postinstall /webs/wpsabot/wpsabot-test/node_modules/jpegtran-bin
> node lib/install.js

  ✔ jpegtran pre-build test passed successfully

> optipng-bin@5.1.0 postinstall /webs/wpsabot/wpsabot-test/node_modules/optipng-bin
> node lib/install.js

  ✔ optipng pre-build test passed successfully
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 2833 packages from 1034 contributors in 53.64s

246 packages are looking for funding
  run `npm fund` for details

> WordPress@6.0.0 build /webs/wpsabot/wpsabot-test
> grunt build

package.json has been modified. Installing...
npm WARN @wordpress/postcss-plugins-preset@3.7.0 requires a peer of postcss@^8.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN autoprefixer@10.4.5 requires a peer of postcss@^8.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN airbnb-prop-types@2.16.0 requires a peer of react@^0.14 || ^15.0.0 || ^16.0.0-alpha but none is installed. You must install peer dependencies yourself.
npm WARN cssnano-utils@3.1.0 requires a peer of postcss@^8.2.15 but none is installed. You must install peer dependencies yourself.
npm WARN icss-utils@5.1.0 requires a peer of postcss@^8.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN jest-image-snapshot@3.0.1 requires a peer of jest@>=20 <=25 but none is installed. You must install peer dependencies yourself.
npm WARN postcss-modules-extract-imports@3.0.0 requires a peer of postcss@^8.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN postcss-modules-local-by-default@4.0.0 requires a peer of postcss@^8.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN postcss-modules-scope@3.0.0 requires a peer of postcss@^8.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN postcss-modules-values@4.0.0 requires a peer of postcss@^8.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN postcss-safe-parser@6.0.0 requires a peer of postcss@^8.3.3 but none is installed. You must install peer dependencies yourself.
npm WARN postcss-scss@4.0.4 requires a peer of postcss@^8.3.3 but none is installed. You must install peer dependencies yourself.
npm WARN react-autosize-textarea@7.1.0 requires a peer of react@^0.14.0 || ^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-autosize-textarea@7.1.0 requires a peer of react-dom@^0.14.0 || ^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-dates@17.2.0 requires a peer of react@^0.14 || ^15.5.4 || ^16.1.1 but none is installed. You must install peer dependencies yourself.
npm WARN react-dates@17.2.0 requires a peer of react-dom@^0.14 || ^15.5.4 || ^16.1.1 but none is installed. You must install peer dependencies yourself.
npm WARN react-with-direction@1.4.0 requires a peer of react@^0.14 || ^15 || ^16 but none is installed. You must install peer dependencies yourself.
npm WARN react-with-direction@1.4.0 requires a peer of react-dom@^0.14 || ^15 || ^16 but none is installed. You must install peer dependencies yourself.
npm WARN tsutils@3.21.0 requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

Running "build" task

Running "clean:files" (clean) task
>> 0 paths cleaned.

Running "copy:files" (copy) task
Created 346 directories, copied 2177 files

Running "copy:version" (copy) task
Copied 1 file

Running "clean:js" (clean) task
>> 0 paths cleaned.

Running "clean:webpack-assets" (clean) task
>> 0 paths cleaned.

Running "webpack:prod" (webpack) task
Warning: Not supported Use --force to continue.

Aborted due to warnings.
npm ERR! code ELIFECYCLE
npm ERR! errno 3
npm ERR! WordPress@6.0.0 build: `grunt build`
npm ERR! Exit status 3
npm ERR!
npm ERR! Failed at the WordPress@6.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-04-28T09_06_10_517Z-debug.log
Error: Failed to perform operation.
Environment variables pass checks.
cd '/webs/wpsabot/wpsabot-test' && php ./vendor/phpunit/phpunit/phpunit --dont-report-useless-tests || php phpunit.phar --dont-report-useless-tests
Could not open input file: ./vendor/phpunit/phpunit/phpunit
Could not open input file: phpunit.phar
Error: Failed to perform operation.
Environment variables pass checks.
Getting SVN Revision
Getting SVN message

This is running PHP 7.4 + MariaDB 10.5, and also in my edge version with PHP 8.1 + MariaDB 10.7. Seems related to NPM, but, don't know a lot abuot that.

redscott commented 2 years ago

I've just noticed that I've not been reporting for a little while so started looking and I've found that my scripts are doing the same.

So I've taken the basic bash/php script apart and run each section by hand to see where it was breaking. cleanup.php Runs fine as expected prepare.php

mkdir -p '/home/redit_stuff/data/wpphptest'
git clone --depth=1 https://github.com/WordPress/wordpress-develop.git '/home/redit_stuff/data/wpphptest'
Cloning into '/home/redit_stuff/data/wpphptest'...
remote: Enumerating objects: 4469, done.
remote: Counting objects: 100% (4469/4469), done.
remote: Compressing objects: 100% (3735/3735), done.
remote: Total 4469 (delta 734), reused 2013 (delta 506), pack-reused 0
Receiving objects: 100% (4469/4469), 28.14 MiB | 12.88 MiB/s, done.
Resolving deltas: 100% (734/734), done.
Checking out files: 100% (3977/3977), done.
wget -O '/home/redit_stuff/data/wpphptest/phpunit.phar' https://phar.phpunit.de/phpunit-5.7.phar
--2022-05-12 10:51:10--  https://phar.phpunit.de/phpunit-5.7.phar
Resolving phar.phpunit.de (phar.phpunit.de)... 188.94.27.25
Connecting to phar.phpunit.de (phar.phpunit.de)|188.94.27.25|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://phar.phpunit.de/phpunit-5.7.27.phar [following]
--2022-05-12 10:51:10--  https://phar.phpunit.de/phpunit-5.7.27.phar
Reusing existing connection to phar.phpunit.de:443.
HTTP request sent, awaiting response... 200 OK
Length: 3040466 (2.9M) [application/octet-stream]
Saving to: ‘/home/redit_stuff/data/wpphptest/phpunit.phar’

100%[================================================================================================================================================================================================>] 3,040,466    110KB/s   in 67s

2022-05-12 10:52:18 (44.1 KB/s) - ‘/home/redit_stuff/data/wpphptest/phpunit.phar’ saved [3040466/3040466]

wget -O '/home/redit_stuff/data/wpphptest/tests/phpunit/data/plugins/wordpress-importer.zip' https://downloads.wordpress.org/plugin/wordpress-importer.zip
--2022-05-12 10:52:18--  https://downloads.wordpress.org/plugin/wordpress-importer.zip
Resolving downloads.wordpress.org (downloads.wordpress.org)... 198.143.164.250
Connecting to downloads.wordpress.org (downloads.wordpress.org)|198.143.164.250|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 25228 (25K) [application/octet-stream]
Saving to: ‘/home/redit_stuff/data/wpphptest/tests/phpunit/data/plugins/wordpress-importer.zip’

100%[================================================================================================================================================================================================>] 25,228      --.-K/s   in 0.09s

2022-05-12 10:52:19 (279 KB/s) - ‘/home/redit_stuff/data/wpphptest/tests/phpunit/data/plugins/wordpress-importer.zip’ saved [25228/25228]

cd '/home/redit_stuff/data/wpphptest/tests/phpunit/data/plugins/'; unzip wordpress-importer.zip; rm wordpress-importer.zip
Archive:  wordpress-importer.zip
   creating: wordpress-importer/
  inflating: wordpress-importer/class-wp-import.php
  inflating: wordpress-importer/compat.php
   creating: wordpress-importer/parsers/
  inflating: wordpress-importer/parsers/class-wxr-parser.php
  inflating: wordpress-importer/parsers/class-wxr-parser-regex.php
  inflating: wordpress-importer/parsers/class-wxr-parser-simplexml.php
  inflating: wordpress-importer/parsers/class-wxr-parser-xml.php
  inflating: wordpress-importer/parsers.php
  inflating: wordpress-importer/readme.txt
  inflating: wordpress-importer/wordpress-importer.php
cd '/home/redit_stuff/data/wpphptest'; npm install && grunt build

> puppeteer@9.1.1 install /home/redit_stuff/data/wpphptest/node_modules/puppeteer
> node install.js

Downloading Chromium r869685 - 135.6 Mb [====================] 100% 0.0s
Chromium (869685) downloaded to /home/redit_stuff/data/wpphptest/node_modules/puppeteer/.local-chromium/linux-869685

> core-js@3.22.5 postinstall /home/redit_stuff/data/wpphptest/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js:
> https://opencollective.com/core-js
> https://patreon.com/zloirock
> bitcoin: bc1qlea7544qtsmj2rayg0lthvza9fau63ux0fstcz

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

> core-js-pure@3.21.1 postinstall /home/redit_stuff/data/wpphptest/node_modules/core-js-pure
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js:
> https://opencollective.com/core-js
> https://patreon.com/zloirock
> https://paypal.me/zloirock
> bitcoin: bc1qlea7544qtsmj2rayg0lthvza9fau63ux0fstcz

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

> gifsicle@4.0.1 postinstall /home/redit_stuff/data/wpphptest/node_modules/gifsicle
> node lib/install.js

  ✔ gifsicle pre-build test passed successfully

> jpegtran-bin@4.0.0 postinstall /home/redit_stuff/data/wpphptest/node_modules/jpegtran-bin
> node lib/install.js

  ✔ jpegtran pre-build test passed successfully

> optipng-bin@5.1.0 postinstall /home/redit_stuff/data/wpphptest/node_modules/optipng-bin
> node lib/install.js

  ✔ optipng pre-build test passed successfully
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 2863 packages from 1033 contributors in 329.452s

225 packages are looking for funding
  run `npm fund` for details

package.json has been modified. Installing...
npm WARN @wordpress/postcss-plugins-preset@3.7.0 requires a peer of postcss@^8.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN autoprefixer@10.4.7 requires a peer of postcss@^8.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN airbnb-prop-types@2.16.0 requires a peer of react@^0.14 || ^15.0.0 || ^16.0.0-alpha but none is installed. You must install peer dependencies yourself.
npm WARN cssnano-utils@3.1.0 requires a peer of postcss@^8.2.15 but none is installed. You must install peer dependencies yourself.
npm WARN icss-utils@5.1.0 requires a peer of postcss@^8.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN jest-image-snapshot@3.0.1 requires a peer of jest@>=20 <=25 but none is installed. You must install peer dependencies yourself.
npm WARN postcss-modules-extract-imports@3.0.0 requires a peer of postcss@^8.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN postcss-modules-local-by-default@4.0.0 requires a peer of postcss@^8.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN postcss-modules-scope@3.0.0 requires a peer of postcss@^8.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN postcss-modules-values@4.0.0 requires a peer of postcss@^8.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN postcss-safe-parser@6.0.0 requires a peer of postcss@^8.3.3 but none is installed. You must install peer dependencies yourself.
npm WARN postcss-scss@4.0.4 requires a peer of postcss@^8.3.3 but none is installed. You must install peer dependencies yourself.
npm WARN react-autosize-textarea@7.1.0 requires a peer of react@^0.14.0 || ^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-autosize-textarea@7.1.0 requires a peer of react-dom@^0.14.0 || ^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-dates@17.2.0 requires a peer of react@^0.14 || ^15.5.4 || ^16.1.1 but none is installed. You must install peer dependencies yourself.
npm WARN react-dates@17.2.0 requires a peer of react-dom@^0.14 || ^15.5.4 || ^16.1.1 but none is installed. You must install peer dependencies yourself.
npm WARN react-with-direction@1.4.0 requires a peer of react@^0.14 || ^15 || ^16 but none is installed. You must install peer dependencies yourself.
npm WARN react-with-direction@1.4.0 requires a peer of react-dom@^0.14 || ^15 || ^16 but none is installed. You must install peer dependencies yourself.
npm WARN tsutils@3.21.0 requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

Running "build" task

Running "clean:files" (clean) task
>> 0 paths cleaned.

Running "copy:files" (copy) task
Created 346 directories, copied 2177 files

Running "copy:version" (copy) task
Copied 1 file

Running "clean:js" (clean) task
>> 0 paths cleaned.

Running "clean:webpack-assets" (clean) task
>> 0 paths cleaned.

Running "webpack:prod" (webpack) task
Warning: Not supported Use --force to continue.

Aborted due to warnings.
Error: Failed to perform operation.

test.php

Empty WPT_SSH_CONNECTEnvironment variables pass checks.
No i'm here
cd '/home/redit_stuff/data/wpphptest'; /usr/bin/composer update; php phpunit.phar
Loading composer repositories with package information
Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies (including require-dev)
Package operations: 41 installs, 0 updates, 0 removals
  - Installing squizlabs/php_codesniffer (3.6.0): Downloading (100%)
  - Installing dealerdirect/phpcodesniffer-composer-installer (v0.7.2): Loading from cache
  - Installing wp-coding-standards/wpcs (2.3.0): Loading from cache
  - Installing phpcompatibility/php-compatibility (9.3.5): Loading from cache
  - Installing phpcompatibility/phpcompatibility-paragonie (1.3.1): Loading from cache
  - Installing phpcompatibility/phpcompatibility-wp (2.1.3): Loading from cache
  - Installing sebastian/version (3.0.2): Loading from cache
  - Installing sebastian/resource-operations (3.0.3): Loading from cache
  - Installing sebastian/recursion-context (4.0.4): Loading from cache
  - Installing sebastian/object-reflector (2.0.4): Loading from cache
  - Installing sebastian/object-enumerator (4.0.4): Loading from cache
  - Installing sebastian/global-state (5.0.5): Loading from cache
  - Installing sebastian/exporter (4.0.4): Downloading (100%)
  - Installing sebastian/environment (5.1.4): Loading from cache
  - Installing sebastian/diff (4.0.4): Loading from cache
  - Installing sebastian/comparator (4.0.6): Loading from cache
  - Installing sebastian/code-unit (1.0.8): Loading from cache
  - Installing sebastian/cli-parser (1.0.1): Loading from cache
  - Installing phpunit/php-timer (5.0.3): Loading from cache
  - Installing phpunit/php-text-template (2.0.4): Loading from cache
  - Installing phpunit/php-invoker (3.1.1): Loading from cache
  - Installing phpunit/php-file-iterator (3.0.6): Loading from cache
  - Installing theseer/tokenizer (1.2.1): Loading from cache
  - Installing nikic/php-parser (v4.13.2): Loading from cache
  - Installing sebastian/lines-of-code (1.0.3): Loading from cache
  - Installing sebastian/complexity (2.0.2): Loading from cache
  - Installing sebastian/code-unit-reverse-lookup (2.0.3): Loading from cache
  - Installing phpunit/php-code-coverage (9.2.15): Loading from cache
  - Installing doctrine/instantiator (1.4.1): Loading from cache
  - Installing phpdocumentor/reflection-common (2.2.0): Loading from cache
  - Installing symfony/polyfill-ctype (v1.25.0): Loading from cache
  - Installing webmozart/assert (1.10.0): Loading from cache
  - Installing phpdocumentor/type-resolver (1.6.1): Loading from cache
  - Installing phpdocumentor/reflection-docblock (5.3.0): Downloading (100%)
  - Installing phpspec/prophecy (v1.15.0): Loading from cache
  - Installing phar-io/version (3.2.1): Loading from cache
  - Installing phar-io/manifest (2.0.3): Loading from cache
  - Installing myclabs/deep-copy (1.11.0): Loading from cache
  - Installing sebastian/type (3.0.0): Loading from cache
  - Installing phpunit/phpunit (9.5.20): Loading from cache
  - Installing yoast/phpunit-polyfills (1.0.3): Loading from cache
phpcompatibility/php-compatibility suggests installing roave/security-advisories (dev-master || Helps prevent installing dependencies with known security issues.)
phpcompatibility/phpcompatibility-paragonie suggests installing roave/security-advisories (dev-master || Helps prevent installing dependencies with known security issues.)
phpcompatibility/phpcompatibility-wp suggests installing roave/security-advisories (dev-master || Helps prevent installing dependencies with known security issues.)
sebastian/global-state suggests installing ext-uopz (*)
sebastian/environment suggests installing ext-posix (*)
phpunit/php-code-coverage suggests installing ext-pcov (*)
phpunit/php-code-coverage suggests installing ext-xdebug (*)
phpunit/phpunit suggests installing ext-soap (*)
phpunit/phpunit suggests installing ext-xdebug (*)
Writing lock file
Generating autoload files
26 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
PHP CodeSniffer Config installed_paths set to ../../phpcompatibility/php-compatibility,../../phpcompatibility/phpcompatibility-paragonie,../../phpcompatibility/phpcompatibility-wp,../../wp-coding-standards/wpcs
Error: wp-tests-config.php is missing! Please use wp-tests-config-sample.php to create a config file.
Error: Failed to perform operation.

This is a CentOS 7 box

# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)

Current PHP version

# php -v
PHP 7.4.28 (cli) (built: Feb 21 2022 15:27:05) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with the ionCube PHP Loader + ionCube24 v11.0.1, Copyright (c) 2002-2022, by ionCube Ltd.

I do also have another script that runs the same but just changes the PHP version to 8.1

avatarf commented 2 years ago

I had the same issue (same error and the test hasn't been reporting for some time). Ubuntu 20.04; PHP 7.4; 10.5.15-MariaDB

This server has been running for a while and the nodejs/npm on it had not been updated for a while. After updating nodejs to 16.x and their respective npm version, plus cleaning the node_modules/ solved the problem ✅

Reference code

apt update
apt upgrade
curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs

cd /untitest_folder/
npm cache clean --force
rm -r node_modules/
javiercasares commented 2 years ago

I'm checking and that worked with PHP 7.4, but doesn't work with my PHP 8.1 + MariaDB 10.6 test machine... I'll try to check what's the problema now.

javiercasares commented 2 years ago

I just did some updates on all my test machines, and I think the problem is in the "package-lock.json" from the "wordpress-develop" repo. I did some test with node 16 and 18, and it fails in both.

This is all you can see when running the software:

[*] Reset the WordPress testing tool for hosting.

[*] Launching the WordPress testing tool for hosting.

[+] Detecting changes.

Already up to date.

[+] Preparing test.

Already up to date.

up to date, audited 60 packages in 1s

8 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

[+] Starting test.

Environment variables pass checks.
mkdir -p '/webs/wpsabot/wpsabot-test'
git clone --depth=1 https://github.com/WordPress/wordpress-develop.git '/webs/wpsabot/wpsabot-test'
Cloning into '/webs/wpsabot/wpsabot-test'...
remote: Enumerating objects: 4475, done.
remote: Counting objects: 100% (4475/4475), done.
remote: Compressing objects: 100% (3767/3767), done.
remote: Total 4475 (delta 732), reused 1993 (delta 480), pack-reused 0
Receiving objects: 100% (4475/4475), 28.16 MiB | 21.41 MiB/s, done.
Resolving deltas: 100% (732/732), done.
wget -O '/webs/wpsabot/wpsabot-test/tests/phpunit/data/plugins/wordpress-importer.zip' https://downloads.wordpress.org/plugin/wordpress-importer.zip
--2022-07-04 09:34:52--  https://downloads.wordpress.org/plugin/wordpress-importer.zip
Resolving downloads.wordpress.org (downloads.wordpress.org)... 198.143.164.250
Connecting to downloads.wordpress.org (downloads.wordpress.org)|198.143.164.250|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 25228 (25K) [application/octet-stream]
Saving to: '/webs/wpsabot/wpsabot-test/tests/phpunit/data/plugins/wordpress-importer.zip'

/webs/wpsabot/wpsabot-test/tests/phpunit/data/p 100%[=====================================================================================================>]  24.64K  --.-KB/s    in 0.1s

2022-07-04 09:34:54 (224 KB/s) - '/webs/wpsabot/wpsabot-test/tests/phpunit/data/plugins/wordpress-importer.zip' saved [25228/25228]

cd '/webs/wpsabot/wpsabot-test/tests/phpunit/data/plugins/'; unzip wordpress-importer.zip; rm wordpress-importer.zip
Archive:  wordpress-importer.zip
   creating: wordpress-importer/
  inflating: wordpress-importer/class-wp-import.php
  inflating: wordpress-importer/compat.php
   creating: wordpress-importer/parsers/
  inflating: wordpress-importer/parsers/class-wxr-parser.php
  inflating: wordpress-importer/parsers/class-wxr-parser-regex.php
  inflating: wordpress-importer/parsers/class-wxr-parser-simplexml.php
  inflating: wordpress-importer/parsers/class-wxr-parser-xml.php
  inflating: wordpress-importer/parsers.php
  inflating: wordpress-importer/readme.txt
  inflating: wordpress-importer/wordpress-importer.php
cd '/webs/wpsabot/wpsabot-test'; npm install && npm run build
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm WARN old lockfile prettier: No matching version found for prettier@2.2.1-beta-1.
npm WARN old lockfile     at module.exports (/usr/lib/node_modules/npm/node_modules/npm-pick-manifest/lib/index.js:209:23)
npm WARN old lockfile     at RegistryFetcher.manifest (/usr/lib/node_modules/npm/node_modules/pacote/lib/registry.js:125:22)
npm WARN old lockfile     at async Array.<anonymous> (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:784:9)
npm WARN old lockfile  Could not fetch metadata for prettier@2.2.1-beta-1 prettier: No matching version found for prettier@2.2.1-beta-1.
npm WARN old lockfile     at module.exports (/usr/lib/node_modules/npm/node_modules/npm-pick-manifest/lib/index.js:209:23)
npm WARN old lockfile     at RegistryFetcher.manifest (/usr/lib/node_modules/npm/node_modules/pacote/lib/registry.js:125:22)
npm WARN old lockfile     at async Array.<anonymous> (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:784:9) {
npm WARN old lockfile   code: 'ETARGET',
npm WARN old lockfile   type: 'version',
npm WARN old lockfile   wanted: '2.2.1-beta-1',
npm WARN old lockfile   versions: [
npm WARN old lockfile     '0.0.1',  '0.0.2',  '0.0.3',       '0.0.4',  '0.0.5',
npm WARN old lockfile     '0.0.6',  '0.0.7',  '0.0.8',       '0.0.9',  '0.0.10',
npm WARN old lockfile     '0.11.0', '0.13.1', '0.14.0',      '0.14.1', '0.15.0',
npm WARN old lockfile     '0.16.0', '0.17.0', '0.17.1',      '0.18.0', '0.19.0',
npm WARN old lockfile     '0.20.0', '0.21.0', '0.22.0',      '1.0.0',  '1.0.1',
npm WARN old lockfile     '1.0.2',  '1.1.0',  '1.2.0',       '1.2.1',  '1.2.2',
npm WARN old lockfile     '1.3.0',  '1.3.1',  '1.4.0-beta',  '1.4.0',  '1.4.1',
npm WARN old lockfile     '1.4.2',  '1.4.3',  '1.4.4',       '1.5.0',  '1.5.1',
npm WARN old lockfile     '1.5.2',  '1.5.3',  '1.6.0-beta2', '1.6.0',  '1.6.1',
npm WARN old lockfile     '1.7.0',  '1.7.1',  '1.7.2',       '1.7.3',  '1.7.4',
npm WARN old lockfile     '1.8.0',  '1.8.1',  '1.8.2',       '1.9.0',  '1.9.1',
npm WARN old lockfile     '1.9.2',  '1.10.0', '1.10.1',      '1.10.2', '1.11.0-rc.1',
npm WARN old lockfile     '1.11.0', '1.11.1', '1.12.0',      '1.12.1', '1.13.0',
npm WARN old lockfile     '1.13.1', '1.13.2', '1.13.3',      '1.13.4', '1.13.5',
npm WARN old lockfile     '1.13.6', '1.13.7', '1.14.0',      '1.14.1', '1.14.2',
npm WARN old lockfile     '1.14.3', '1.15.0', '1.15.1',      '1.15.2', '1.15.3',
npm WARN old lockfile     '1.16.0', '1.16.1', '1.16.2',      '1.16.3', '1.16.4',
npm WARN old lockfile     '1.17.0', '1.17.1', '1.18.0',      '1.18.1', '1.18.2',
npm WARN old lockfile     '1.19.0', '1.19.1', '2.0.0',       '2.0.1',  '2.0.2',
npm WARN old lockfile     '2.0.3',  '2.0.4',  '2.0.5',       '2.1.0',  '2.1.1',
npm WARN old lockfile     ... 15 more items
npm WARN old lockfile   ],
npm WARN old lockfile   distTags: { latest: '2.7.1' },
npm WARN old lockfile   defaultTag: 'latest'
npm WARN old lockfile }
npm WARN old lockfile Error: Integrity checksum failed when using sha512: wanted sha512-5GCgdeevIXwR3cW4Qj5XWC5MO1iSCz8+IPn0mMw6awAt/PBiey8yyO7MhePRsaMqghJAhg6Q3QLYWSnUHWkG6A== but got sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg==.
npm WARN old lockfile     at RegistryFetcher.manifest (/usr/lib/node_modules/npm/node_modules/pacote/lib/registry.js:152:35)
npm WARN old lockfile     at async Array.<anonymous> (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:784:9)
npm WARN old lockfile  Could not fetch metadata for prettier@2.0.5 Error: Integrity checksum failed when using sha512: wanted sha512-5GCgdeevIXwR3cW4Qj5XWC5MO1iSCz8+IPn0mMw6awAt/PBiey8yyO7MhePRsaMqghJAhg6Q3QLYWSnUHWkG6A== but got sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg==.
npm WARN old lockfile     at RegistryFetcher.manifest (/usr/lib/node_modules/npm/node_modules/pacote/lib/registry.js:152:35)
npm WARN old lockfile     at async Array.<anonymous> (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:784:9) {
npm WARN old lockfile   code: 'EINTEGRITY'
npm WARN old lockfile }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@es-joy/jsdoccomment@0.20.1',
npm WARN EBADENGINE   required: { node: '^12 || ^14 || ^16 || ^17' },
npm WARN EBADENGINE   current: { node: 'v18.4.0', npm: '8.12.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'eslint-plugin-jsdoc@37.9.7',
npm WARN EBADENGINE   required: { node: '^12 || ^14 || ^16 || ^17' },
npm WARN EBADENGINE   current: { node: 'v18.4.0', npm: '8.12.1' }
npm WARN EBADENGINE }
npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated source-map-url@0.4.0: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated puppeteer@9.1.1: Version no longer supported. Upgrade to @latest
npm WARN deprecated core-js-pure@3.21.1: core-js-pure@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js-pure.
npm WARN deprecated core-js@3.22.5: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.

added 2860 packages, and audited 2861 packages in 4m

244 packages are looking for funding
  run `npm fund` for details

38 vulnerabilities (3 low, 20 moderate, 15 high)

To address issues that do not require attention, run:
  npm audit fix

To address all issues possible (including breaking changes), run:
  npm audit fix --force

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.

> WordPress@6.1.0 build
> grunt build

package.json has been modified. Installing...
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: airbnb-prop-types@2.16.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN   react@"17.0.2" from the root project
npm WARN   58 more (@emotion/react, @emotion/styled, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^0.14 || ^15.0.0 || ^16.0.0-alpha" from airbnb-prop-types@2.16.0
npm WARN node_modules/airbnb-prop-types
npm WARN   airbnb-prop-types@"^2.10.0" from react-dates@17.2.0
npm WARN   node_modules/react-dates
npm WARN   2 more (react-outside-click-handler, react-with-direction)
npm WARN
npm WARN Conflicting peer dependency: react@16.14.0
npm WARN node_modules/react
npm WARN   peer react@"^0.14 || ^15.0.0 || ^16.0.0-alpha" from airbnb-prop-types@2.16.0
npm WARN   node_modules/airbnb-prop-types
npm WARN     airbnb-prop-types@"^2.10.0" from react-dates@17.2.0
npm WARN     node_modules/react-dates
npm WARN     2 more (react-outside-click-handler, react-with-direction)
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: jest-image-snapshot@3.0.1
npm ERR! Found: jest@27.5.1
npm ERR! node_modules/jest
npm ERR!   peer jest@">=27" from @wordpress/e2e-test-utils@7.2.1
npm ERR!   node_modules/@wordpress/e2e-test-utils
npm ERR!     dev @wordpress/e2e-test-utils@"7.2.1" from the root project
npm ERR!   peer jest@">=27" from @wordpress/jest-console@5.1.0
npm ERR!   node_modules/@wordpress/jest-console
npm ERR!     @wordpress/jest-console@"^5.1.0" from @wordpress/jest-preset-default@8.2.0
npm ERR!     node_modules/@wordpress/jest-preset-default
npm ERR!       @wordpress/jest-preset-default@"^8.1.2" from @wordpress/scripts@22.4.2
npm ERR!       node_modules/@wordpress/scripts
npm ERR!         dev @wordpress/scripts@"22.4.2" from the root project
npm ERR!   2 more (@wordpress/jest-preset-default, @wordpress/scripts)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer jest@">=20 <=25" from jest-image-snapshot@3.0.1
npm ERR! node_modules/jest-image-snapshot
npm ERR!   dev jest-image-snapshot@"3.0.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: jest@25.5.4
npm ERR! node_modules/jest
npm ERR!   peer jest@">=20 <=25" from jest-image-snapshot@3.0.1
npm ERR!   node_modules/jest-image-snapshot
npm ERR!     dev jest-image-snapshot@"3.0.1" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /root/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-07-04T09_39_06_119Z-debug-0.log
Error: Command failed: npm install
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: airbnb-prop-types@2.16.0
npm WARN Found: react@17.0.2
npm WARN node_modules/react
npm WARN   react@"17.0.2" from the root project
npm WARN   58 more (@emotion/react, @emotion/styled, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^0.14 || ^15.0.0 || ^16.0.0-alpha" from airbnb-prop-types@2.16.0
npm WARN node_modules/airbnb-prop-types
npm WARN   airbnb-prop-types@"^2.10.0" from react-dates@17.2.0
npm WARN   node_modules/react-dates
npm WARN   2 more (react-outside-click-handler, react-with-direction)
npm WARN
npm WARN Conflicting peer dependency: react@16.14.0
npm WARN node_modules/react
npm WARN   peer react@"^0.14 || ^15.0.0 || ^16.0.0-alpha" from airbnb-prop-types@2.16.0
npm WARN   node_modules/airbnb-prop-types
npm WARN     airbnb-prop-types@"^2.10.0" from react-dates@17.2.0
npm WARN     node_modules/react-dates
npm WARN     2 more (react-outside-click-handler, react-with-direction)
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: jest-image-snapshot@3.0.1
npm ERR! Found: jest@27.5.1
npm ERR! node_modules/jest
npm ERR!   peer jest@">=27" from @wordpress/e2e-test-utils@7.2.1
npm ERR!   node_modules/@wordpress/e2e-test-utils
npm ERR!     dev @wordpress/e2e-test-utils@"7.2.1" from the root project
npm ERR!   peer jest@">=27" from @wordpress/jest-console@5.1.0
npm ERR!   node_modules/@wordpress/jest-console
npm ERR!     @wordpress/jest-console@"^5.1.0" from @wordpress/jest-preset-default@8.2.0
npm ERR!     node_modules/@wordpress/jest-preset-default
npm ERR!       @wordpress/jest-preset-default@"^8.1.2" from @wordpress/scripts@22.4.2
npm ERR!       node_modules/@wordpress/scripts
npm ERR!         dev @wordpress/scripts@"22.4.2" from the root project
npm ERR!   2 more (@wordpress/jest-preset-default, @wordpress/scripts)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer jest@">=20 <=25" from jest-image-snapshot@3.0.1
npm ERR! node_modules/jest-image-snapshot
npm ERR!   dev jest-image-snapshot@"3.0.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: jest@25.5.4
npm ERR! node_modules/jest
npm ERR!   peer jest@">=20 <=25" from jest-image-snapshot@3.0.1
npm ERR!   node_modules/jest-image-snapshot
npm ERR!     dev jest-image-snapshot@"3.0.1" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /root/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-07-04T09_39_06_119Z-debug-0.log

    at checkExecSyncError (node:child_process:820:11)
    at execSync (node:child_process:891:15)
    at Object.watchFile [as watchPackage] (/webs/wpsabot/wpsabot-test/node_modules/install-changed/lib/main.js:50:7)
    at module.exports (/webs/wpsabot/wpsabot-test/Gruntfile.js:48:17)
    at loadTask (/webs/wpsabot/wpsabot-test/node_modules/grunt/lib/grunt/task.js:315:10)
    at task.init (/webs/wpsabot/wpsabot-test/node_modules/grunt/lib/grunt/task.js:450:5)
    at grunt.tasks (/webs/wpsabot/wpsabot-test/node_modules/grunt/lib/grunt.js:129:8)
    at Liftoff.<anonymous> (/webs/wpsabot/wpsabot-test/node_modules/grunt/node_modules/grunt-cli/bin/grunt:68:15)
    at Liftoff.execute (/webs/wpsabot/wpsabot-test/node_modules/liftup/index.js:202:12) {
  status: 1,
  signal: null,
  output: [
    null,
    <Buffer >,
    <Buffer 6e 70 6d 20 57 41 52 4e 20 45 52 45 53 4f 4c 56 45 20 6f 76 65 72 72 69 64 69 6e 67 20 70 65 65 72 20 64 65 70 65 6e 64 65 6e 63 79 0a 6e 70 6d 20 57 ... 2721 more bytes>
  ],
  pid: 82318,
  stdout: <Buffer >,
  stderr: <Buffer 6e 70 6d 20 57 41 52 4e 20 45 52 45 53 4f 4c 56 45 20 6f 76 65 72 72 69 64 69 6e 67 20 70 65 65 72 20 64 65 70 65 6e 64 65 6e 63 79 0a 6e 70 6d 20 57 ... 2721 more bytes>
}
Running "build" task

Running "clean:files" (clean) task
>> 0 paths cleaned.

Running "copy:files" (copy) task
Created 346 directories, copied 2177 files

Running "copy:version" (copy) task
Copied 1 file

Running "clean:js" (clean) task
>> 0 paths cleaned.

Running "clean:webpack-assets" (clean) task
>> 0 paths cleaned.

Running "webpack:prod" (webpack) task
Warning: error:0308010C:digital envelope routines::unsupported Use --force to continue.

Aborted due to warnings.
Error: Failed to perform operation.
Environment variables pass checks.
cd '/webs/wpsabot/wpsabot-test' && php ./vendor/phpunit/phpunit/phpunit --dont-report-useless-tests || php phpunit.phar --dont-report-useless-tests
Could not open input file: ./vendor/phpunit/phpunit/phpunit
Could not open input file: phpunit.phar
Error: Failed to perform operation.
Environment variables pass checks.
Getting SVN Revision
Getting SVN message
Copying junit.xml results
rsync -r '/webs/wpsabot/wpsabot-test'/tests/phpunit/build/logs/* '/webs/wpsabot/wpsabot-test'
rsync: [sender] change_dir "/webs/wpsabot/wpsabot-test/tests/phpunit/build/logs" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1333) [sender=3.2.3]
Error: Failed to perform operation.
cat: /webs/wpsabot/wpsabot-test/env.json: No such file or directory
Environment variables pass checks.
rm -rf '/webs/wpsabot/wpsabot-test/.git'
rm -rf '/webs/wpsabot/wpsabot-test/node_modules/.cache'
rm -r '/webs/wpsabot/wpsabot-test'

[*] The End.

Some lines that concerns me:

cd '/webs/wpsabot/wpsabot-test'; npm install && npm run build
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.

This looks like the package-lock.json has been generated with an old node version (maybe 14)

There are some lines about "older" Node versions... Is there any place when we have any documentation of the requirements needed for this tests? Maybe needs to be here: https://make.wordpress.org/hosting/handbook/tests/#requirements

ironprogrammer commented 2 years ago

Since Trac 54502, this discrepancy has been clarified somewhat by pinning .nvmrc to Node 14. This pinned Node version follows that of Gutenberg.

Given this requirement, does it mitigate the errors encountered with the test runner?

javiercasares commented 2 years ago

Yes! Seems that's it… I just reinstall everything with NodeJS 14.x, and it worked.

Now I need to do some other changes :D because the MariaDB 10.6 doesn't work yet full.

pfefferle commented 2 years ago

@javiercasares can/should we add something to the test env to ensure it uses node 14?

javiercasares commented 2 years ago

I just updated the https://github.com/WordPress/hosting-handbook/blob/master/tests.md

Yes, maybe we should show something inside the software to inform that you need that requirement.

ironprogrammer commented 2 years ago

@javiercasares and @pfefferle: Please see the above PR (#175), which sets Travis to use Node 14 🙌🏻

🙏🏻 I would appreciate any help testing that the update works as expected.