During the execution puppet chocolatey provider if unavailable chocolatey repository configuration file is broken. It add some symbols to 1st line, and as result on check next packet in log will appear next error:
Could not evaluate: undefined method `each' for nil:NilClass
if execute choco list -lo in command prompt next error occur:
error deserializing response of type chocolatey.infrastructure.app.configuration.ConfigFileSettings:
Wrong choco config:
https://gist.github.com/bodyakov/65f25171cf3a2b8d1b43a213e1801f8b#file-config_bad