The error is being thrown because Moodle can not find the activity details. I saw you created https://github.com/mdjnelson/moodle-mod_customcert/issues/391. Please put replications steps there. Thanks.
Custom certificate (plugin)
Invalid course module ID
This discussion has been locked so you can no longer reply to it.