Hi, I'm using bootstrap css and the "full docker image", I managed to resolve this issue by adding the following to my page.
<!DOCTYPE html> <html lang="fr"> <head>
And <meta charset="UTF-8">
Thanks for your help
Hi, I'm using bootstrap css and the "full docker image", I managed to resolve this issue by adding the following to my page.
<!DOCTYPE html> <html lang="fr"> <head>
And <meta charset="UTF-8">
Thanks for your help
Hello
I'm trying to display french text with an accent example: Montréal
However, when generating PDF with the chrome-pdf recipe it's showing like so: Montréa`
Any idea on how to fix it?
PS: I'm using jsreport-browser-client-dist
client to generate PDF.
Thanks
Hello
I have an intermittent issue with rendering reports, I'm seeing the following exception when attempting to render a PDF., However, on subsequent attempts, it renders just fine.
I'm using the latest version of jsreport version 2.5.0 docker container + chrome engine.
2019-08-27T01:07:27.380Z - error: Error when processing render request Protocol error (Page.printToPDF): Target closed. Error: Protocol error (Page.printToPDF): Target closed.
at /app/node_modules/puppeteer/lib/Connection.js:183:56
at new Promise (<anonymous>)
at CDPSession.send (/app/node_modules/puppeteer/lib/Connection.js:182:12)
at Page.pdf (/app/node_modules/puppeteer/lib/Page.js:926:39)
at Page.<anonymous> (/app/node_modules/puppeteer/lib/helper.js:111:23)
at /app/node_modules/jsreport-chrome-pdf/lib/conversion.js:164:27
at processTicksAndRejections (internal/process/task_queues.js:89:5)
at async /app/node_modules/jsreport-chrome-pdf/lib/conversion.js:200:22
2019-08-27T01:07:27.381Z - error: Error during processing request at http://35.182.32.163/api/report/3.DAILY%20TRANSACTION%20REPORT
Hello everyone,
I'm using jsreport via docker image, I'm trying to use an external npm package, how can I go about doing that?
npm i accounting
I have tried the following, but it says it can't find npm in the path.
sudo docker exec -it jsreport "npm i -g accounting"
Thanks
@jan_blaha I appreciate your quick response! thanks very much!
I have seen the option to schedule a job via jsreport studio, I haven't been able to find away to schedule them via API call, is this possible? if so an example would be most helpful.
Thanks
@jan_blaha updating the package fixed the problem, thanks very much
Hi @jan_blaha
Thanks for your quick response, sad to say this, but I have literally copied your example to my project, and I'm getting different exception.
W20180726-09:40:04.956(-4)? (STDERR) TypeError: Cannot read property 'body' of undefined
W20180726-09:40:04.957(-4)? (STDERR) at _callee$ (imports/startup/server/accounts/index.js:20:38)
W20180726-09:40:04.957(-4)? (STDERR) at tryCatch (/Users/user/Projects/meteor/project/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:62:40)
W20180726-09:40:04.957(-4)? (STDERR) at Generator.invoke [as _invoke] (/Users/dck/Projects/meteor/project/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:296:22)
W20180726-09:40:04.958(-4)? (STDERR) at Generator.prototype.(anonymous function) [as next] (/Users/dck/Projects/meteor/project/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:114:21)
W20180726-09:40:04.958(-4)? (STDERR) at step (/Users/dck/Projects/meteor/project/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
W20180726-09:40:04.958(-4)? (STDERR) at /Users/user/Projects/meteor/project/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:13
W20180726-09:40:04.958(-4)? (STDERR) at /Users/user/.meteor/packages/promise/.0.10.0.ak8m4i++os+web.browser+web.cordova/npm/node_modules/meteor-promise/fiber_pool.js:43:40
W20180726-09:40:04.958(-4)? (STDERR) /Users/user/Projects/meteor/project/node_modules/jsreport-client/lib/client.js:76
W20180726-09:40:04.959(-4)? (STDERR) cb(null, response)
W20180726-09:40:04.959(-4)? (STDERR) ^
W20180726-09:40:04.959(-4)? (STDERR)
W20180726-09:40:04.959(-4)? (STDERR) TypeError: cb is not a function
W20180726-09:40:04.959(-4)? (STDERR) at Request.<anonymous> (/Users/dck/Projects/meteor/project/node_modules/jsreport-client/lib/client.js:76:5)
W20180726-09:40:04.960(-4)? (STDERR) at emitOne (events.js:116:13)
W20180726-09:40:04.960(-4)? (STDERR) at Request.emit (events.js:211:7)
W20180726-09:40:04.960(-4)? (STDERR) at Request.onRequestResponse (/Users/user/Projects/meteor/project/node_modules/jsreport-client/node_modules/request/request.js:954:10)
W20180726-09:40:04.960(-4)? (STDERR) at emitOne (events.js:116:13)
W20180726-09:40:04.960(-4)? (STDERR) at ClientRequest.emit (events.js:211:7)
W20180726-09:40:04.960(-4)? (STDERR) at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:551:21)
W20180726-09:40:04.960(-4)? (STDERR) at HTTPParser.parserOnHeadersComplete (_http_common.js:117:23)
W20180726-09:40:04.961(-4)? (STDERR) at Socket.socketOnData (_http_client.js:440:20)
W20180726-09:40:04.961(-4)? (STDERR) at emitOne (events.js:116:13)
My last question would be, how can I save buffer response to PDF file?
Thanks
Hey everyone,
Trying to generate PDF on server using jsreport-client to send request to another reporting server, following the example on https://jsreport.net/learn/nodejs-client
JS report version 2.1.1
const client = require("jsreport-client")("http://172.18.18.62");
client.render({
template: {
content: "hello {{someText}}",
recipe: "html",
engine: "handlebars"
},
data: { someText: "world!!" }
}).then((res) => {
response.body((buffer) => {
//prints hello world!!
console.log(buffer.toString());
});
});
However, this is what I'm seeing.
W20180725-15:49:53.920(-4)? (STDERR) TypeError: Cannot read property 'then' of undefined
W20180725-15:49:53.921(-4)? (STDERR) at index.js (imports/startup/server/accounts/index.js:8:1)
W20180725-15:49:53.921(-4)? (STDERR) at fileEvaluate (packages/modules-runtime.js:343:9)
W20180725-15:49:53.921(-4)? (STDERR) at require (packages/modules-runtime.js:238:16)
W20180725-15:49:53.921(-4)? (STDERR) at index.js (imports/startup/server/index.js:1:14)
W20180725-15:49:53.921(-4)? (STDERR) at fileEvaluate (packages/modules-runtime.js:343:9)
W20180725-15:49:53.922(-4)? (STDERR) at require (packages/modules-runtime.js:238:16)
W20180725-15:49:53.922(-4)? (STDERR) at main.js (server/main.js:1:14)
W20180725-15:49:53.922(-4)? (STDERR) at fileEvaluate (packages/modules-runtime.js:343:9)
W20180725-15:49:53.922(-4)? (STDERR) at require (packages/modules-runtime.js:238:16)
W20180725-15:49:53.923(-4)? (STDERR) at
Thanks @jan_blaha I have removed jsreport-contrib-mongodb
package and followed the guide you provided and I'm able to retrieve data from MongodDB.
Hey everyone,
I'm having an issue setting up mongodb extention, I have installed the extention
npm install mongodb --save && npm install jsreport-contrib-mongodb
once I attempt to start the server with jsreport start
2018-07-20T14:15:39.240Z - info: Using extension chrome-pdf
2018-07-20T14:15:39.298Z - info: Using extension html-to-xlsx
2018-07-20T14:15:39.372Z - info: html-to-xlsx detected chrome as available html engine
2018-07-20T14:15:39.372Z - info: Using extension studio
2018-07-20T14:15:39.394Z - info: Using extension version-control
2018-07-20T14:15:39.416Z - info: Using extension licensing
2018-07-20T14:15:39.431Z - info: Using extension data
2018-07-20T14:15:39.433Z - info: Using extension pdf-utils
2018-07-20T14:15:39.633Z - info: Using extension text
2018-07-20T14:15:39.634Z - info: Using extension reports
2018-07-20T14:15:39.638Z - info: Using extension base
2018-07-20T14:15:39.642Z - info: Using extension browser-client
2018-07-20T14:15:39.660Z - info: Using extension fs-store
2018-07-20T14:15:39.813Z - info: Using extension scheduling
2018-07-20T14:15:39.859Z - info: Using extension scripts
2018-07-20T14:15:39.864Z - info: Using extension assets
2018-07-20T14:15:39.870Z - info: Using extension xlsx
2018-07-20T14:15:39.894Z - info: Using extension sample-template
2018-07-20T14:15:39.896Z - info: Using extension resources
2018-07-20T14:15:39.897Z - info: Using extension public-templates
2018-07-20T14:15:39.900Z - debug: Extension public-templates was disabled
2018-07-20T14:15:39.900Z - info: Using extension jsreport-contrib-mongodb
2018-07-20T14:15:39.901Z - error: Error when loading extension jsreport-contrib-mongodb
TypeError: Cannot read property 'push' of undefined
at Object.module.exports (/home/linux/jsreportapp/node_modules/jsreport-contrib-mongodb/lib/mongo.js:3:44)
at Object._useOne (/home/linux/jsreportapp/node_modules/jsreport-core/lib/extensions/extensionsManager.js:174:75)
at Object._useMany (/home/linux/jsreportapp/node_modules/jsreport-core/lib/extensions/extensionsManager.js:87:20)
at process._tickCallback (internal/process/next_tick.js:68:7)
2018-07-20T14:15:39.902Z - error: Error occured during reporter init Error: Error when loading extension jsreport-contrib-mongodb
TypeError: Cannot read property 'push' of undefined
at Object.module.exports (/home/linux/jsreportapp/node_modules/jsreport-contrib-mongodb/lib/mongo.js:3:44)
at Object._useOne (/home/linux/jsreportapp/node_modules/jsreport-core/lib/extensions/extensionsManager.js:174:75)
at Object._useMany (/home/linux/jsreportapp/node_modules/jsreport-core/lib/extensions/extensionsManager.js:87:20)
at process._tickCallback (internal/process/next_tick.js:68:7)
at Object._useOne (/home/linux/jsreportapp/node_modules/jsreport-core/lib/extensions/extensionsManager.js:183:15)
at Object._useMany (/home/linux/jsreportapp/node_modules/jsreport-core/lib/extensions/extensionsManager.js:87:20)
at process._tickCallback (internal/process/next_tick.js:68:7)
An error has occurred when trying to initialize jsreport (2). Error when loading extension jsreport-contrib-mongodb
TypeError: Cannot read property 'push' of undefined
at Object.module.exports (/home/linux/jsreportapp/node_modules/jsreport-contrib-mongodb/lib/mongo.js:3:44)
at Object._useOne (/home/linux/jsreportapp/node_modules/jsreport-core/lib/extensions/extensionsManager.js:174:75)
at Object._useMany (/home/linux/jsreportapp/node_modules/jsreport-core/lib/extensions/extensionsManager.js:87:20)
at process._tickCallback (internal/process/next_tick.js:68:7) (1).
caused by error (2) -> stack = Error:
at instance.init.then.catch (/home/linux/jsreportapp/node_modules/jsreport-cli/lib/instanceHandler.js:31:29)
at process._tickCallback (internal/process/next_tick.js:68:7)
caused by error (1) -> stack = Error:
at Object._useOne (/home/linux/jsreportapp/node_modules/jsreport-core/lib/extensions/extensionsManager.js:183:15)
at Object._useMany (/home/linux/jsreportapp/node_modules/jsreport-core/lib/extensions/extensionsManager.js:87:20)
at process._tickCallback (internal/process/next_tick.js:68:7)
Here is the content of /home/linux/jsreportapp/node_modules/jsreport-contrib-mongodb/lib/mongo.js
module.exports = function (reporter, definition) {
if (reporter['scripts'].allowedModules !== '*') {
reporter['scripts'].allowedModules.push({
id : 'mongodb',
path: require.resolve('mongodb')
});
}
};
removing /tmp/jsreport
and following the installation steps once more resolved the issue.
Thanks
D
Hey everyone,
Fresh install of Ubuntu 16.04.2 LTS, node installed via nvm ( node v8.11.3, npm 6.2.0)
Following full install instractions
npm install jsreport-cli -g
mkdir jsreportapp
cd jsreportapp
jsreport init
jsreport configure
jsreport start
However this as far as I can go : (
linux@ubuntu:~/jsreportapp$ jsreport init && jsreport configure && jsreport start
jsreport installation not found, installing jsreport latest version now, wait a moment...
jsreport installation finished..
Creating server.js
Creating package.json
Creating default config jsreport.config.json
Initialized
? Do you want to enable web server? Yes
? Which protocol should web server use? http
? Specify the http port for web server: 5488
? Do you want to enable authentication in web server? No
? Do you want to persist jsreport objects and logs on disk? Yes everything saved on disk
? Can jsreport trust the rendering requests and allow access to local files and modules? No
? Should jsreport reuse processes to speed up the rendering? Yes
? Would you like that we create some default examples for you? Yes
config saved in: /home/linux/jsreportapp/jsreport.config.json
2018-07-18T20:39:09.777Z - info: Initializing jsreport@2.1.1 in development mode using configuration file: jsreport.config.json
2018-07-18T20:39:09.782Z - info: Searching for available extensions in /home/linux/jsreportapp/
2018-07-18T20:39:09.883Z - error: Error occured during reporter init Error: EISDIR: illegal operation on a directory, read
An error has occurred when trying to initialize jsreport (2). EISDIR: illegal operation on a directory, read (1).
caused by error (2) -> stack = Error:
at instance.init.then.catch (/home/linux/jsreportapp/node_modules/jsreport-cli/lib/instanceHandler.js:31:29)
at <anonymous>
caused by error (1) -> meta = {"cause":{"errno":-21,"code":"EISDIR","syscall":"read"},"isOperational":true,"errno":-21,"code":"EISDIR","syscall":"read"}, stack = Error:
linux@ubuntu:~/jsreportapp$
Any ideas?