jsreport/jsreport-dotnet

Unsupported Strategy Exception

wggley opened this issue · 4 comments

When trying to use one of the Strategies below it's throwing an exception:

#region assembly jsreport.Types, Version=2.7.0.0, Culture=neutral, PublicKeyToken=null
// C:\Users\wggle\.nuget\packages\jsreport.types\2.7.0\lib\netstandard1.6\jsreport.Types.dll
#endregion

namespace jsreport.Types
{
    public enum ChromeStrategy
    {
        DedicatedProcess = 0,
        ChromePool = 1
    }
}

Error rendering report: A critical error occurred while trying to execute the render command (2). An error occurred while trying to start daemonized process: An error has occurred when trying to initialize jsreport (1). caused by error (2):-> stackError: at onCriticalError (D:\snapshot\jsreport\node_modules\jsreport-cli\lib\commands\render.js:302:19) at D:\snapshot\jsreport\node_modules\jsreport-cli\lib\commands\render.js:256:14caused by error (1):-> stackError: An error has occurred when trying to initialize jsreport at Object. (D:\snapshot\jsreport\node_modules\jsreport-cli\lib\keepAliveProcess.js:158:27) at Object.listener (D:\snapshot\jsreport\node_modules\eventemitter2\lib\eventemitter2.js:251:10) at Object.emit (D:\snapshot\jsreport\node_modules\eventemitter2\lib\eventemitter2.js:339:22) at Object._onData (D:\snapshot\jsreport\node_modules\nssocket\lib\nssocket.js:454:8) at Lazy. (D:\snapshot\jsreport\node_modules\lazy\lazy.js:91:13) at Lazy. (D:\snapshot\jsreport\node_modules\lazy\lazy.js:73:19) at Lazy.emit (events.js:210:5) at Lazy. (D:\snapshot\jsreport\node_modules\lazy\lazy.js:74:22) at Lazy.emit (events.js:210:5) at yieldTo (D:\snapshot\jsreport\node_modules\lazy\lazy.js:181:18)Remote Instance Error: Error: at D:\snapshot\jsreport\node_modules\jsreport-cli\lib\instanceHandler.js:31:29Remote Instance Error: Error: Error when loading extension chrome-pdf@1.7.1Error: Unsupported strategy "ChromePool" for chrome-pdf at Object. (D:\snapshot\jsreport\node_modules\jsreport-chrome-pdf\lib\chrome.js:138:11) at Object._useOne (D:\snapshot\jsreport\node_modules\jsreport-core\lib\extensions\extensionsManager.js:191:32) at Object._useMany (D:\snapshot\jsreport\node_modules\jsreport-core\lib\extensions\extensionsManager.js:98:20) at async Reporter.init (D:\snapshot\jsreport\node_modules\jsreport-core\lib\reporter.js:229:7) at async Reporter.exeJsreportInit [as init] (D:\snapshot\jsreport\node_modules\jsreport-compile\lib\runtime\runtimeJsreport.js:95:5) at Object._useOne (D:\snapshot\jsreport\node_modules\jsreport-core\lib\extensions\extensionsManager.js:216:15) at Object._useMany (D:\snapshot\jsreport\node_modules\jsreport-core\lib\extensions\extensionsManager.js:98:20) at async Reporter.init (D:\snapshot\jsreport\node_modules\jsreport-core\lib\reporter.js:229:7) at async Reporter.exeJsreportInit [as init] (D:\snapshot\jsreport\node_modules\jsreport-compile\lib\runtime\runtimeJsreport.js:95:5)'

Are you sure you have jsreport.Types@2.7.0 ? You seem to be missing the attributes in the ChromeStrategy enum. See how it looks disassembled for me

image

I have both attributes and they appears on VS 2019.
But when running it throws the exception related.

Trying to use chrome-pool and i'm having the same error, how do solve this?

Thanks!

I apologize for the delay.
It's fixed now in the nugget package jsreport.Shared@2.3.1, please update.