Unexpected end of JSON input when running a script

Dear all,

I'm experiencing a weird error when running a script(TruClient Protocol,) using controller. it happens randomly at different points within the script whereas when I run it using the "develop script" it runs smoothly. 

for instance it happens often at the beginning when I load .js.file

t=00080746ms: ** Coded line #39: Start executing file \\VM01\TruClient\Start.js [MsgId: MMSG-205180]

t=00080746ms: Error -205177: Step 1: Run Coded script "CodedActions\\Action.js" failed - Runtime error in the script: SyntaxError: Unexpected end of JSON input [MsgId: MERR-205177]


I recently moved to 12.60 and I didn't experienced it with previous version. I've tried several changes but I'm now wondering if it can be the version maybe some patches to install. Do you have any idea?



  • Verified Answer

    Hi CR,

    what browser are you using with TruClient? I think it's a CORS security issue: Chrome and IE Edge support this mechanism, and Firefox security's policies are complex. I suggest you to try IE browser from TruClient, and use JavaScript on your navigation to send a prelight request to the server before forward the original POST message in JSON. 

    Have you tried with IE? If not, I suggest you to put a "Evaluate JS on Object" and declare an HXLHttpRequest() variable, so use setRequestHeader("Content-Type", "application/x-www-form-urlencoded") to force the type for CORS protocol and then use send("XML=prelightMessage") to dispatch it. 


  • Hi Lorenzo,

    I've tried IE browser instead of firefox and it seems the issue has disappeared.

    Thanks for the support