That ‘non-UTF-8’ message was also reported here, and seems to be related to the character set being used. Could you provide a bit more context around that message, so I know what is throwing it?
It is weird that the number of covariates is reported to be NA, not 0. Could you see if there are any covariates?:
cohortMethodData$covariates