To manage firewalld on a desktop, I use the module created by Craig Dunn available at https://github.com/crayfishx/puppet-firewalld. Recently, I came across this issue for the second time after restarting puppetserver:

# puppet agent -vt
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Resource Statement, Could not autoload puppet/type/firewalld_rich_rule: /etc/puppetlabs/code/modules/firewalld/lib/puppet_x/firewalld/property/rich_rule_action.rb:10: unknown type of %string
            if value.keys.sort != %i[action type]
                                    ^ at /etc/puppetlabs/code/modules/firewalld/manifests/init.pp:135:7 on node mathtxx
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Previously, the problem seem to disappear after awhile, and because I’ve been occupied with other tasks, I kinda forgot about it.

Last time as well, there had been an issue filed on Github. However, there was no answer then. This time around, blackknight36 provides a suggestion which fixed the issue I had:

It appears that this can be resolved by running the puppet generate command to update the defined types for the environment. For example, the following command should prevent this error from happening.

ssh root@puppet puppet generate types –environment production

To clarify, if you experience that problem, the command should be run on the Puppet server to update the defined types.