Hi M H,
I'm now getting this error too in a similar scenario to yours. Exported a course from Moodle 2.7 and imported it into a fresh Moodle 3.4. Can you elaborate on how you fixed it? What did you have to configure on which server?
I'd really appreciate your help. Thanks in advance.