One tempate suddenly stopped working



  • Everything worked fine, until today while rendering one report we noticed and error:

    Error while executing templating engine. y is not defined

    It was pointing to a helpers.js file that is set as "shared among all templates" and contains few handlebars helpers. Nobody has changed anything on the template. The only thing that helped was to delete and re-create the template identical to the previous one. Now it is working again.

    Is there any way to find out what was wrong with the previous template? I can share the template and/or the helpers.js file.


  • administrators

    hi! finding what was wrong in this case will be almost impossible for us, basically because we don't have all the details (logs, how the template looks, jsreport version, etc). you can share the template and helpers but i'm not sure if doing that will be so much helpful, because as you say what you have experienced happened one time and it was something very weird



  • Thanks for the response, I expected you to not have clear answer to that. I also dont think you will be able to see anything wrong with the template/helpers since they are currently running and working fine. The one thing I was hoping for is if you have any logs from JSReport online service since we are not hosting the system ourselves. If not then you can probably close this as I dont think it can be resolved now.
    If it happens next time I will try to create new template and let the faulty template stay in the system so we can investigate it.


  • administrators

    Thanks for the response, I expected you to not have clear answer to that. I also dont think you will be able to see anything wrong with the template/helpers since they are currently running and working fine. The one thing I was hoping for is if you have any logs from JSReport online service since we are not hosting the system ourselves.

    if you are using jsreportonline then that changes the visibility that we have.

    please share some more details about your jsreportonline account

    what is the tenant name of your account? for example in my case i use jsreportonline at bjrmatos.jsreportonline.net, so my tenant name is: bjrmatos

    what is the name of the report that was having the problem?

    what was the time when this error happened? you opened this post like 18 hours ago, was that the same time when the error appeared?

    with this information i will try to check our logs and see if there is something interesting there.



  • Great, my tenant name is: ndtcloud, report name is: irss-v2-direct-reading-dosimeter-verification-v1.
    Error was reported earlier but I can confirm that when I was fixit it happened numerous times in this interval: 2019-03-07 20:30 (UTC) - 2019-03-07 21:30 (UTC).

    Helper file that is shared and might have caused an issue is: handlebars-helpers.js. But all other templates that were using this helper worked fine. The last thing I remember was, that it said that error is at position 1:1 in that helper file, which doesnt make much sense to me.


  • administrators

    thanks for the details!

    i was able to see in logs the error that you were mentioning, however i did not found anything special about it that could help to discover the reason of the issue. my advice, if you ever see this error again, would be that you let the original template as it is and let us know inmediatly so we have something to debug, in that case you can continue with your reports by cloning the template and use that clone instead for your final reports.


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.