Skip to content

An exception while creating "Magento\Setup\Console\Command\ModuleUninstallCommand"; no instance returned #1716

@milanstojanov

Description

@milanstojanov

While trying to install Magento_SampleInterception module (https://github.com/magento/magento2-samples/tree/master/sample-module-interception) with the standard flow:

  1. bin/magento module:enable Magento_SampleInterception
  2. bin/magento setup:upgrade

I got the following exception:

Autoload error: An abstract factory could not create an instance of magentosetupconsolecommandmoduleuninstallcommand(alias: Magento\Setup\Console\Command\ModuleUninstallCommand).

After digging around for a while, I managed to get a bit more friendlier message:

An exception was raised while creating "Magento\Setup\Console\Command\ModuleUninstallCommand"; no instance returned.

However, it's still not very clear how and why it ended up here.

As a temporary workaround, I manually added:

'Magento_SampleInterception' => 1 to etc/config.php
and a new row in setup_module table: Magento_SampleInterception | 2.0.0 | 2.0.0

This did a trick, but an investigation is clearly needed.

P.S. All sample modules are requiring "magento/framework": "~0.74", which should be updated as well.

Thanks,
Milan

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