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

Setup wizard - with plugins #3

Closed
adekbadek opened this issue Mar 19, 2020 · 1 comment
Closed

Setup wizard - with plugins #3

adekbadek opened this issue Mar 19, 2020 · 1 comment

Comments

@adekbadek
Copy link
Member

adekbadek commented Mar 19, 2020

This setup step turns out to be very brittle in e2e environment - plugins (and themes) are frequently not being installed.

E.g. one error that surfaced was this (during jetpack plugin installation):

[17-Mar-2020 16:44:28 UTC] PHP Warning:  Invalid argument supplied for foreach() in /var/www/html/wp-content/plugins/newspack-plugin-ZbCMw1/includes/wizards/class-setup-wizard.php on line 221
[17-Mar-2020 16:46:28 UTC] PHP Warning:  dir(/var/www/html/wp-content/upgrade/jetpack.8.3-JMCGbg/jetpack/_inc/build/photon/): failed to open dir: No such file or directory in /var/www/html/wp-admin/includes/class-wp-filesystem-direct.php on line 571
[17-Mar-2020 16:46:29 UTC] PHP Warning:  dir(/var/www/html/wp-content/upgrade/jetpack.8.3-JMCGbg/jetpack/modules/custom-css/custom-css/css/rtl/): failed to open dir: No such file or directory in /var/www/html/wp-admin/includes/class-wp-filesystem-direct.php on line 571

Another time, the AMP plugin did seem to install, but possibly not completely, and threw this error (on the front-end):

Warning: include(/var/www/html/wp-content/plugins/amp/vendor/composer/../sabberworm/php-css-parser/lib/Sabberworm/CSS/Parsing/ParserState.php): failed to open stream: No such file or directory in /var/www/html/wp-content/plugins/amp/vendor/composer/ClassLoader.php on line 444 Warning: include(): Failed opening '/var/www/html/wp-content/plugins/amp/vendor/composer/../sabberworm/php-css-parser/lib/Sabberworm/CSS/Parsing/ParserState.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/wp-content/plugins/amp/vendor/composer/ClassLoader.php on line 444 Fatal error: Uncaught Error: Class 'Sabberworm\CSS\Parsing\ParserState' not found in /var/www/html/wp-content/plugins/amp/vendor/sabberworm/php-css-parser/lib/Sabberworm/CSS/Parser.php:26 Stack trace: #0 /var/www/html/wp-content/plugins/amp/includes/sanitizers/class-amp-style-sanitizer.php(1599): Sabberworm\CSS\Parser->__construct('img.wp-smiley,\n...', Object(Sabberworm\CSS\Settings)) #1 /var/www/html/wp-content/plugins/amp/includes/sanitizers/class-amp-style-sanitizer.php(1685): AMP_Style_Sanitizer->parse_stylesheet('img.wp-smiley,\n...', Array) #2 /var/www/html/wp-content/plugins/amp/includes/sanitizers/class-amp-style-sanitizer.php(1435): AMP_Style_Sanitizer->prepare_stylesheet('img.wp-smiley,\n...', Array) #3 /var/www/html/wp-content/plugins/amp/includes/sanitizers/class-amp-style-sanitizer.php(1193): AMP_Style_Sanitizer->process_stylesheet('img.wp-smiley,\n...', Array) #4 /var/www/html/wp-content/plugins/amp/includes/sanitizers/class-amp-style-sanitizer.php(853): AMP_Style_Sanitizer->process_style_element(Object(DOM in /var/www/html/wp-content/plugins/amp/vendor/sabberworm/php-css-parser/lib/Sabberworm/CSS/Parser.php on line 26

In one case, the theme did not fully download (or rather extract) - header.php was missing in the theme folder.

adekbadek added a commit to Automattic/newspack-plugin that referenced this issue Mar 19, 2020
Background auto-installation is a nice feature, but in e2e it cretes an undeterministic environment,
since the installation-progress step is not visited
(Automattic/newspack-e2e-tests#3)
adekbadek added a commit to Automattic/newspack-plugin that referenced this issue Mar 24, 2020
… E2E (#489)

- add id to StyleCard, so that it's selectable in e2e tests
- parallelise post creation in starter content wizard
- use URL query param instead of option to achieve deterministic content for e2e
- prevent auto-install in e2e environment

Background auto-installation is a nice feature, but in e2e it cretes an undeterministic environment,
since the installation-progress step is not visited
(Automattic/newspack-e2e-tests#3)

Co-authored-by: Jefferson Rabb <jefferson.rabb@automattic.com>
@adekbadek
Copy link
Member Author

For now the plugins are pre-installed.

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

1 participant