Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jsreport.Local.JsReportBinaryException: #5

Closed
huxaiphaer opened this issue Jul 21, 2019 · 2 comments
Closed

Jsreport.Local.JsReportBinaryException: #5

huxaiphaer opened this issue Jul 21, 2019 · 2 comments

Comments

@huxaiphaer
Copy link

huxaiphaer commented Jul 21, 2019

I have cloned this repository and I tried to run it on mac but I got the following exception, and on top of that I added the IOS NuGet dotnet add package jsreport.Binary.OSX --version 2.5.0 what could be the reason for causing it?

Jsreport.Local.JsReportBinaryException: Error rendering report: 
   at jsreport.Local.Internal.LocalUtilityReportingService.RenderAsync(String requestString, CancellationToken ct)
   at jsreport.AspNetCore.JsReportMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
   at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
@pofider
Copy link
Contributor

pofider commented Jul 22, 2019

Please locate jsreport binary in temp\dotnet\binary-default-2.5.0.0\jsreport.exe and render something in commandline using

jsreport render --template.content=test.html --template.engine=none --template.recipe=chrome-pdf --out=out.pdf

Let me know if that worked.

@huxaiphaer
Copy link
Author

Actually, I made it work by making jsreport know that is using a mac with the following code in the Start.cs file, but thanks a lot for the help :

  services.AddJsReport(new LocalReporting()
                .UseBinary(RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
                    ? JsReportBinary.GetBinary()
                    : jsreport.Binary.OSX.JsReportBinary.GetBinary())
                .AsUtility()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants