"Cannot read toLowerCase of undefined" error in the designer



  • I'm getting this error every 10-15 minutes and have to refresh the browser. This is locally installed jsreport, no errors in the log


  • administrators

    can you show full screenshoot or full stack trace of the error? in what version of jsreport do you have this error? do you have this error while doing nothing? or when you are running templates?



  • There is no stack trace, the error happens intermittently when try to run the report in the designer.


  • administrators

    so the error shows in a modal window, right? which recipe and engine your template is using? and in what version of jsreport do you have this error? are you using normal jsreport installation or have you installed additional extensions?



  • It is 1.10 version of the jsreport and the only thing I have installed is wkhtmltopdf which is used for the rendering. Yes the modal dialog that for some reason I cannot even close. The templating is jsrender but it was happening with handlebars as well.


  • administrators

    ok, thanks, i will try to reproduce the error later



  • it happens only when I'm in the designer for some time, no pattern as to what actions may cause it, unfortunately



  • It could help us if you click F12 in chrome and print us the error message with stack trace.



  • Will do when I get it next time



  • Here we go

    Uncaught (in promise) TypeError: Cannot read property 'toLowerCase' of undefined
        at client.js?a787fdafa06a54d4e319:36
        at Array.sort (native)
        at client.js?a787fdafa06a54d4e319:36
        at Array.forEach (<anonymous>)
        at Object.t.getReferences (client.js?a787fdafa06a54d4e319:36)
        at s.finalMapStateToProps (client.js?a787fdafa06a54d4e319:76)
        at s.computeStateProps (client.js?a787fdafa06a54d4e319:71)
        at s.updateStatePropsIfNeeded (client.js?a787fdafa06a54d4e319:71)
        at l (client.js?a787fdafa06a54d4e319:71)
        at s.handleChange (client.js?a787fdafa06a54d4e319:71)
        at u (client.js?a787fdafa06a54d4e319:35)
        at client.js?a787fdafa06a54d4e319:77
        at client.js?a787fdafa06a54d4e319:71
        at client.js?a787fdafa06a54d4e319:74
        at dispatch (client.js?a787fdafa06a54d4e319:74)
        at client.js?a787fdafa06a54d4e319:77
    


  • I have seen this pop up from time to time as well. However, I'm usually making changes to the template, or maybe even switching branches in version control. A refresh of the page clears it up. Just another data point for you. I can also look at any errors I get and share if it happens.



  • Thank you. The error message pops up because there is an entity without name in the studio state.
    We now make sure there is strong validation for missing entity name because this causes invalid state across the studio web application.
    This will be part of v2.

    Based on your description one possible source of the problem can be the real time socket based synchronization between your file system and the studio.
    You can try to disable it using config.

    {
      ...
      "fs-store": {  "syncModifications": false }
    }

Log in to reply
 

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