Error is caused by removing the module roles from the module security, without deselecting the assigned pages.
Tip: before you delete a module role, deselect the assigned pages, microflows and access rules.
Fix: add the module roles, then deselect the assigned pages, microflows and access rules. And remove the module roles. This is quicker then deselecting the non existing roles per page/microflow.