I did some tests this week, and it seems to be working fine /,,, /
Wolfteam
@Wolfteam
Posts made by Wolfteam
-
RE: Resource busy or locked
-
RE: Resource busy or locked
Hiho, with the 2.6.2-beta i get the following exception:
2019-11-22 09:40:28,927 [8] ERROR ReportLogger An unexpected error occurred while trying to generate the invoice report.
jsreport.Local.JsReportBinaryException: Error rendering report: Error: read ECONNRESET at TCP.onStreamRead (internal/stream_base_commons.js:111:27)
at jsreport.Local.Internal.LocalUtilityReportingService.<RenderAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Backend.Util.ReportUtil.<GenerateInvoiceReportAsync>d__6.MoveNext() in C:\Projects\Backend\ReportUtil.cs:line 111Aside from that, im getting weird crashes, that makes the app go down :C
Exception thrown: 'System.UnauthorizedAccessException' in mscorlib.dll -
Error rendering report: undefined
Hi again, i just updated to the lastest 2.6.1 and now im getting this weird error (apart from the ones mentioned Here and Here)
My current setup is the one mentioned in the second link
jsreport.Local.JsReportBinaryException: Error rendering report: undefined
at jsreport.Local.Internal.LocalUtilityReportingService.<RenderAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Administration.ReportUtil.<GenerateInvoiceReportAsync>d__6.MoveNext() in C:\Projects\Administration\Util\ReportUtil.cs:line 111 -
RE: Resource busy or locked
Hiho, im not sure if this helps, but in the render.js file https://github.com/jsreport/jsreport-cli/blob/master/lib/commands/render.js#L211 ?
the retry delay is too low, shouldn't be bigger ? -
Resource busy or locked
Hi, im not sure why this bug happens, but sometimes (heavy load?), i get this error .
And the only way to fix it is to kill the blocked process (chrome.exe) using the Resource MonitorError 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). EBUSY: resource busy or locked, open 'C:\Program Files (x86)\Apps (PROD)\Admin\jsreport\temp\jsreport\compile\jsreport-2.5.0-BymsTkv0E\chrome\chrome.exe' (1). caused by error (2) -> meta = {"code":"EBUSY"}, 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 = {"errno":-4082,"code":"EBUSY","syscall":"open","path":"C:\\Program Files (x86)\\Apps (PROD)\\Admin\\jsreport\\temp\\jsreport\\compile\\jsreport-2.5.0-BymsTkv0E\\chrome\\chrome.exe"}, stack = Error: (1). caused by error (1) -> meta = {"code":"EBUSY"}, 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)
Im using it locally, with the following config:
bool isPortSpecified = int.TryParse(ConfigurationManager.AppSettings["JsReportPort"], out int httport); if (!isPortSpecified) { throw new NullReferenceException("The JsReportPort must be specified in the config file"); } bool isTimeOutSpecified = int.TryParse(ConfigurationManager.AppSettings["JsReportTimeOut"], out int timeOut); if (!isTimeOutSpecified) { throw new NullReferenceException("The JsReportTimeOut must be specified in the config file"); } return new LocalReporting() .UseBinary(JsReportBinary.GetBinary()) .Configure(cfg => { cfg.BaseUrlAsWorkingDirectory().AllowedLocalFilesAccess(); cfg.TempDirectory = Path.Combine(HostingEnvironment.MapPath("~"), "jsreport", "temp"); cfg.Chrome = new ChromeConfiguration { Timeout = timeOut * 1000 }; cfg.HttpPort = httport; return cfg; }) .AsUtility() .Create();
-
RE: .NET The specified executable is not a valid application for this OS platform
Yes, the server is 64 bits.
Yes, node.js is intalled on the serverI was trying to remove Crystal reports dependencies from a project via nuget and when i deploy it it seems that it cannot create the jsreport binary for some reason.
If i deployed it without removing the crystal dependencies everything worked as expected (weird i know...)Anyway, i just manually removed the dependencies and just to be sure, changed the default TempDirectory to point to:
Path.Combine(System.Web.Hosting.HostingEnvironment.MapPath("~"), "jsreport", "temp");
and it seems to be working fineJust for the record:
When render async is called (and you do not specify a TempDirectory in the configuration of the reporting service) it tries to create a jsreport folder inside the Windows/Temp folder (if the apppool identity in iss is the default one) or inside Users/XXXX/AppData/Temp and Windows/Temp (if the apppool identity is not the default one),
this jsreport temp folder contains the binary, so if this problem happens be sure to check the size, it should be ~35mb AND NOT 0kbNote: other reason why this error could happen, is because one of its the depencies is not correctly set in a <dependentAssembly> tag. For example, jsreport.Client v2.0.2 uses System.Net.Http >= 4.3.2. If you have something like:
<dependentAssembly>
<assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
</dependentAssembly>inside your web.config or app.config, this error may arise. So, be sure to check that the dependencies are updated
-
.NET The specified executable is not a valid application for this OS platform
Currently the library works as expected in my development mahcine (Windows 10 64 bits), but tried to move the project to a Windows 2008 R2 and i get : The specified executable is not a valid application for this OS platform
Im using it as a utility in a .net 4.6.1 project
-
.NET Should i use KillAsync() ?
Hi, when i new create an instance of the reporting service as a utility should i
use rs.KillAsync() when im done or does this only applies to as a web server?var rs =new LocalReporting()
.UseBinary(JsReportBinary.GetBinary())
.Configure(cfg => cfg.AllowLocalFilesAccess().BaseUrlAsWorkingDirectory())
.AsUtility()
.Create(); -
[.Net] jsreport rendering issue
Im trying to build a simple report:
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<hr />
<div class="notes">
{{#each notes}}
<p>{{this}}</p>
{{/each}}
</div>
</body>
</html>var content = new StreamReader("Resources/Templates/Invoice/INVOICE_REPORT.html").ReadToEnd(); var report = await rs.RenderAsync(new RenderRequest() { Template = new Template() { Recipe = Recipe.PhantomPdf, Engine = Engine.Handlebars, Content = content }, Data = new { notes = new string[] { "note 1", "note 2"} } });
but it throws this, am i doing something wrong?:
JsReportBinaryException: Error rendering report: rendering has finished with errors:Error: An error occurred while trying to execute the command: at onCriticalError ([eval]:29603:25) at tryCatcher ([eval]:36038:23) at Promise._settlePromiseFromHandler ([eval]:34061:31) at Promise._settlePromise ([eval]:34118:18) at Promise._settlePromise0 ([eval]:34163:10) at Promise._settlePromises ([eval]:34238:18) at Async._drainQueue ([eval]:31008:16) at Async._drainQueues ([eval]:31018:10) at Immediate.Async.drainQueues [as _onImmediate] ([eval]:30892:14) at processImmediate [as _immediateCallback] (timers.js:396:17) {"originalError":{"remoteStack":"TypeError: Cannot use 'in' operator to search for '$ref' in note 1\n at recurse (jsreportRuntime.js:139000:26)\n at recurse (jsreportRuntime.js:139025:22)\n at module.exports (jsreportRuntime.js:139033:5)\n at module.exports (jsreportRuntime.js:124:17)\n at ScriptsManager.execute (jsreportRuntime.js:263763:34)\n at tryCatcher (jsreportRuntime.js:47291:23)\n at ret (eval at <anonymous> (jsreportRuntime.js:45949:12), <anonymous>:13:39)\n at invokeRender (jsreportRuntime.js:138903:88)\n at jsreportRuntime.js:138965:12\n at tryCatcher (jsreportRuntime.js:47291:23)\n at Promise._settlePromiseFromHandler (jsreportRuntime.js:45313:31)\n at Promise._settlePromise (jsreportRuntime.js:45370:18)\n at Promise._settlePromise0 (jsreportRuntime.js:45415:10)\n at Promise._settlePromises (jsreportRuntime.js:45494:18)\n at Promise._fulfill (jsreportRuntime.js:45439:18)\n at Promise._resolveCallback (jsreportRuntime.js:45233:57)\n at Promise._settlePromiseFromHandler (jsreportRuntime.js:45325:17)\n at Promise._settlePromise (jsreportRuntime.js:45370:18)\n at Promise._settlePromise0 (jsreportRuntime.js:45415:10)\n at Promise._settlePromises (jsreportRuntime.js:45494:18)\n at Promise._fulfill (jsreportRuntime.js:45439:18)\n at Promise._resolveCallback (jsreportRuntime.js:45233:57)\n at Promise._settlePromiseFromHandler (jsreportRuntime.js:45325:17)\n at Promise._settlePromise (jsreportRuntime.js:45370:18)\n at Promise._settlePromise0 (jsreportRuntime.js:45415:10)\n at Promise._settlePromises (jsreportRuntime.js:45494:18)\n at Promise._fulfill (jsreportRuntime.js:45439:18)\n at PromiseArray._resolve (jsreportRuntime.js:45704:19)\n at PromiseArray._promiseFulfilled (jsreportRuntime.js:45722:14)\n at Promise._settlePromise (jsreportRuntime.js:45375:26)\n at Promise._settlePromise0 (jsreportRuntime.js:45415:10)\n at Promise._settlePromises (jsreportRuntime.js:45494:18)\n at Async._drainQueue (jsreportRuntime.js:42220:16)\n at Async._drainQueues (jsreportRuntime.js:42230:10)\n at Immediate.Async.drainQueues [as _onImmediate] (jsreportRuntime.js:42104:14)\n at processImmediate [as _immediateCallback] (timers.js:396:17)"}}(Original) Error: Error during rendering report: Cannot use 'in' operator to search for '$ref' in note 1 at [eval]:36644:23 at ConcatStream.<anonymous> ([eval]:42366:43) at emitNone (events.js:72:20) at ConcatStream.emit (events.js:166:7) at finishMaybe ([eval]:4229:14) at afterWrite ([eval]:4115:3) at nextTickCallbackWithManyArgs (node.js:486:18) at process._tickCallback (node.js:384:17) {"remoteStack":"TypeError: Cannot use 'in' operator to search for '$ref' in note 1\n at recurse (jsreportRuntime.js:139000:26)\n at recurse (jsreportRuntime.js:139025:22)\n at module.exports (jsreportRuntime.js:139033:5)\n at module.exports (jsreportRuntime.js:124:17)\n at ScriptsManager.execute (jsreportRuntime.js:263763:34)\n at tryCatcher (jsreportRuntime.js:47291:23)\n at ret (eval at <anonymous> (jsreportRuntime.js:45949:12), <anonymous>:13:39)\n at invokeRender (jsreportRuntime.js:138903:88)\n at jsreportRuntime.js:138965:12\n at tryCatcher (jsreportRuntime.js:47291:23)\n at Promise._settlePromiseFromHandler (jsreportRuntime.js:45313:31)\n at Promise._settlePromise (jsreportRuntime.js:45370:18)\n at Promise._settlePromise0 (jsreportRuntime.js:45415:10)\n at Promise._settlePromises (jsreportRuntime.js:45494:18)\n at Promise._fulfill (jsreportRuntime.js:45439:18)\n at Promise._resolveCallback (jsreportRuntime.js:45233:57)\n at Promise._settlePromiseFromHandler (jsreportRuntime.js:45325:17)\n at Promise._settlePromise (jsreportRuntime.js:45370:18)\n at Promise._settlePromise0 (jsreportRuntime.js:45415:10)\n at Promise._settlePromises (jsreportRuntime.js:45494:18)\n at Promise._fulfill (jsreportRuntime.js:45439:18)\n at Promise._resolveCallback (jsreportRuntime.js:45233:57)\n at Promise._settlePromiseFromHandler (jsreportRuntime.js:45325:17)\n at Promise._settlePromise (jsreportRuntime.js:45370:18)\n at Promise._settlePromise0 (jsreportRuntime.js:45415:10)\n at Promise._settlePromises (jsreportRuntime.js:45494:18)\n at Promise._fulfill (jsreportRuntime.js:45439:18)\n at PromiseArray._resolve (jsreportRuntime.js:45704:19)\n at PromiseArray._promiseFulfilled (jsreportRuntime.js:45722:14)\n at Promise._settlePromise (jsreportRuntime.js:45375:26)\n at Promise._settlePromise0 (jsreportRuntime.js:45415:10)\n at Promise._settlePromises (jsreportRuntime.js:45494:18)\n at Async._drainQueue (jsreportRuntime.js:42220:16)\n at Async._drainQueues (jsreportRuntime.js:42230:10)\n at Immediate.Async.drainQueues [as _onImmediate] (jsreportRuntime.js:42104:14)\n at processImmediate [as _immediateCallback] (timers.js:396:17)"}
Edit 1: Awesome library!
Edit 2: using JsonConvert.SerializeObject is a workaround for the issue