A bunch of exceptions jsreport local
-
On our customer environment with only one instance of jsreport we sometimes get:
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'
-
Thanks. We will check that as well.
-
Hi @jan_blaha , is there any news or prognoses to make for the above?
-
We fixed the temp directory bug and now releasing updated .net binaries 2.5.0 where it will be included.
I will ping here when it is uploaded. Then you can just updatejsreport.Local
andjsreport.Binary
nugets.We haven't been able to find out the reason for
ENOENT: no such file or directory, stat 'C:\work\jsreport\jsreport\node_modules' (1).
We are planning some rewrites to make the binary more robust and better handle parallel runs, it should be part of the next 2.6.0 release.
-
Thanks for the quick reply! We are glad there will be some examination of the parallel running. Looking forward to 2.6.0
-
The jsreport.Binary@2.5.0 and jsreport.Local@2.1.0 with TempDirectory fixes are now available in nuget.
-
Hi, we are still getting the ENOENT error:
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]:66283:29) at tryCatcher (jsreportRuntime.js:158306:23) at Promise._settlePromiseFromHandler (jsreportRuntime.js:157998:31) at Promise._settlePromise (jsreportRuntime.js:158055:18) at Promise._settlePromise0 (jsreportRuntime.js:158100:10) at Promise._settlePromises (jsreportRuntime.js:158176:18) at _drainQueueStep (jsreportRuntime.js:39442:12) at _drainQueue (jsreportRuntime.js:39435:9) at Async._drainQueues (jsreportRuntime.js:39451:5) at Immediate.Async.drainQueues (jsreportRuntime.js:39321: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]:66671:25) at exports.NsSocket.listener ([eval]:13402:10) at exports.NsSocket.EventEmitter.emit ([eval]:13490:22) at exports.NsSocket._onData ([eval]:94250:8) at Lazy.<anonymous> ([eval]:74361:13) at Lazy.<anonymous> ([eval]:74343:19) at emitTwo (events.js:126:13) at Lazy.emit (events.js:214:7) at Lazy.<anonymous> ([eval]:74344:22) at emitOne (events.js:116:13) at Lazy.emit (events.js:211:7) at yieldTo ([eval]:74451:18) at Function.<anonymous> ([eval]:74489:27) at Lazy.<anonymous> ([eval]:74457:21) at emitOne (events.js:116:13) at Lazy.emit (events.js:211:7)'
_localReportRenderer = new LocalReporting()
.RunInDirectory(runPath)
.KillRunningJsReportProcesses()
.UseBinary(JsReportBinary.GetBinary())
.Configure(cfg =>
{
cfg.FileSystemStore().BaseUrlAsWorkingDirectory();
cfg.LicenseKey = "12345";
cfg.HttpPort = 8066;
cfg.AllowLocalFilesAccess = true;
cfg.Logger = new LoggerConfiguration { Transport = new LoggerTransportConfiguration { Transport = "file", Filename = "log_jsReport.log", Level = "debug" } };
cfg.Discover = true;
cfg.Chrome = new jsreport.Types.ChromeConfiguration
{
Timeout = 600000
};
return cfg;
})
.AsUtility()
.Create();
-
When configuring as WebServer:
System.Exception: 'Failed to start jsreport server, output: 2019-07-24T09:51:23.666Z - [31merror[39m: Error occured during reporter init Error: ENOENT: no such file or directory, stat 'C:\work\jsreport\jsreport\node_modules'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]:66283:29) at tryCatcher (jsreportRuntime.js:158306:23) at Promise._settlePromiseFromHandler (jsreportRuntime.js:157998:31) at Promise._settlePromise (jsreportRuntime.js:158055:18) at Promise._settlePromise0 (jsreportRuntime.js:158100:10) at Promise._settlePromises (jsreportRuntime.js:158176:18) at _drainQueueStep (jsreportRuntime.js:39442:12) at _drainQueue (jsreportRuntime.js:39435:9) at Async._drainQueues (jsreportRuntime.js:39451:5) at Immediate.Async.drainQueues (jsreportRuntime.js:39321: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: 2019-07-24T09:51:23.658Z - [32minfo[39m: Initializing jsreport@2.5.0 in development mode using configuration file: none2019-07-24T09:51:23.660Z - [32minfo[39m: Searching for available extensions in C:\Code\Cash\Resources'
-
We have the new binary almost ready. It is way faster and also more robust. Stay tuned.
I don't know if it solves this problem because I don't know how to replicate it, but I hope it does.
However, let me know if there are some steps which reproduce this error.
-
It seems you are likely hitting the same issue as just reported here
https://forum.jsreport.net/topic/1178/error-enoent-no-such-file-or-directoryPlease try the mentioned workaround and add to
jsreport.config.json
{ "useExtensionsLocationCache": false}