Hi all,
so here we were, using the free jsreport local version embedded in our application. For a time it worked great.
Until we went on our test environment which ran multiple instances of our application.
We first got an exception that told us that the executable was not a valid executable for this OS.
A bit of a surprise to us because it was working for another instance on our test server.
After discovering jsreport had an http port, we configured each instance to have it's own port.
Now the exception about the OS was gone, but a new exception was logged.
This time jsreport logged that there was something undefined in the model en that we could not forEach on an undefined object. Made sense at first, until we verified what was send as request model data to jsreport.
This was all correct, so we could not figure out why it gave us this exception. It worked locally.
Then we discovered jsreport copies itself to a windows temp directory.
So we gave every instance it's own temp directory, and now the forEach problem went away.
Then finally we had again a new exception. This time it complained about a file being in use from C:windows\temp\jsreport\chrome something.
Now we don't know what to do about this, cause we already configured the temp folder to be in our applications folder\temp
We see the files being created there, but why also still files in windows\temp is what we don't understand.
Is there a way to configure the temp folder for chrome?
We deleted the windows/temp/jsreport directory and now we can render the template again.
Also, we noticed that when jsreport goes into trial mode, and we bring back the number of templates to five, the forEach error returned. If we begin with an empty temp dir, and also stay on the five templates, then it works again.
We now have the yearly enterprise license, and we hope anyone could shed some light on the chrome temp files and why they are not being put in our configured temp folder?
Exception :
One or more errors occurred. ---> jsreport.Local.JsReportBinaryException: Error rendering report: A critical error occurred while trying to execute the render command: An error occurred while trying to start daemonized process: An error has occurred when trying to initialize jsreport (2). ENOENT: no such file or directory, stat 'C:\work\jsreport\jsreport\node_modules' (1). caused by error (2) -> meta = {"code":"ENOENT"}, stack = Error: at instance.init.then.catch ([eval]:71911:29) at tryCatcher (jsreportRuntime.js:44358:23) at Promise._settlePromiseFromHandler (jsreportRuntime.js:42379:31) at Promise._settlePromise (jsreportRuntime.js:42436:18) at Promise._settlePromise0 (jsreportRuntime.js:42481:10) at Promise._settlePromises (jsreportRuntime.js:42557:18) at _drainQueueStep (jsreportRuntime.js:39272:12) at _drainQueue (jsreportRuntime.js:39265:9) at Async._drainQueues (jsreportRuntime.js:39281:5) at Immediate.Async.drainQueues (jsreportRuntime.js:39151:14) at runCallback (timers.js:794:20) at tryOnImmediate (timers.js:752:5) at processImmediate [as _immediateCallback] (timers.js:729:5)caused by error (1) -> meta = {"cause":{"errno":-4058,"code":"ENOENT","syscall":"stat","path":"C:\work\jsreport\jsreport\node_modules"},"isOperational":true,"errno":-4058,"code":"ENOENT","syscall":"stat","path":"C:\work\jsreport\jsreport\node_modules"}, stack = Error: (1). caused by error (1) -> meta = {"code":"ENOENT"}, stack = Error: at exports.NsSocket.socket.dataOnce ([eval]:72301:25) at exports.NsSocket.listener ([eval]:19019:10) at exports.NsSocket.EventEmitter.emit ([eval]:19107:22) at exports.NsSocket._onData ([eval]:91412:8) at Lazy.<anonymous> ([eval]:73008:13) at Lazy.<anonymous> ([eval]:72990:19) at emitTwo (events.js:126:13) at Lazy.emit (events.js:214:7) at Lazy.<anonymous> ([eval]:72991:22) at emitOne (events.js:116:13) at Lazy.emit (events.js:211:7) at yieldTo ([eval]:73098:18) at Function.<anonymous> ([eval]:73136:27) at Lazy.<anonymous> ([eval]:73104:21) at emitOne (events.js:116:13) at Lazy.emit (events.js:211:7)
at jsreport.Local.Internal.LocalUtilityReportingService.<RenderAsync>d__10.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at Diract.Component.JSReportsLocal.RenderLocalReport.RenderReport(String templateName, String customerName, Object modelData, String country, String language, String company, String shipFrom)
at Diract.Component.JSReportsLocal.LocalJsReportsBusHandler.<Handle>d__4.MoveNext()
---> (Inner Exception #0) jsreport.Local.JsReportBinaryException: Error rendering report: A critical error occurred while trying to execute the render command: An error occurred while trying to start daemonized process: An error has occurred when trying to initialize jsreport (2). ENOENT: no such file or directory, stat 'C:\work\jsreport\jsreport\node_modules' (1). caused by error (2) -> meta = {"code":"ENOENT"}, stack = Error: at instance.init.then.catch ([eval]:71911:29) at tryCatcher (jsreportRuntime.js:44358:23) at Promise._settlePromiseFromHandler (jsreportRuntime.js:42379:31) at Promise._settlePromise (jsreportRuntime.js:42436:18) at Promise._settlePromise0 (jsreportRuntime.js:42481:10) at Promise._settlePromises (jsreportRuntime.js:42557:18) at _drainQueueStep (jsreportRuntime.js:39272:12) at _drainQueue (jsreportRuntime.js:39265:9) at Async._drainQueues (jsreportRuntime.js:39281:5) at Immediate.Async.drainQueues (jsreportRuntime.js:39151:14) at runCallback (timers.js:794:20) at tryOnImmediate (timers.js:752:5) at processImmediate [as _immediateCallback] (timers.js:729:5)caused by error (1) -> meta = {"cause":{"errno":-4058,"code":"ENOENT","syscall":"stat","path":"C:\work\jsreport\jsreport\node_modules"},"isOperational":true,"errno":-4058,"code":"ENOENT","syscall":"stat","path":"C:\work\jsreport\jsreport\node_modules"}, stack = Error: (1). caused by error (1) -> meta = {"code":"ENOENT"}, stack = Error: at exports.NsSocket.socket.dataOnce ([eval]:72301:25) at exports.NsSocket.listener ([eval]:19019:10) at exports.NsSocket.EventEmitter.emit ([eval]:19107:22) at exports.NsSocket._onData ([eval]:91412:8) at Lazy.<anonymous> ([eval]:73008:13) at Lazy.<anonymous> ([eval]:72990:19) at emitTwo (events.js:126:13) at Lazy.emit (events.js:214:7) at Lazy.<anonymous> ([eval]:72991:22) at emitOne (events.js:116:13) at Lazy.emit (events.js:211:7) at yieldTo ([eval]:73098:18) at Function.<anonymous> ([eval]:73136:27) at Lazy.<anonymous> ([eval]:73104:21) at emitOne (events.js:116:13) at Lazy.emit (events.js:211:7)
at jsreport.Local.Internal.LocalUtilityReportingService.<RenderAsync>d__10.MoveNext()<---
Cheers, and best regards,
Casper Blokzijl
Diract-IT