jsReport v2 for .NET Core



  • Hi guys,

    Since jsReport v2 has recently been released, when will jsReport.Binary and and jsReport.Local be updated? Is there a way to update the jsReport version those NuGet packages are using to jsReport v2?

    Thanks!



  • Hi,

    we didn't pack jsreport v2 into nugets yet.
    We will propagate v2 to playground, .net local and jsreportonline in this exact order.
    Please be patient.

    Jan



  • Is this the new version I have been waiting for with regards to my images not appearing? The chrome headers and footers? Or is this something else?

    Where is this announced when released and with notes?

    Sorry if these have been answered.

    Thanks!


  • administrators

    Is this the new version I have been waiting for with regards to my images not appearing? The chrome headers and footers?

    @evildmguy yes, jsreport v2 contains chrome-pdf recipe with native header/footer support and the problem with the images fixed.

    Where is this announced when released and with notes?

    it was announced in the blog in this post



  • Okay, I can't get jsreport v2.0.0 to run. I updated jsreport from 1.10.0 to 2.0.0. I try to start it and it didn't start. I confirm that I have the 2.0.0 version installed.

    When I attempt to start it, I get this:

    PS C:\dev\src\Apps\JsReports> npm start

    jsreport-server@ start C:\dev\src\Apps\JsReports
    node server.js

    2018-05-17T13:09:38.527Z - error: Error occured during reporter init Error: options contain values
    he defined base root schema. schema validation errors: rootOptions.blobStorage should be object
    at Reporter.init (C:\dev\src\Apps\JsReports\node_modules\jsreport-core\lib\reporter.js:106:15)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
    at Function.Module.runMain (module.js:695:11)
    at startup (bootstrap_node.js:191:16)
    at bootstrap_node.js:612:3
    Error: options contain values that does not match the defined base root schema. schema validation
    obStorage should be object
    at Reporter.init (C:\dev\src\Apps\JsReports\node_modules\jsreport-core\lib\reporter.js:106:15)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
    at Function.Module.runMain (module.js:695:11)
    at startup (bootstrap_node.js:191:16)
    at bootstrap_node.js:612:3
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! jsreport-server@ start: node server.js
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the jsreport-server@ start script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

    npm ERR! A complete log of this run can be found in:
    npm ERR! C:\Users\jgoranson\AppData\Roaming\npm-cache_logs\2018-05-17T13_09_38_557Z-debug.log

    And the log file is:

    0 info it worked if it ends with ok
    1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
    1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
    1 verbose cli 'start' ]
    2 info using npm@5.6.0
    3 info using node@v8.11.2
    4 verbose run-script [ 'prestart', 'start', 'poststart' ]
    5 info lifecycle jsreport-server@~prestart: jsreport-server@
    6 info lifecycle jsreport-server@~start: jsreport-server@
    7 verbose lifecycle jsreport-server@~start: unsafe-perm in lifecycle true
    8 verbose lifecycle jsreport-server@~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\dev\src\Apps\JsReports\node_modules.bin;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\ProgramData\chocolatey\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files\dotnet;C:\Program Files\Perforce;C:\Program Files\nodejs;C:\Program Files\Git\cmd;C:\Program Files (x86)\WinMerge;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Users\jgoranson\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Microsoft VS Code\bin;C:\Users\jgoranson\AppData\Roaming\npm;C:\Users\jgoranson\AppData\Local\Programs\Fiddler;C:\Users\jgoranson\AppData\Local\Microsoft\WindowsApps
    9 verbose lifecycle jsreport-server@~start: CWD: C:\dev\src\Apps\JsReports
    10 silly lifecycle jsreport-server@~start: Args: [ '/d /s /c', 'node server.js' ]
    11 silly lifecycle jsreport-server@~start: Returned: code: 1 signal: null
    12 info lifecycle jsreport-server@~start: Failed to exec start script
    13 verbose stack Error: jsreport-server@ start: node server.js
    13 verbose stack Exit status 1
    13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:285:16)
    13 verbose stack at emitTwo (events.js:126:13)
    13 verbose stack at EventEmitter.emit (events.js:214:7)
    13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
    13 verbose stack at emitTwo (events.js:126:13)
    13 verbose stack at ChildProcess.emit (events.js:214:7)
    13 verbose stack at maybeClose (internal/child_process.js:925:16)
    13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
    14 verbose pkgid jsreport-server@
    15 verbose cwd C:\dev\src\Apps\JsReports
    16 verbose Windows_NT 10.0.16299
    17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start"
    18 verbose node v8.11.2
    19 verbose npm v5.6.0
    20 error code ELIFECYCLE
    21 error errno 1
    22 error jsreport-server@ start: node server.js
    22 error Exit status 1
    23 error Failed at the jsreport-server@ start script.
    23 error This is probably not a problem with npm. There is likely additional logging output above.
    24 verbose exit [ 1, true ]

    Any thoughts on this? What else can I do to help you help me?

    Thanks!


  • administrators

    @evildmguy what is jsreport configuration file are you using? can show its content here?


  • administrators

    @evildmguy did you follow the upgrade instructions? there are some steps you need to do in order to have a good migration history, please follow the steps described here https://jsreport.net/learn/v2-breaking-changes



  • Okay, restored, via vcs, back to 1.10.0. Ran jsreport-migration. It didn't work. Here are my results. First, my config file, then the results of an npm start. Finally the log file from the run.

    Thanks for the help!

    jsreport.config.json file:

    {
    "httpPort": 5488,
    "httpsPort": null,
    "logger": {
    "console": {
    "transport": "console",
    "level": "debug"
    },
    "file": {
    "transport": "file",
    "level": "info",
    "filename": "logs/reporter.log",
    "maxsize": 10485760,
    "maxFiles": 5
    },
    "error": {
    "transport": "file",
    "level": "error",
    "filename": "logs/error.log",
    "maxsize": 10485760,
    "maxFiles": 5
    }
    },
    "blobStorage": {
    "provider": "fs"
    },
    "allowLocalFilesAccess": false,
    "store": {
    "provider": "fs"
    },
    "templatingEngines": {
    "allowedModules": "",
    "timeout": 10000,
    "numberOfWorks": 3
    },
    "extensions": {
    "authentication": {
    "enabled": false
    },
    "scripts": {
    "allowedModules": "
    ",
    "timeout": 40000
    },
    "assets": {
    "allowedFiles": ".",
    "searchOnDiskIfNotFoundInStore": true
    }
    }
    }

    npm start results:

    PS C:\dev\src\Apps\JsReports> npm start

    jsreport-server@ start C:\dev\src\Apps\JsReports
    node server.js

    2018-05-17T15:16:12.313Z - info: Initializing jsreport@2.0.0 in development mode using configuration file: jsreport.conf
    ig.json
    2018-05-17T15:16:12.313Z - info: Searching for available extensions in C:\dev\src\Apps\JsReports
    2018-05-17T15:16:12.329Z - info: Extensions location cache C:\Users\JGORAN~1\AppData\Local\Temp\jsreport\core\locations.
    json contains older information, crawling
    2018-05-17T15:16:13.416Z - info: Found 31 extensions
    2018-05-17T15:16:13.416Z - debug: Writing extension locations cache to C:\Users\JGORAN~1\AppData\Local\Temp\jsreport\cor
    e\locations.json
    2018-05-17T15:16:13.436Z - debug: Discovered 31 extensions
    2018-05-17T15:16:13.465Z - info: Setting process based strategy for rendering. Please visit http://jsreport.net/learn/co
    nfiguration for information how to get more performance.
    2018-05-17T15:16:13.465Z - info: Using extension handlebars
    2018-05-17T15:16:13.465Z - info: Using extension import-export
    2018-05-17T15:16:13.610Z - info: Using extension templates
    2018-05-17T15:16:13.610Z - info: Using extension jsrender
    2018-05-17T15:16:13.610Z - debug: Extension authentication is disabled, skipping
    2018-05-17T15:16:13.610Z - info: Using extension freeze
    2018-05-17T15:16:13.610Z - info: Using extension cli
    2018-05-17T15:16:13.610Z - info: Using extension express
    2018-05-17T15:16:13.740Z - info: Using extension debug
    2018-05-17T15:16:13.740Z - info: Using extension tags
    2018-05-17T15:16:13.740Z - info: Using extension data
    2018-05-17T15:16:13.740Z - info: Using extension fs-store
    2018-05-17T15:16:13.900Z - info: Using extension authorization
    2018-05-17T15:16:13.900Z - debug: Extension authorization was disabled
    2018-05-17T15:16:13.916Z - info: Using extension html-to-xlsx
    2018-05-17T15:16:14.077Z - info: html-to-xlsx detected chrome as available html engine
    2018-05-17T15:16:14.077Z - info: Using extension child-templates
    2018-05-17T15:16:14.077Z - info: Using extension browser-client
    2018-05-17T15:16:14.077Z - info: Using extension chrome-pdf
    2018-05-17T15:16:14.077Z - info: Using extension pdf-utils
    2018-05-17T15:16:14.261Z - error: Error when loading extension pdf-utils
    TypeError: Cannot read property 'modules' of undefined
    at Object.module.exports (C:\dev\src\Apps\JsReports\node_modules\jsreport-pdf-utils\lib\main.js:10:26)
    at Object._useOne (C:\dev\src\Apps\JsReports\node_modules\jsreport-core\lib\extensions\extensionsManager.js:154:75)
    at Object._useMany (C:\dev\src\Apps\JsReports\node_modules\jsreport-core\lib\extensions\extensionsManager.js:73:20)
    at <anonymous>
    2018-05-17T15:16:14.261Z - error: Error occured during reporter init Error: Error when loading extension pdf-utils
    TypeError: Cannot read property 'modules' of undefined
    at Object.module.exports (C:\dev\src\Apps\JsReports\node_modules\jsreport-pdf-utils\lib\main.js:10:26)
    at Object._useOne (C:\dev\src\Apps\JsReports\node_modules\jsreport-core\lib\extensions\extensionsManager.js:154:75)
    at Object._useMany (C:\dev\src\Apps\JsReports\node_modules\jsreport-core\lib\extensions\extensionsManager.js:73:20)
    at <anonymous>
    at Object._useOne (C:\dev\src\Apps\JsReports\node_modules\jsreport-core\lib\extensions\extensionsManager.js:163:15)
    at Object._useMany (C:\dev\src\Apps\JsReports\node_modules\jsreport-core\lib\extensions\extensionsManager.js:73:20)
    at <anonymous>
    Error: Error when loading extension pdf-utils
    TypeError: Cannot read property 'modules' of undefined
    at Object.module.exports (C:\dev\src\Apps\JsReports\node_modules\jsreport-pdf-utils\lib\main.js:10:26)
    at Object._useOne (C:\dev\src\Apps\JsReports\node_modules\jsreport-core\lib\extensions\extensionsManager.js:154:75)
    at Object._useMany (C:\dev\src\Apps\JsReports\node_modules\jsreport-core\lib\extensions\extensionsManager.js:73:20)
    at <anonymous>
    at Object._useOne (C:\dev\src\Apps\JsReports\node_modules\jsreport-core\lib\extensions\extensionsManager.js:163:15)
    at Object._useMany (C:\dev\src\Apps\JsReports\node_modules\jsreport-core\lib\extensions\extensionsManager.js:73:20)
    at <anonymous>
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! jsreport-server@ start: node server.js
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the jsreport-server@ start script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

    npm ERR! A complete log of this run can be found in:
    npm ERR! C:\Users\jgoranson\AppData\Roaming\npm-cache_logs\2018-05-17T15_16_14_309Z-debug.log

    log file:

    0 info it worked if it ends with ok
    1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
    1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
    1 verbose cli 'start' ]
    2 info using npm@5.6.0
    3 info using node@v8.11.2
    4 verbose run-script [ 'prestart', 'start', 'poststart' ]
    5 info lifecycle jsreport-server@~prestart: jsreport-server@
    6 info lifecycle jsreport-server@~start: jsreport-server@
    7 verbose lifecycle jsreport-server@~start: unsafe-perm in lifecycle true
    8 verbose lifecycle jsreport-server@~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\dev\src\Apps\JsReports\node_modules.bin;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\ProgramData\chocolatey\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files\dotnet;C:\Program Files\Perforce;C:\Program Files\nodejs;C:\Program Files\Git\cmd;C:\Program Files (x86)\WinMerge;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Users\jgoranson\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Microsoft VS Code\bin;C:\Users\jgoranson\AppData\Roaming\npm;C:\Users\jgoranson\AppData\Local\Programs\Fiddler;C:\Users\jgoranson\AppData\Local\Microsoft\WindowsApps
    9 verbose lifecycle jsreport-server@~start: CWD: C:\dev\src\Apps\JsReports
    10 silly lifecycle jsreport-server@~start: Args: [ '/d /s /c', 'node server.js' ]
    11 silly lifecycle jsreport-server@~start: Returned: code: 1 signal: null
    12 info lifecycle jsreport-server@~start: Failed to exec start script
    13 verbose stack Error: jsreport-server@ start: node server.js
    13 verbose stack Exit status 1
    13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:285:16)
    13 verbose stack at emitTwo (events.js:126:13)
    13 verbose stack at EventEmitter.emit (events.js:214:7)
    13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
    13 verbose stack at emitTwo (events.js:126:13)
    13 verbose stack at ChildProcess.emit (events.js:214:7)
    13 verbose stack at maybeClose (internal/child_process.js:925:16)
    13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
    14 verbose pkgid jsreport-server@
    15 verbose cwd C:\dev\src\Apps\JsReports
    16 verbose Windows_NT 10.0.16299
    17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start"
    18 verbose node v8.11.2
    19 verbose npm v5.6.0
    20 error code ELIFECYCLE
    21 error errno 1
    22 error jsreport-server@ start: node server.js
    22 error Exit status 1
    23 error Failed at the jsreport-server@ start script.
    23 error This is probably not a problem with npm. There is likely additional logging output above.
    24 verbose exit [ 1, true ]


  • administrators

    you have an older version of pdf-utils running in v2, do you have in your project's package.json a reference to pdf-utils? if yes, please remove that dependency, jsreport v2 contains pdf-utils by default and if you have in your package.json a reference to an older version then it will fail. if after doing that you still have problems please show the content of your package.json



  • Okay, went into my package.json, removed reference to pdf-utils, removed node_modules, redid 'npm install' and now I get it to run. Yay. I assume this means I'm migrated over and using 2.0.0.

    Onto the next issue.

    I ran several reports and none work. The debug log is below.

    I also noted that settings were lost. For example, under resources, I had en en-labels for language and my localized setting files. I had to redo those. Is this standard?


    Cannot read property 'debug' of undefined
    logs:
    +0 Starting rendering request 5 (user: null)
    +4 Rendering template { name: FieldTopTen, recipe: chrome-pdf, engine: handlebars, preview: true }
    +5 Adding sample data r1js8K8Nf
    +9 Found 1 applicable resources.
    +11 Executing script shortId
    TypeError: Cannot read property 'debug' of undefined
    at C:\dev\src\Apps\JsReports\node_modules\jsreport-assets\lib\assets.js:69:18
    at tryCatcher (C:\dev\src\Apps\JsReports\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (C:\dev\src\Apps\JsReports\node_modules\bluebird\js\release\promise.js:512:31)
    at Promise._settlePromise (C:\dev\src\Apps\JsReports\node_modules\bluebird\js\release\promise.js:569:18)
    at Promise._settlePromise0 (C:\dev\src\Apps\JsReports\node_modules\bluebird\js\release\promise.js:614:10)
    at Promise._settlePromises (C:\dev\src\Apps\JsReports\node_modules\bluebird\js\release\promise.js:693:18)
    at Promise._fulfill (C:\dev\src\Apps\JsReports\node_modules\bluebird\js\release\promise.js:638:18)
    at C:\dev\src\Apps\JsReports\node_modules\bluebird\js\release\nodeback.js:42:21
    at C:\dev\src\Apps\JsReports\node_modules\async-replace\async-replace.js:73:9
    at C:\dev\src\Apps\JsReports\node_modules\async\lib\async.js:726:13
    at C:\dev\src\Apps\JsReports\node_modules\async\lib\async.js:52:16
    at done (C:\dev\src\Apps\JsReports\node_modules\async\lib\async.js:246:17)
    at C:\dev\src\Apps\JsReports\node_modules\async\lib\async.js:44:16
    at C:\dev\src\Apps\JsReports\node_modules\async\lib\async.js:723:17
    at C:\dev\src\Apps\JsReports\node_modules\async\lib\async.js:167:37
    at C:\dev\src\Apps\JsReports\node_modules\async-replace\async-replace.js:61:21


  • administrators

    i don't think we should keep commenting in this conversation, we are spamming original user that opened this thread which has a problem with .net not something related to your case. so please open an issue here to continue conversation.

    the migration utility is not designed to work in all possible cases, it is hard to make a tool to work in all cases and even more difficult because jsreport v2 has a lot of internal changes, the utility is designed to work on the mainstream normal jsreport installation and according to what you are describing and your previous topics looks like your project was using some custom extensions in v1.10 so it qualifies as not normal jsreport installation, because of that there is a chance that something weird is happening after you run the migration in your project. it will be faster for me if i can take a look at your v1.10 project (before the migration), you can temporary setup a public repository on github and share it with me so i can take a look at your project, if you are not able to share your project in public you can send me a zip file to my email bjrmatos@gmail.com with the source of your jsreport v1.10 (but please make sure to not include in the zip file the node_modules folder because it will increase the zip file size a lot). as i said above, please open an issue in jsreport repository and let's continue the conversation there


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.