Thanks so much for the information! Working on giving this a try now.
danielmmack
@danielmmack
Posts made by danielmmack
-
RE: Protocol Error (Browser.getVersion) - JSReports 2.11.0
-
RE: Protocol Error (Browser.getVersion) - JSReports 2.11.0
I tried building the image with no cache but ran into the same error. I run
docker compose up
to starts things off and then head over to the jsreports dashboard. I'm on macOS Monterey 12.6, I'm running this on an M1 which I've been wondering if that is somehow playing a role in the issues I'm seeing. -
RE: Protocol Error (Browser.getVersion) - JSReports 2.11.0
Any other pieces of information you'd like me to provide?
-
RE: Protocol Error (Browser.getVersion) - JSReports 2.11.0
Thank you for the quick reply! Here's what in the
package.json
file:{ "name": "jsreport-server", "main": "server.js", "license": "UNLICENSED", "private": true, "repository": { "type": "git", "url": "https://github.com/ThriveTRM/thrive-js-report" }, "engines": { "node": "^14.16.0" }, "scripts": { "postinstall": "[ -d '.git/hooks' ] && .githooks/install || exit 0", "start": "node server", "jsreport": "jsreport", "precommit": "lint-staged", "lint": "eslint data/*.js --fix", "lint:check": "eslint data/*.js", "format:css": "prettier --loglevel warn --write data/*/*/assets/*/*.css", "format:css:check": "prettier --check data/*/*/assets/*/*.css", "format:js": "prettier --loglevel warn --write data/*/*.js", "format:json": "prettier --loglevel warn --write data/*/data/*/dataJson.json", "format:js:check": "prettier --check data/*/*.js", "format:handlebars": "prettier --write data/*/*/pdf/*/*.handlebars --parser=glimmer", "format:handlebars:check": "prettier --check data/*/*/pdf/*/*.handlebars --parser=glimmer", "format:json:check": "prettier --check data/*/data/*/dataJson.json", "test": "jest --coverage", "test:watch": "jest --watch --runInBand" }, "jsreport": { "entryPoint": "server.js" }, "lint-staged": { "*.js": [ "eslint --fix", "prettier --loglevel warn --write " ], "*.handlebars": [ "prettier --loglevel warn --write --parser=glimmer" ], "*.css": [ "prettier --loglevel warn --write" ], "dataJson.json": [ "prettier --loglevel warn --write" ] }, "dependencies": { "handlebars": "^4.7.6", "handlebars-group-by": "^1.0.1", "jsreport": "^2.11.0", "jsreport-html-embedded-in-docx": "^2.2.0" }, "devDependencies": { "eslint": "^7.19.0", "eslint-config-prettier": "^7.2.0", "jest": "^26.6.3", "eslint-plugin-jest": "^24.1.9", "lint-staged": "^10.2.11", "prettier": "^2.2.1" } }
Here's what's in the
jsreport.config.json
file:{ "extensions": { "fs-store": { "dataDirectory": "data", "syncModifications": { "updateStudio": true } }, "chrome-pdf": { "timeout": 600000 } }, "store": { "provider": "fs" }, "allowLocalFilesAccess" : true, "templatingEngines" : { "allowedModules": ["handlebars-group-by"] } }
-
Protocol Error (Browser.getVersion) - JSReports 2.11.0
Hello! I'm currently trying to get JSreport running properly in my local environment. I'm able to get to the reports dashboard with no issues. Here is what the Dockerfile looks like:
FROM jsreport/jsreport:2.11.0 ARG APP=/app WORKDIR $APP COPY --chown=jsreport:jsreport .prettierrc.js $APP/ COPY --chown=jsreport:jsreport .eslintrc.js $APP/ COPY --chown=jsreport:jsreport package.json $APP/ RUN npm install COPY --chown=jsreport:jsreport jsreport.config.json $APP/ COPY --chown=jsreport:jsreport /data $APP/data
When I try and generate a pdf report, I'm getting hit with this error:
Protocol error (Browser.getVersion): Target closed. logs: +0 Starting rendering request 4 (user: test) +5 Rendering template { name: weeklyProgressReport, recipe: chrome-pdf, engine: handlebars, preview: true } +10 Adding sample data 07CWvWxCRT +13 Resources not defined for this template. +15 Base url not specified, skipping its injection. +37 Replaced assets ["weeklyProgressReportDemo.css"] +38 Rendering engine handlebars using dedicated-process strategy +898 Compiled template not found in the cache, compiling +945 Executing recipe chrome-pdf +2038 Rendering request 4 finished with error in 2038 ms Error: Protocol error (Browser.getVersion): Target closed. at /app/node_modules/puppeteer/lib/Connection.js:74:56 at new Promise (<anonymous>) at Connection.send (/app/node_modules/puppeteer/lib/Connection.js:73:12) at Browser._getVersion (/app/node_modules/puppeteer/lib/Browser.js:274:29) at Browser.version (/app/node_modules/puppeteer/lib/Browser.js:242:32) at Browser.<anonymous> (/app/node_modules/puppeteer/lib/helper.js:112:23) at /app/node_modules/jsreport-chrome-pdf/lib/conversion.js:27:41 at /app/node_modules/jsreport-chrome-pdf/lib/conversion.js:301:28 at new Promise (<anonymous>) at runWithTimeout (/app/node_modules/jsreport-chrome-pdf/lib/conversion.js:283:10) at module.exports (/app/node_modules/jsreport-chrome-pdf/lib/conversion.js:26:34) at processTicksAndRejections (internal/process/task_queues.js:97:5) at async execute (/app/node_modules/jsreport-chrome-pdf/lib/dedicatedProcessStrategy.js:10:22) at async Object.execute (/app/node_modules/jsreport-chrome-pdf/lib/chrome.js:68:20) at async module.exports (/app/node_modules/jsreport-core/lib/render/render.js:150:5)
Any ideas as to what's causing this error to occur?