diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc
index 7a9812f..d35d5b5 100644
--- a/core/includes/install.core.inc
+++ b/core/includes/install.core.inc
@@ -489,7 +489,12 @@ function install_begin_request($class_loader, &$install_state) {
 
   // Ensure that the active configuration is empty before installation starts.
   if ($install_state['config_verified'] && empty($task)) {
-    $config = BootstrapConfigStorageFactory::get()->listAll();
+    try {
+      $config = BootstrapConfigStorageFactory::get()->listAll();
+    }
+    catch (\Exception $e) {
+      // If this fails assume there is no active configuration.
+    }
     if (!empty($config)) {
       $task = NULL;
       throw new AlreadyInstalledException($container->get('string_translation'));
diff --git a/core/modules/system/src/Tests/Installer/InstallerExistingConfigDirectoryTest.php b/core/modules/system/src/Tests/Installer/InstallerExistingConfigDirectoryTest.php
new file mode 100644
index 0000000..d83fadf
--- /dev/null
+++ b/core/modules/system/src/Tests/Installer/InstallerExistingConfigDirectoryTest.php
@@ -0,0 +1,34 @@
+<?php
+
+namespace Drupal\system\Tests\Installer;
+
+use Drupal\simpletest\InstallerTestBase;
+
+/**
+ * Tests the installer with an existing settings file with config_directory set
+ * up.
+ *
+ * @group Installer
+ */
+class InstallerExistingConfigDirectoryTest extends InstallerTestBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    $this->settings['config_directories'][CONFIG_SYNC_DIRECTORY] = (object) array(
+      'value' => $this->siteDirectory . '/config',
+      'required' => TRUE,
+    );
+    parent::setUp();
+  }
+
+  /**
+   * Verifies that installation succeeded.
+   */
+  public function testInstaller() {
+    $this->assertUrl('user/1');
+    $this->assertResponse(200);
+  }
+
+}
