This looks like issue MDL-70535. This hasn't been fixed yet but there is a proposed patch for Moodle 3.10 you could try.
Installing and upgrading help
SyntaxError: Unexpected end of JSON input
This discussion has been locked so you can no longer reply to it.