I had a similar error :
a is not a function TypeError: a is not a function at g.retrieveByMicroflow (http://localhost:8080/mxclientsystem/mxui/mxui.js?638797133333297758:59:61883)
I found the user roles with issues did not have access to the DocumentGenerator. I added DocumentGenerator.User for them and it's now working.
Hope that helps!
In which activity (exact) do you getting the error?
Is it after the download action or after completion of the microflow?
I had the exact same error. Giving read access to all attributes of the 'PDF' entity did solve the problem for me. Are your user roles correctly configured?
Does the entity access on the PDF table allow your user (read) access?