Problem/Motivation

Not able to uninstall these 2 modules:

1. Rocket Chat Rocket.Chat integration module.
The following reason prevents Rocket Chat from being uninstalled:
Required by: rocket_chat_api, rocket_chat

2. Rocket Chat API API module for Rocketchat.
The following reason prevents Rocket Chat API from being uninstalled:
Required by: rocket_chat_api, rocket_chat

I am on Drupal 8.9.5
Rocket.chat module 2.4
PHP 7.3.19-1

1. Enable all Rocket.chat related modules.
2. start uninstalling them.
3. These 2 modules cannot be uninstalled Rocket Chat API, Rocket.Chat integration module
4. Go to admin/config/rocket_chat
and it gives you error: Drupal\Core\Extension\Exception\UnknownExtensionException: The module rocket_chat_group does not exist. in Drupal\Core\Extension\ModuleHandler->getModule() (line 176 of /var/www/html/xxx/web/core/lib/Drupal/Core/Extension/ModuleHandler.php).

you can get the error away by enabling the uninstalled modules back, but still the main problem remains, how to uninstall.

(Tested also with Drupal 8.8.8)

Comments

jukka792 created an issue. See original summary.

ydahi’s picture

Recently ran into uninstallation issues, including the one posted. Here is how I was able to uninstall, hopefully it works for you as well:

Error 1: Uninstalling Rocket Chat Group Integration
* unable to uninstall due to "Fields pending deletion" despite deleting field.
* drush php-eval 'field_purge_batch(10000);' followed by drush cron deleted the fields
* I was able to uninstall the Group integration submodule

Error 2: Unable to uninstall rocket_chat or rocket_chat_api, as they are dependencies for another.
* I was able to uninstall both without any issues using drush:
* drush pm-uninstall rocket_chat
* reply "yes" when it asked to uninstall both.

khoebeke’s picture

I have the same problem in Drupal 9. I can't uninstall from my module overview desinstall screen. Because "Rocket Chat" and "Rocket Chat API" depend on eachother.

khoebeke’s picture

Hi, I solved this issue:

Go to the module folder of your Rocketchat folder and open the 4 folders in it. Edit there the "********info.yml" files. Remove the dependency's in there.
Then you do a cron and clear cache

After that you can uninstall this module perfectly.

khoebeke’s picture

Assigned: Unassigned » khoebeke
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

kalaiselvann’s picture

@khoebeke
I tried #4 for uninstallation. it is working fine.

digitalfrontiersmedia’s picture

Expecting users to edit the module's yml files doesn't make this bug "fixed". The maintainer must fix the code that is distributed.

The fact that anyone can close an issue but only maintainers can reopen them is kind of stupid. Someone has created a duplicate bug report at #3204762: Cannot be uninstalled. Technically, this one was filed first and has more useful information and should be the issue that is open and that one closed as a duplicate, but there ya go.

sysosmaster’s picture

Version: 8.x-2.4 » 8.x-2.x-dev
Assigned: khoebeke » Unassigned
Priority: Normal » Minor

Fixed in latest Dev and Release.

 Issue #3171320: Not able to uninstall the module
   Reported: jukka792
   Not fixed by: Khoebeke
   Fixed by: sysosmaster
   Honerable mention: DigitalFrontiersMedia
   
   Issue was a cyclical referense between `rocket_chat` module and `rocket_chat_api` module.
    Orginally this was not an issue since the uuninstaller did not check this correctly (which is why I didn't encounter it during Dev).
    Unfortunetly other work has kept me from fixing this sooner.
    I apologise for the inconvenience. (but the easy work around of editing the yml file did not made me feel like it was more critical)
   
 - Sysosmaster