Skip to content

bin/magento, including setup:install, fails while the database is empty: six bundled commands read store configuration in their constructors #446

Backlog

Description

@DavidLambauer

Preconditions and environment

  • Mage-OS 4.0.0, developer mode
  • app/etc/env.php from an earlier installation and an empty database, for example when you reinstall into a new database

Steps to reproduce

  1. Point app/etc/env.php at an empty database (or empty the database).
  2. Run bin/magento setup:install ..., or any other command such as bin/magento cache:status.

Expected result

setup:install installs into the empty database, as it does when there's no env.php.

Actual result

Every command, setup:install included, fails with:

Exception during console commands initialization: The store that was requested wasn't found. Verify the store and try again.

As soon as env.php contains an installation date, bin/magento creates the console commands of all enabled modules when it starts. These bundled commands read store configuration while they're created (through Magento\Framework\Locale\Resolver and similar dependencies), which fails while there's no store data:

  • Aligent\Pci4Compatibility\Console\DisableInactiveAccounts (aligent/magento2-pci-4-compatibility)
  • MageOS\AiBase\Console\Command\UsageReport (mage-os/module-ai-base)
  • MageOS\AutomaticTranslation\Console\Command\TranslateProducts (mage-os/module-automatic-translation)
  • MageOS\PageBuilderTemplateImportExport\Console\Command\UpdateRemoteTemplateList (mage-os/module-page-builder-template-import-export)
  • MageOS\ShoppingFeed\Console\Command\ScheduleCommand (mage-os/module-shopping-feed)
  • MagoAssistant\Mago\Console\Command\IndexDocs (mago-assistant/magento2-mago)

In default and production mode, Magento\Framework\Console\Cli logs the error and runs without the module commands instead.

Additional information

Triage and priority

  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.

Activity

  1. rhoerr commented on Dec 1, 2026

    @rhoerr
    Member

    Ideally we should fix all six of these to also not have this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions