Search Unity

WebGL not running - syntax error, unexpected identifier

Discussion in 'Web' started by arumiat, Mar 24, 2015.

  1. arumiat

    arumiat

    Joined:
    Apr 26, 2014
    Posts:
    321
    Hi all

    I use streaming for my builds, unfortunately I'm getting these errors, mean anything to anyone?

    screenshot-1.png
     
  2. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    Are you using Application.ExternalCall or ExternalEval? If yes, is the JavaScript used in those calls valid?
     
  3. arumiat

    arumiat

    Joined:
    Apr 26, 2014
    Posts:
    321
    Hi Jonas

    Thanks for your response. Apparently it was due to some custom javascript we're using for Heap analytics integration. Here was his response in case it helps anyone else:

    It was the issue with JS code that I was trying to call, specifically Heap integration. The problem is that it is not possible to call a non-existing JS function in WebGL version because it will cause an error. So I had to create a special wrapper to check if Heap function is defined at all and there was an error in that code.