Uncaught TypeError: Cannot read property 'setRow' of undefined

  • 1
  • Problem
  • Updated 1 year ago
  • Solved
Receiving the following errors in the console log trying to save a model in javascript snippet. This action/button is executed by the user once a month. And last known successful run was 2 months ago. This has worked fine and tested good in the past. Now we are seeing this error on saving of a model. This is an uncaught error hence does not execute the save callback function and cannot be trapped there. Not sure where to start debugging this issue.

Uncaught TypeError: Cannot read property 'setRow' of undefined    at Object.<anonymous> (https://afl--stageprime--skuid.cs30.visual.force.com/resource/1489097033000/skuid__SkuidJS:8:11363)
    at Function.each (https://afl--stageprime--skuid.cs30.visual.force.com/resource/1481301663000/skuid__JQueryJS:2:14076)
    at Object.j.save.then.aa.each.isBeingSaved (https://afl--stageprime--skuid.cs30.visual.force.com/resource/1489097033000/skuid__SkuidJS:8:10993)
    at Object.<anonymous> (https://afl--stageprime--skuid.cs30.visual.force.com/resource/1481301663000/skuid__JQueryJS:3:7502)
    at j (https://afl--stageprime--skuid.cs30.visual.force.com/resource/1481301663000/skuid__JQueryJS:3:6134)
    at Object.fireWith [as resolveWith] (https://afl--stageprime--skuid.cs30.visual.force.com/resource/1481301663000/skuid__JQueryJS:3:6946)
    at Object.e.(anonymous function) (https://afl--stageprime--skuid.cs30.visual.force.com/resource/1481301663000/skuid__JQueryJS:3:7926)
    at j (https://afl--stageprime--skuid.cs30.visual.force.com/resource/1481301663000/skuid__JQueryJS:3:6134)
    at Object.fireWith [as resolveWith] (https://afl--stageprime--skuid.cs30.visual.force.com/resource/1481301663000/skuid__JQueryJS:3:6946)
    at Object.<anonymous> (https://afl--stageprime--skuid.cs30.visual.force.com/resource/1481301663000/skuid__JQueryJS:3:7627)
Photo of Jayesh Bhatnagar

Jayesh Bhatnagar

  • 476 Points 250 badge 2x thumb
  • confused, frustrated

Posted 2 years ago

  • 1
Photo of Stephen Sells

Stephen Sells, Official Rep

  • 16,856 Points 10k badge 2x thumb
A few questions:

Can you share your javascript?

What version of skuid are you on?

Have you upgraded skuid since the last time it successfully worked?
Photo of Jayesh Bhatnagar

Jayesh Bhatnagar

  • 476 Points 250 badge 2x thumb
This error turned out to be an underlying data issue that was causing the save to fail. But I also had to delete and recreate the components to actually get to the real error message.
Photo of Stephen Sells

Stephen Sells, Official Rep

  • 16,856 Points 10k badge 2x thumb
Glad it is all good to go! If you need anything else, please reach out and ask.
Photo of Andy Shipsides

Andy Shipsides

  • 430 Points 250 badge 2x thumb
For me this was caused by a snippet trying to add a line to a model that had a conflicting condition. I was trying to add a line the did not jive with the conditions set in the model itself. Hope that's helpful for someone else.