Problem/Motivation

Right, so this is fun.

I'm maintaining the Drupal 8 template for Platform.sh, and I've found a regression in the install process that exists in 8.8.1 and 8.8.2; I've confirmed it did not happen in 8.8.0.

Specifically, when running though the installer in 8.8.0, everything completes fine. In 8.8.1 and later, the installer completes fine but then the first page load fails with this familiar error:

InvalidArgumentException: No check has been registered for access_check.permission in Drupal\Core\Access\CheckProvider->loadCheck() (line 97 of core/lib/Drupal/Core/Access/CheckProvider.php).

A second page load sometimes fixes it, sometimes not. (I've not fully determined why.) If not, a cache clear usually resolves it.

I've usually seen this issue in the past when dealing with an alternate cache backend in the installer; e.g., trying to install with Redis already enabled, which fails because the wrong cache gets populated at the last stage of the installer. However, I've confirmed that Redis is NOT enabled at any point in this process.

Looking at the diff from 8.8.0 to 8.8.1, it doesn't seem like there's much going on that would cause this. The only even slightly suspicious bit is this hunk:

diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc
index b6d5c63dd9..55c9e7773b 100644
--- a/core/includes/install.core.inc
+++ b/core/includes/install.core.inc
@@ -425,10 +425,9 @@ function install_begin_request($class_loader, &$install_state) {
   }
   $GLOBALS['conf']['container_service_providers']['InstallerConfigOverride'] = 'Drupal\Core\Installer\ConfigOverride';
 
-  // Only allow dumping the container once the hash salt has been created. Note,
-  // InstallerKernel::createFromRequest() is not used because Settings is
+  // Note, InstallerKernel::createFromRequest() is not used because Settings is
   // already initialized.
-  $kernel = new InstallerKernel($environment, $class_loader, (bool) Settings::get('hash_salt', FALSE));
+  $kernel = new InstallerKernel($environment, $class_loader, FALSE);
   $kernel::bootEnvironment();
   $kernel->setSitePath($site_path);
   $kernel->boot();

But I tried rolling that back manually and it didn't fix it.

Proposed resolution

I've no idea, but right now 8.8.1 and later cannot install cleanly on Platform.sh. They're fine after the install but I don't know what the root cause is. It definitely started with the 8.8.1 update; the diff in our template where it began is here: https://github.com/platformsh-templates/drupal8/commit/87866082abd1b0d1a...

And as you can see nothing changed other than the pinned composer versions of core, zip, and tar.

Update: Possibly related to this SA? What was the patch for that, specifically?

Comments

Crell created an issue. See original summary.

Crell’s picture

Issue summary: View changes
kim.pepper’s picture

longwave’s picture

Are you installing on HTTP or HTTPS? There are similar symptoms (8.8.1 broken installer vs 8.8.0 working) and some reports of the same exception in #3103529: Drupal 8.8.1+ and 9 can fail to install in the web browser due to cache pollution

Crell’s picture

After some further experimentation, I'm able to fix the installer by reverting the first two hunks in the SA patch Kim linked to above: The part in install.core.inc and the part in InstallerKernel.php. Just one or the other doesn't fix it, it seems to need to be both.

Why that's the case, I have no idea, but that seems to be the workaround. Whether that also reverts the SA fix, I could not say.

longwave: I'm installing over HTTPS. I just tried to install over HTTP without reverting anything and it still failed the same way.

longwave’s picture

This is basically the same result @greg.1.anderson found in #3103529-29: Drupal 8.8.1+ and 9 can fail to install in the web browser due to cache pollution, so there is definitely something up with that change to the installer...

mcdruid’s picture

Crell’s picture

Status: Active » Closed (duplicate)