Issues with Ubuntu Upgrade
We have been facing some problems getting jsReport to initialize after upgrading our OS version. We're using the following versions below:
OS: Ubuntu 22.04
We're running the following commands in our bash script during initialization:
npm i -g email@example.com --unsafe-perm=true --allow-root**
sudo jsreport init 2.6.1
The jsreport-cli installs without issue, however it seems the jsreport init command is seemingly no longer working. The OS upgrade is the only change that's been made since this stopped working, so we're wondering if it's due to a potential incompatibility with the new OS version. If so, is there a recommended version that we use?
jsreport initoutput something?
Actually, you don't need the CLI and
You can just copy the app folder from your previous installation without
npm io install and then
node server.jsto start.
Apologies for the late reply
It looks like we were actually able to resolve the jsreport initialization issue, however we are encountering a new issue. Whenever we try to generate a report, we receive a "Unable to find specified template or user doesnt have permissions to read it" error.
Looking further it looks like our NPM/Node version has updated along with the OS Upgrade, I've added those versions to the original post above. Once again the only changes should have been these upgrades.
"Unable to find specified template or user doesnt have permissions to read it"
This should have nothing todo with the version upgrades. Do you see the template in the studio when you log in with the same user that is doing the API request?
I've added those versions to the original post above.
As far as I know, jsreport v2 should run fine in node 12. There are just known problems in jsreport v2 with import and office recipes with node 16.
The ubuntu later than xenial breaks https resources like images when you use phantom-pdf recipe. However, you most likely already use the chrome-pdf recipes introduced in v2 so you should be fine.
In every case, this wouldn't cause the mentioned error
Unable to find specified templatewhich means the template rendering even didn't start because the template wasn't found.