Error during rendering report

15 views
Skip to first unread message

son...@gmail.com

unread,
Mar 15, 2017, 8:59:49 PM3/15/17
to jsreport
Hi,

I'm getting an error when trying to render reports. I'm not sure where the problem is. Was working last week but now I'm getting this error message.

findDataItem(...).then is not a function
TypeError: findDataItem(...).then is not a function at Data.handleBeforeRender (/usr/src/app/node_modules/jsreport-data/lib/data.js:89:25) at /usr/src/app/node_modules/listener-collection/lib/listenerCollection.js:172:41 at /usr/src/app/node_modules/listener-collection/lib/listenerCollection.js:151:24 at _fulfilled (/usr/src/app/node_modules/listener-collection/node_modules/q/q.js:794:54) at self.promiseDispatch.done (/usr/src/app/node_modules/listener-collection/node_modules/q/q.js:823:30) at Promise.promise.promiseDispatch (/usr/src/app/node_modules/listener-collection/node_modules/q/q.js:756:13) at /usr/src/app/node_modules/listener-collection/node_modules/q/q.js:564:44 at flush (/usr/src/app/node_modules/listener-collection/node_modules/q/q.js:110:17) at _combinedTickCallback (internal/process/next_tick.js:67:7) at process._tickDomainCallback (internal/process/next_tick.js:122:9)

+0Starting rendering request 119
+5Rendering template {shortid:ZkttHYqKxl, recipe:html-with-browser-client,engine:jsrender}

Jan Blaha

unread,
Mar 16, 2017, 3:15:13 AM3/16/17
to jsreport, son...@gmail.com
Hi, I'm assuming you are reporting problem with jsreportonline from the message.

It seems that the server is receiving rendering request in format { template: { dataJson: ??, .... } }
The dataJson property inside template is not valid. I believe there was a back compatibility hack in this which was removed a week ago.
In every case, you should send data as separate property in request like
{ template: {...}, data { propA: ... } }

I was checking your current templates and didn't find any occurrence of such case. Nor didn't find such call in our code.
Maybe you've fixed your templates in the meantime?

Please feel free to reach me on skype @pofider if this is the production issue so we can faster find the problem.
Reply all
Reply to author
Forward
0 new messages