none
html SyntaxError

All replies


  • The application could not be loaded. Please try refreshing the page. Failed to load model: failed to parse the model JSON string. Failure reason: syntax error.


    Hi,

    Cleaning and rebuilding your current Project (Right-click > Clean, Right-click Rebuild respective) and see if that makes any difference at all. 

    At the same time it's also recommended to update new HTML client version, and check whether it makes sense.

    Regards


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, July 16, 2014 7:33 AM
    Moderator
  • Tried all that still same problem.

    JAYFISCHBOY

    Thursday, July 17, 2014 5:39 AM
  • Tried all that still same problem I'm REALY lost

    JAYFISCHBOY

    Thursday, July 17, 2014 5:40 AM
  • HI,

    For this issue, sometimes when you build or deploy your project in Visual Studio, the output will say that there are errors, but there doesn’t appear to be any apparent errors in the output it gives you.  It’s times like this that you need to turn the build output up to 11. 

    In the Options window, find Projects and Solutions >> Build and Run. Find Diagnostic in the drop-down for MSBuild project build output verbosity.

    Hope it helps.

    Regards


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Monday, July 21, 2014 8:11 AM
    Moderator
  • I have the same problem or at least the same error message

    "The application could not be loaded. Please try refreshing the page.
    Failed to load model: failed to parse the model JSON string. Failure reason: syntax error. "

    I am using Visual Studio 2013 professional with an existing desktop application attempting to add HTML client to this app.

    I am using JavaScript.runtime of 2.0.0.0 as the updated version 2.5 causes additional errors and cannot find msls. Could this be another clue? Do you need the newget packages we have installed?

              when running JavaScript runtime 2.5 Unhandled exception at line 3, column 1 in
              http://localhost:49219/HTMLClient/Scripts/Generated/data.js 
              0x800a1391 - JavaScript runtime error: 'msls' is undefined

    Any assistance with this would be very helpful.

    Cliff


    Thursday, July 24, 2014 12:01 AM
  • Yea. Tried all these stuff. Ain't working. I'm totally stuck.

    JAYFISCHBOY

    Tuesday, July 29, 2014 2:13 AM
  • JAYFISCHBOY

    Have you had any luck figuring this out? I am totally frustrated with this also.

    LS is great but when you get stuck with problems like this it brings your operation to a total standstill.

    HELP HELP smart lightswitch people.........

    Cliff

    Saturday, August 09, 2014 6:36 PM
  • Hello,

    I have exactly the same problem! Did you find any solution?

    Keysen

    Thursday, October 23, 2014 4:08 AM
  • Hello,

    I have exactly the same problem! Did you find any solution?

    Keysen

    Thursday, October 23, 2014 4:10 AM
  • Not sure about the OP's problem, but Cliff's issue 'cannot find msls' after installing nuget update can be fixed by updating default.htm to reference the new version of scripts and css files.

    See this:

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/fece95b5-293c-47a2-81e5-523119e8fe3f/microsoftlightswitchclientjavascriptruntime-252-released?forum=lightswitch

    HTH,

    Josh

    Thursday, October 23, 2014 1:19 PM
  • I had the same problem on adding the HTML client to a VS 2013 upgraded LS project.

    The model the message refers to is the LS generated application definition file model.json in projectname\projectname\projectname. HTMLClient\GeneratedArtifacts.

    Opening the model.json file in VS 2013 showed a Missing a member value in the "(name) : (value)" object member warning in the Error list – a double click identified the field with its “minimum”:  squiggled as it had no value. The Minimum Value property of the field in the LS table designer showed as blank which normally indicates no minimum value. However, this particular field did once have a minimum value that was subsequently deleted (using the table designer). Looking at the definition of the field in its table lsml file in projectname\projectname\Server\DataSources\ApplicationData showed that, rather than being deleted, the minimum definition had been set as minimum=””. This is interpreted correctly in the desktop client but breaks the HTML client.

    I entered a minimum value for the field in the LS table designer and the HTML client worked as expected.

    I was able to recreate the problem so it still exists as at VS 2013 update 4.
    • Proposed as answer by Keysen Wednesday, January 14, 2015 11:23 PM
    Wednesday, January 07, 2015 4:48 PM
  • Thank you PierreO, your solution solved the problem!

    Keysen

    Wednesday, January 14, 2015 11:22 PM