OK, it's working now. I messed the script trying http instead of https and then forgot to restart the server.
It's also working with the default config (without the "allowedModules" line).
Thanks for your fast replies.
I
Posts made by IlyaDiallo
-
RE: Orders sample report fails on local install
-
RE: Orders sample report fails on local install
config file:
{ "extensions": { "authentication": { "cookieSession": { "secret": "<your strong secret here>" }, "admin": { "username": "admin", "password": "password" }, "enabled": false }, "scripts": { "timeout": 40000, "strategy": "http-server", "allowedModules": ["http","https"] }, "sample-template": { "createSamples": true } }, "httpPort": 5488, "store": { "provider": "fs" }, "blobStorage": { "provider": "fs" }, "logger": { "console": { "transport": "console", "level": "debug" }, "file": { "transport": "file", "level": "info", "filename": "logs/reporter.log" }, "error": { "transport": "file", "level": "error", "filename": "logs/error.log" } }, "allowLocalFilesAccess": true, "templatingEngines": { "timeout": 10000, "strategy": "http-server" }, "chrome": { "timeout": 40000 } }
output:
2018-08-15T15:09:20.189Z - info: Initializing jsreport@2.1.1 in development mode using configuration file: jsreport.config.json
-
RE: Orders sample report fails on local install
Thanks for the fix, the JSON error is gone.
However I'm running into another error:Error while executing user script. require of "http" module has been blocked. To be able to require custom modules you need to add to configuration { "allowLocalFilesAccess": true } or enable just specific module using { "extensions": { "scripts": { "allowedModules": ["https"] } }.
"allowLocalFilesAccess" is enabled by default, so shouldn't it be working out of the box ? I've also tried to add "https" option in "allowedModules" in the jsreport.config.json file (and restarting the server), but the error remains.
What am I missing ?
-
Orders sample report fails on local install
Hi,
New user here.
On a fresh local install of the latest (2.1.1) jsreport using download/install instructions, the Orders sample is failing with this error:SyntaxError: Unexpected end of JSON input at JSON.parse (<anonymous>) at Proxy.result.on (evaluate-user-script.js:15:49) at Object.apply (/Users/ilya/dev/waplanner/jsreportapp/node_modules/vm2/lib/contextify.js:87:36) at emitNone (events.js:111:20) at IncomingMessage.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1056:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickDomainCallback (internal/process/next_tick.js:218:9)
The other sample reports are working. It's also working in the playground.
This is both on Mac OS and Linux, Node 8.9.3 and 8.10.0.Any ideas ...?