Added authorization server and backup of JSReport config. IO-585

This commit is contained in:
Patrick Fic
2021-01-07 10:10:55 -08:00
parent bf507821c0
commit 3da3fb96e2
36 changed files with 20037 additions and 0 deletions

2
.gitignore vendored
View File

@@ -10,6 +10,8 @@ client.pnp.js
admin/node_modules
admin/.pnp
admin.pnp.js
jsreport/node_modules
jsreport/auth-server/node_modules
# testing
/coverage
client/coverage

View File

@@ -0,0 +1,4 @@
FIREBASE_ADMINSDK_JSON=./imex-dev-firebase-adminsdk.json
FIREBASE_DATABASE_URL=https://imex-dev.firebaseio.com
PORT=5000

View File

@@ -0,0 +1,5 @@
NODE_ENV=production
FIREBASE_ADMINSDK_JSON=./imex-prod-firebase-adminsdk.json
FIREBASE_DATABASE_URL=https://imex-prod.firebaseio.com
PORT=5000

View File

@@ -0,0 +1,35 @@
var admin = require("firebase-admin");
const path = require("path");
require("dotenv").config({
path: path.resolve(
process.cwd(),
`.env.${process.env.NODE_ENV || "development"}`
),
});
var serviceAccount = require(process.env.FIREBASE_ADMINSDK_JSON);
admin.initializeApp({
credential: admin.credential.cert(serviceAccount),
databaseURL: process.env.FIREBASE_DATABASE_URL,
});
exports.admin = admin;
exports.validateFirebaseIdToken = async (req, res, next) => {
console.log("req.body", req.body);
let idToken = req.body.token;
try {
const decodedIdToken = await admin.auth().verifyIdToken(idToken);
//console.log("ID Token correctly decoded", decodedIdToken);
req.user = decodedIdToken;
res.send({ active: true, username: "admin" });
return;
} catch (error) {
console.error("Error while verifying Firebase ID token:", error);
res.status(403).send({ active: false });
return;
}
};

View File

@@ -0,0 +1,12 @@
{
"type": "service_account",
"project_id": "imex-dev",
"private_key_id": "4cd5bdb92b883cba1309ee8a7dda4b9925e8f264",
"private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDIWWXzD7vPBc1l\nBlbIQRpu8XnQ5CL4kgv2ZsoJ4tQ8cOYRez/puvwI0lZbMIr4KhVEeoe3am0gOXMY\niYmu3MLm7SZEZW/V7aawx462WprlAP9KcwSlVcNC+lSWLrPVvnuRXGi5SWdDBW60\ne2WRqbZKWkMATQkzLZzOLb8wt9VDU5TcY5t4NB7vrTJZLApxZAhX9jyaqR0WjgdS\nsoGNWwfo+wZqgaLHkdf68ELQ+8bJepbj8sExnJmwwiTvXlsYNSs1lTP1Dis56nKe\nRkSlbevyGgO9PGpWH1WIzZP5/vHANWShdXsvuacZ3TCnhNf+ST78A7mTWw8DMSvI\novtfzHrVAgMBAAECggEARdwGVI6z6igXypY/RGyPDwhcdZ5XI12pli2ZXYEeiETF\ntGrJinKM13agbgOrMYVbDRm8oRQXIRlnLLMoszR/MY6XvVmxeWL4sMOk26kUQa3r\nVsZsZEpXX89yFzwJsQpOhA045wLVYuVOCNjOPdBzo9F9c2lpP9MzziDdfdtcHbE1\nR1o3wdwl3RiRS6wEeOsKTCBI3e9eytSh48wBFbYtFjOO07u4Err7iMfdd7WcaOpC\nCUAbnphq3IEKksSWzA/h/UZYCQFX4SJILwY2A5l8wji31ojoMZn+UTWHZeuhA5zW\nzy1rof1o5NHDoQGmGGBLEWs461ylifq8ZFc/u3kNsQKBgQDn5hDMLJ9dUs5e+Z+6\nxP5gvq4/Bwi6AVX76DdWSaCW+jDV03OC8voH0UzbJKZ81/mMDhFL10KRbbG8tBoU\ncpOMpSrsDqIu9C6iniKK5nggzVaqpWduqiHT59duHh4ohcgmhoRAaeCy5Q1u2aOs\nuhUpsX1CPma73Wuw9otPV8n//wKBgQDdK+wGgBl8otkEtNoOGxVdIjyY/3tSKjJN\nA1oW21Q+KKHk3nQ0MQv69XxwmFuyAkco0aT/9w1YjSLhFiDnPTGdsyOlPyzWjzKt\ny7rQQ99W9E6MxHoT4tA0S6UUY55jsnPB+ytckPW8CMc89MKp1Qw1Wx/HsTNoRLtq\nbjb+USGFKwKBgEUc4Cy5r9VUdIUByIUVaOrUaYIHSqaE92dYUgW5c88LSbqwhmCk\nobfqvQki5yuWAp2nI6iCwygslSg0VQF7FFZ6c0xfIB72T1/P2WOkRHEiQY4iNa1Z\nrzNEiYQcHcjd9kTlGk1IQNuQQGylGI7F9sCyUS6JAn1DBHF9SQ+gjmdpAoGAQVsH\nRex4m5Hrmy5t+RkbuQey7GsiX+dEMem5p2Nsg2myXVU29W1A4wnDmeoLvpBZwsAg\nh9rTQMWD9wt48Zvtm3IiKGSAtW5fRWgcbgqAZsuOop40jMfLSojH4TyGw2MqPbog\n2Bul4cieR270Twc7slCZFYNRc5BL6WlkKsaCpz0CgYBlHGMoqaplAWVYJp+O7bbD\nsW8C8+FlFYoT26q8/TCj7dKxKSARsV9vg3eDBz0qCTMIqZGpMHWzF0Fkpr9ZqYdZ\nEvYdmrI+oSi657IQqan0vZwn7QBooE/opBwElHXjhCeAVLmDseLG3sK8OqcbW3aG\n1K7HV6sirgihrTS8iOqs4Q==\n-----END PRIVATE KEY-----\n",
"client_email": "firebase-adminsdk-f2zkh@imex-dev.iam.gserviceaccount.com",
"client_id": "105392652141030688709",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-f2zkh%40imex-dev.iam.gserviceaccount.com"
}

View File

@@ -0,0 +1,12 @@
{
"type": "service_account",
"project_id": "imex-prod",
"private_key_id": "5eacc85af252be59a0dcf08009b3219eaabced2e",
"private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDLYLP7i2CDFPQw\n1yz6RM1DV3KEEDF9PmbPDcun4P66n5fK2w4fool81MsfAR2no5j38FNM7cDYpo2S\n9e48T3lFxybBHm8PP1DMfMeTys7FGdW/Q0/pdYQRZbPhqSqwJZuj05lkObI4l6V3\nIDIP5wtiOwYSQAp6Vga8atD/sAq+DsOqTbZ5CniBwIlvCVhwcjhf/dry+Tm0ZH6P\nu4bQGD3GL3PQ6cd00oDKE+Gv2emDrgvjmB03RTQDFoBI+bxsMDYhoN7mYS2PfUQD\ndsH+RXqu8dWzPJhacosp3DMfgvgPIdxCR8/h4LT/v20hYNdhGTwZAZUHbEUCEkgf\nOZ0Xa7IVAgMBAAECggEAIR75kMCtEgvqjL2uPH/R8eKe6rT8akosUhIMFaYFtfzh\nqo6sKSi+PU8mWUFERBXXhqFj34ZkvqO5MLLOfpHuzRdWz2KWcaQ9E2BK3F3N+Llx\nXvmmXP3faTnn5ps3MYKeazq9o13mEWNY9iKPJJna979nCLfXPP8fj7XRnaJczYCt\njh+LuzFxtsP9qFXFhTu+0Ji7g7FttQSq/p4JR5Ybhp4t5m8P6GPg+NzC3qZ4b/96\nP0XQNnKHq2bRE4PKP7n8pomNenIDi4/QPmARlxzpAOvTNHwXqgWGf7HG5Sv0bl1F\nNLnHcS6g2aMXq9ZPaaG+4auFNrQ6mQzsf+nVxvYU7QKBgQDz/Vdvs5eTMyu2Cwf2\noSzxh6YYKwgKMUl2jZqEZb1I5/2fB02/mnlAU01WQfcHewlA4J4uJnMvVo3G6guO\nxBfUDnb4TylbxMVyYesJfprOdRyfeOYBuxbjfqpee2aJKtWANxrDe9MZW1p8Ztcy\nTWZIVgmrGvNiT+Z6xKCrv8apSwKBgQDVY5ZQG6ZAYDfMf7j/G67QG31kUJ1GGJNq\nXfg8cjB5nJnF5tM2tdLNje2fthlmhRV44+/xsqiRbI1p8i6iPS9gW/rEsujoFbaB\nGzfRwFgijTxGjgR1Irk1/rTZxnZXYMqhgap9a6Pgw0PttUkFbduSXpQQV/EYTCWs\nL3yrw7pWHwKBgQC3z+t4VqdhmRJcMhFMx34RdC04VerXquv6aZG4HuGsNEJI9Xqo\nV5rzUA6aZlXRh+qfutjQUd1DE4T6D0anxqlg84jDZvf0j9hkZMpqO7wqv+XRaoZ1\nVVpYBwwY5ASKX/+6eUkrbnTJzJ3tzJhg6BifdFoSUtp6/VDYupuE6JSk4wKBgAeX\nz5VyJmxMADBKqy6IsaO+FqwnIjGIVlaGmXqtJYRuShp8qC9eMO4XiskQFb9MJQN0\nOOmEzfK+xhlrALXNL45iN34gT6FShHf7m/Tev0QbenWYQBha7/Q35/+HzFY3n343\nuvVTizVIPXaL6NlEm3eN3f7m4jFXJFAIMIt8H3lJAoGAfveAtfrMMVru9jDZShmY\n+LaVvauSCdq0mtzB9gz/jFA0LC6LXnPjkk0Vul/fOpq1S9E/0PhKELxTgEeobP7a\n2gqa16r12nMkAUlfjlKwuwy1AxEyqpaCLI1raoOFCa9YbrChDtNJp5cLq2z6CZzU\nt19swf9G6W9RbKi8NUGeu1M=\n-----END PRIVATE KEY-----\n",
"client_email": "firebase-adminsdk-m6ypm@imex-prod.iam.gserviceaccount.com",
"client_id": "107364429775431537388",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-m6ypm%40imex-prod.iam.gserviceaccount.com"
}

2023
jsreport/auth-server/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,27 @@
{
"name": "jsreport-auth",
"version": "0.0.1",
"license": "UNLICENSED",
"engines": {
"node": "12.18.3",
"npm": "6.11.3"
},
"scripts": {
"start": "node server.js"
},
"dependencies": {
"body-parser": "^1.18.3",
"compression": "^1.7.4",
"cors": "2.8.5",
"csrf": "^3.1.0",
"dotenv": "8.2.0",
"express": "^4.16.4",
"firebase-admin": "^9.4.2",
"lodash": "^4.17.20",
"node-fetch": "^2.6.1"
},
"devDependencies": {
"concurrently": "^5.3.0",
"eslint-plugin-promise": "^4.2.1"
}
}

View File

@@ -0,0 +1,54 @@
const express = require("express");
const cors = require("cors");
const bodyParser = require("body-parser");
const path = require("path");
const compression = require("compression");
global.fetch = require("node-fetch");
var fb = require("./firebase/firebase-handler");
require("dotenv").config({
path: path.resolve(
process.cwd(),
`.env.${process.env.NODE_ENV || "development"}`
),
});
const https = require("https");
const fs = require("fs");
const app = express();
const port = process.env.PORT || 5000;
//const port = 5000;
//app.use(fb.validateFirebaseIdToken);
app.use(compression());
app.use(bodyParser.json({ limit: "50mb" }));
app.use(bodyParser.urlencoded({ limit: "50mb", extended: true }));
//app.use(enforce.HTTPS({ trustProtoHeader: true }));
app.use(cors());
//Test route to ensure Express is responding.
app.get("/test", async function (req, res) {
console.log("Incoming test request.", req);
res.status(200).send("OK");
});
app.post("/auth", fb.validateFirebaseIdToken);
app.get("/", async function (req, res) {
res.status(200).send("Access Forbidden.");
});
if (process.env.NODE_ENV === "production") {
app.listen(port, (error) => {
if (error) throw error;
console.log("AWS - [PRODUCTION] Server running on port " + port);
});
} else {
app.listen(port, (error) => {
if (error) throw error;
console.log("[DEVELOPMENT] Non Secured Server running on port " + port);
});
}

View File

@@ -0,0 +1,12 @@
{
"name": "Kavia",
"creationDate": {
"$$date": 1609970586507
},
"modificationDate": {
"$$date": 1609970586507
},
"shortid": "DFfQj6G",
"_id": "d1Q1GisfxvFchxnb",
"$entitySet": "folders"
}

View File

@@ -0,0 +1,14 @@
{
"name": "header.html",
"creationDate": {
"$$date": 1609975320390
},
"modificationDate": {
"$$date": 1609981839653
},
"shortid": "pYla8mM",
"inheritedReadPermissions": [],
"inheritedEditPermissions": [],
"_id": "iLQICSvbUjE2vy2Q",
"$entitySet": "assets"
}

View File

@@ -0,0 +1,14 @@
<div style="display: flex; justify-content: center; align-items: center">
<div style="display: flex; flex-direction: row; align-items: center">
<img alt="" src="https://thinkimex.com/imexlogo.png" />
<div>
<div>
<strong>Kavia Autobody</strong>
</div>
<div>1202 - 1001 Homer St</div>
<div>
Vancouver, BC V6B 1M9
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,21 @@
{
"name": "Starter Template",
"recipe": "html",
"shortid": "dbHQiFF9aR",
"engine": "handlebars",
"chrome": {
"printBackground": true
},
"creationDate": {
"$$date": 1609983284287
},
"modificationDate": {
"$$date": 1609983513111
},
"data": null,
"scripts": [],
"inheritedReadPermissions": [],
"inheritedEditPermissions": [],
"_id": "slk6YH0reas7fIJh",
"$entitySet": "templates"
}

View File

@@ -0,0 +1,15 @@
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<style>
{#asset _globals/styles.css @encoding=utf8}
</style>
</head>
<body>
<div class="container">
<div>{#asset {{headerpath}}}</div>
<span>This is a basic template</span>
</div>
</body>
</html>

View File

@@ -0,0 +1 @@
{#asset _globals/helpers.js @encoding=utf8}

View File

@@ -0,0 +1,12 @@
{
"name": "_Sample Data",
"creationDate": {
"$$date": 1609960203821
},
"modificationDate": {
"$$date": 1609983884494
},
"shortid": "NMAT8M~",
"_id": "NzVW38TsFYuiwkE1",
"$entitySet": "folders"
}

View File

@@ -0,0 +1,14 @@
{
"shortid": "saoWgKHbS6",
"name": "job",
"creationDate": {
"$$date": 1609960213183
},
"modificationDate": {
"$$date": 1609983495622
},
"inheritedReadPermissions": [],
"inheritedEditPermissions": [],
"_id": "kB2g429hShgHLZmO",
"$entitySet": "data"
}

View File

@@ -0,0 +1,11 @@
{
"headerpath":"/Kavia/header.html"
,"jobs_by_pk":{
"start": "2020-12-02T19:45:58.454+00:00",
"title": null,
"job": {
"ownr_fn": "TYLER",
"ownr_ln": "BODNARCHUK",
"ownr_ea": null
}
}}

View File

@@ -0,0 +1,12 @@
{
"name": "_globals",
"creationDate": {
"$$date": 1609959897101
},
"modificationDate": {
"$$date": 1609959897101
},
"shortid": "Ek4vtyE",
"_id": "LGAznUA50hrX9QC2",
"$entitySet": "folders"
}

View File

@@ -0,0 +1,14 @@
{
"name": "helpers.js",
"creationDate": {
"$$date": 1609960774906
},
"modificationDate": {
"$$date": 1609960781053
},
"shortid": "a49TcoN",
"_id": "1lAwHKwaeG3TJBTT",
"$entitySet": "assets",
"inheritedReadPermissions": [],
"inheritedEditPermissions": []
}

View File

@@ -0,0 +1,25 @@
const moment = require('moment')
function formatReportDate (date) {
return moment(date).format('YYYY MMMM DD')
}
function now() {
return new Date().toLocaleDateString()
}
function nowPlus20Days() {
var date = new Date()
date.setDate(date.getDate() + 20);
return date.toLocaleDateString();
}
function total(items) {
var sum = 0
items.forEach(function (i) {
console.log('Calculating item ' + i.name + '; you should see this message in debug run')
sum += i.price
})
return sum
}

View File

@@ -0,0 +1,14 @@
{
"name": "styles.css",
"creationDate": {
"$$date": 1609960168894
},
"modificationDate": {
"$$date": 1609982175635
},
"shortid": "TGu7wUV",
"_id": "9CWHJHWV4GlWHMKC",
"$entitySet": "assets",
"inheritedReadPermissions": [],
"inheritedEditPermissions": []
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,12 @@
{
"name": "estimate_detail.query",
"creationDate": {
"$$date": 1609978752854
},
"modificationDate": {
"$$date": 1609981955227
},
"shortid": "kPkTOno",
"_id": "YwBpKAPlgA3CWdJ4",
"$entitySet": "assets"
}

View File

@@ -0,0 +1,32 @@
query TEMPLATE_ESTIMATE_DETAIL($id: uuid!) {
jobs_by_pk(id: $id) {
csr
ded_amt
ded_status
id
ownr_co_nm
ownr_ln
ownr_fn
plate_no
plate_st
ro_number
regie_number
tlos_ind
v_color
v_make_desc
v_model_desc
v_model_yr
v_vin
clm_no
joblines(order_by: { line_no: asc }) {
id
mod_lbr_ty
mod_lb_hrs
part_qty
oem_partno
op_code_desc
line_desc
line_no
}
}
}

View File

@@ -0,0 +1,23 @@
{
"shortid": "GPfI1d0AbH",
"name": "estimate_detail",
"recipe": "html",
"engine": "handlebars",
"chrome": {
"printBackground": true
},
"creationDate": {
"$$date": 1609960117288
},
"modificationDate": {
"$$date": 1609983488727
},
"_id": "c3ghpf4MqODO3F6r",
"$entitySet": "templates",
"data": {
"shortid": "saoWgKHbS6"
},
"scripts": [],
"inheritedReadPermissions": [],
"inheritedEditPermissions": []
}

View File

@@ -0,0 +1,150 @@
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<style>
{#asset _globals/styles.css @encoding=utf8}
</style>
<style>@import url('https://fonts.googleapis.com/css2?family=Montserrat&display=swap');
body {
background-color: #ffe8d2;
font-family: 'Montserrat', sans-serif
}
.card {
border: none
}
.logo {
background-color: #eeeeeea8
}
.totals tr td {
font-size: 13px
}
.footer {
background-color: #eeeeeea8
}
.footer span {
font-size: 12px
}
.product-qty span {
font-size: 12px;
color: #dedbdb
}</style>
</head>
<body>
<div class="container mt-5 mb-5">
<div>{#asset {{headerpath}}}</div>
<div class="row d-flex justify-content-center">
<div class="col-md-8">
<div class="card">
<div class="text-left logo p-2 px-5"> <img src="https://i.imgur.com/2zDU056.png" width="50"> </div>
<div class="invoice p-5">
<h5>Your order Confirmed!</h5> <span class="font-weight-bold d-block mt-4">Hello, Chris</span> <span>You order has been confirmed and will be shipped in next two days!</span>
<div class="payment border-top mt-3 mb-3 border-bottom table-responsive">
<table class="table table-borderless">
<tbody>
<tr>
<td>
<div class="py-2"> <span class="d-block text-muted">Order Date</span> <span>12 Jan,2018</span> </div>
</td>
<td>
<div class="py-2"> <span class="d-block text-muted">Order No</span> <span>MT12332345</span> </div>
</td>
<td>
<div class="py-2"> <span class="d-block text-muted">Payment</span> <span><img src="https://img.icons8.com/color/48/000000/mastercard.png" width="20" /></span> </div>
</td>
<td>
<div class="py-2"> <span class="d-block text-muted">Shiping Address</span> <span>414 Advert Avenue, NY,USA</span> </div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="product border-bottom table-responsive">
<table class="table table-borderless">
<tbody>
<tr>
<td width="20%"> <img src="https://i.imgur.com/u11K1qd.jpg" width="90"> </td>
<td width="60%"> <span class="font-weight-bold">Men's Sports cap</span>
<div class="product-qty"> <span class="d-block">Quantity:1</span> <span>Color:Dark</span> </div>
</td>
<td width="20%">
<div class="text-right"> <span class="font-weight-bold">$67.50</span> </div>
</td>
</tr>
<tr>
<td width="20%"> <img src="https://i.imgur.com/SmBOua9.jpg" width="70"> </td>
<td width="60%"> <span class="font-weight-bold">Men's Collar T-shirt</span>
<div class="product-qty"> <span class="d-block">Quantity:1</span> <span>Color:Orange</span> </div>
</td>
<td width="20%">
<div class="text-right"> <span class="font-weight-bold">$77.50</span> </div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="row d-flex justify-content-end">
<div class="col-md-5">
<table class="table table-borderless">
<tbody class="totals">
<tr>
<td>
<div class="text-left"> <span class="text-muted">Subtotal</span> </div>
</td>
<td>
<div class="text-right"> <span>$168.50</span> </div>
</td>
</tr>
<tr>
<td>
<div class="text-left"> <span class="text-muted">Shipping Fee</span> </div>
</td>
<td>
<div class="text-right"> <span>$22</span> </div>
</td>
</tr>
<tr>
<td>
<div class="text-left"> <span class="text-muted">Tax Fee</span> </div>
</td>
<td>
<div class="text-right"> <span>$7.65</span> </div>
</td>
</tr>
<tr>
<td>
<div class="text-left"> <span class="text-muted">Discount</span> </div>
</td>
<td>
<div class="text-right"> <span class="text-success">$168.50</span> </div>
</td>
</tr>
<tr class="border-top border-bottom">
<td>
<div class="text-left"> <span class="font-weight-bold">Subtotal</span> </div>
</td>
<td>
<div class="text-right"> <span class="font-weight-bold">$238.50</span> </div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>We will be sending shipping confirmation email when the item shipped successfully!</p>
<p class="font-weight-bold mb-0">Thanks for shopping with us!</p> <span>Nike Team</span>
</div>
<div class="d-flex justify-content-between footer p-3"> <span>Need Help? visit our <a href="#"> help center</a></span> <span>12 June, 2020</span> </div>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1 @@
{#asset _globals/helpers.js @encoding=utf8}

5
jsreport/data/settings Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,65 @@
{
"httpPort": 80,
"httpsPort": 443,
"certificate": {
"key": "/etc/letsencrypt/live/reports.bodyshop.app/privkey.pem",
"cert": "/etc/letsencrypt/live/reports.bodyshop.app/fullchain.pem"
},
"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,
"reportTimeout": 60000,
"templatingEngines": {
"strategy": "http-server"
},
"extensions": {
"authentication": {
"cookieSession": {
"secret": "imex"
},
"authorizationServer": {
"tokenValidation": {
"endpoint": "http://localhost:5000/auth",
"timeout": 180000,
"sendAsJSON": true,
"hint": null,
"usernameField": "username",
"activeField": "active",
"auth": false
}
},
"admin": {
"username": "admin",
"password": "admin"
},
"enabled": true
},
"sample-template": {
"createSamples": true
},
"scripts": {
"strategy": "http-server"
}
}
}

View File

@@ -0,0 +1,53 @@
{
"httpPort": 80,
"httpsPort": 443,
"certificate": {
"key": "/etc/letsencrypt/live/reports.bodyshop.app/privkey.pem",
"cert": "/etc/letsencrypt/live/reports.bodyshop.app/fullchain.pem"
},
"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,
"reportTimeout": 60000,
"templatingEngines": {
"strategy": "http-server"
},
"extensions": {
"authentication": {
"cookieSession": {
"secret": "imex"
},
"admin": {
"username": "admin",
"password": "admin"
},
"enabled": true
},
"sample-template": {
"createSamples": true
},
"scripts": {
"strategy": "http-server"
}
}
}

533
jsreport/logs/error.log Normal file
View File

@@ -0,0 +1,533 @@
2021-01-06T18:49:08.795Z - error: Rendering request 1 finished with error in 567 ms
2021-01-06T18:49:08.797Z - error: Error when processing render request 1 Failed to launch chrome!
/root/node_modules/puppeteer/.local-chromium/linux-706915/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
Error: Failed to launch chrome!
/root/node_modules/puppeteer/.local-chromium/linux-706915/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
at onClose (/root/node_modules/puppeteer/lib/Launcher.js:348:14)
at Interface.helper.addEventListener (/root/node_modules/puppeteer/lib/Launcher.js:337:50)
at emitNone (events.js:111:20)
at Interface.emit (events.js:208:7)
at Interface.close (readline.js:368:8)
at Socket.onend (readline.js:147:10)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
2021-01-06T18:49:08.798Z - error: Error during processing request at https://reports.bodyshop.app/api/report/invoice-main
2021-01-06T19:08:24.746Z - error: Rendering request 1 finished with error in 259 ms
2021-01-06T19:08:24.748Z - error: Error when processing render request 1 Failed to launch chrome!
/root/node_modules/puppeteer/.local-chromium/linux-706915/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
Error: Failed to launch chrome!
/root/node_modules/puppeteer/.local-chromium/linux-706915/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
at onClose (/root/node_modules/puppeteer/lib/Launcher.js:348:14)
at Interface.helper.addEventListener (/root/node_modules/puppeteer/lib/Launcher.js:337:50)
at emitNone (events.js:111:20)
at Interface.emit (events.js:208:7)
at Interface.close (readline.js:368:8)
at Socket.onend (readline.js:147:10)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
2021-01-06T19:08:24.750Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:08:37.643Z - error: Rendering request 2 finished with error in 35 ms
2021-01-06T19:08:37.644Z - error: Error when processing render request 2 Failed to launch chrome!
/root/node_modules/puppeteer/.local-chromium/linux-706915/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
Error: Failed to launch chrome!
/root/node_modules/puppeteer/.local-chromium/linux-706915/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
at onClose (/root/node_modules/puppeteer/lib/Launcher.js:348:14)
at Interface.helper.addEventListener (/root/node_modules/puppeteer/lib/Launcher.js:337:50)
at emitNone (events.js:111:20)
at Interface.emit (events.js:208:7)
at Interface.close (readline.js:368:8)
at Socket.onend (readline.js:147:10)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
2021-01-06T19:08:37.645Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:08:38.566Z - error: Rendering request 3 finished with error in 30 ms
2021-01-06T19:08:38.567Z - error: Error when processing render request 3 Failed to launch chrome!
/root/node_modules/puppeteer/.local-chromium/linux-706915/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
Error: Failed to launch chrome!
/root/node_modules/puppeteer/.local-chromium/linux-706915/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
at onClose (/root/node_modules/puppeteer/lib/Launcher.js:348:14)
at Interface.helper.addEventListener (/root/node_modules/puppeteer/lib/Launcher.js:337:50)
at emitNone (events.js:111:20)
at Interface.emit (events.js:208:7)
at Interface.close (readline.js:368:8)
at Socket.onend (readline.js:147:10)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
2021-01-06T19:08:38.568Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:11:36.440Z - error: Rendering request 4 finished with error in 20 ms
2021-01-06T19:11:36.441Z - error: Error when processing render request 4 Asset Invoice logo.png not found in the store and also not on the disk: Unable to find or read file /root/Invoice logo.png. ENOENT: no such file or directory, open '/root/Invoice logo.png' Error: Asset Invoice logo.png not found in the store and also not on the disk: Unable to find or read file /root/Invoice logo.png. ENOENT: no such file or directory, open '/root/Invoice logo.png'
at readAsset (/root/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T19:11:36.442Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:12:30.037Z - error: Rendering request 6 finished with error in 732 ms
2021-01-06T19:12:30.038Z - error: Error when processing render request 6 Asset global/styles.css not found in the store and also not on the disk: Unable to find or read file /root/global/styles.css. ENOENT: no such file or directory, open '/root/global/styles.css' Error: Asset global/styles.css not found in the store and also not on the disk: Unable to find or read file /root/global/styles.css. ENOENT: no such file or directory, open '/root/global/styles.css'
at readAsset (/root/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T19:12:30.039Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:13:04.710Z - error: uncaughtException: Cannot read property 'split' of undefined date=Wed Jan 06 2021 19:13:04 GMT+0000 (UTC), pid=795, uid=0, gid=0, cwd=/root, execPath=/root/.nvm/versions/node/v8.11.3/bin/node, version=v8.11.3, argv=[/root/.nvm/versions/node/v8.11.3/bin/node, /root/.nvm/versions/node/v8.11.3/lib/node_modules/pm2/lib/ProcessContainerForkLegacy.js], rss=128917504, heapTotal=69009408, heapUsed=56299040, external=838587, loadavg=[0, 0, 0.03369140625], uptime=1187
TypeError: Cannot read property 'split' of undefined
at Server.reporter.express.redirectServer.http.createServer (/root/node_modules/jsreport-express/lib/reporter.express.js:59:53)
at emitTwo (events.js:126:13)
at Server.emit (events.js:214:7)
at Server.<anonymous> (/root/.nvm/versions/node/v8.11.3/lib/node_modules/pm2/node_modules/@pm2/io/build/main/metrics/httpMetrics.js:166:33)
at parserOnIncoming (_http_server.js:619:12)
at HTTPParser.parserOnHeadersComplete (_http_common.js:112:17)
2021-01-06T19:13:14.701Z - error: Rendering request 1 finished with error in 583 ms
2021-01-06T19:13:14.702Z - error: Error when processing render request 1 Asset _globals/scripts.js not found in the store and also not on the disk: Unable to find or read file /root/_globals/scripts.js. ENOENT: no such file or directory, open '/root/_globals/scripts.js' Error: Asset _globals/scripts.js not found in the store and also not on the disk: Unable to find or read file /root/_globals/scripts.js. ENOENT: no such file or directory, open '/root/_globals/scripts.js'
at readAsset (/root/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T19:13:14.706Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:17:14.427Z - error: Rendering request 2 finished with error in 42 ms
2021-01-06T19:17:14.428Z - error: Error when processing render request 2 Asset _globals/scripts.js not found in the store and also not on the disk: Unable to find or read file /root/_globals/scripts.js. ENOENT: no such file or directory, open '/root/_globals/scripts.js' Error: Asset _globals/scripts.js not found in the store and also not on the disk: Unable to find or read file /root/_globals/scripts.js. ENOENT: no such file or directory, open '/root/_globals/scripts.js'
at readAsset (/root/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T19:17:14.429Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:17:23.439Z - error: Rendering request 3 finished with error in 10 ms
2021-01-06T19:17:23.440Z - error: Error when processing render request 3 Asset _globals/scripts.js not found in the store and also not on the disk: Unable to find or read file /root/_globals/scripts.js. ENOENT: no such file or directory, open '/root/_globals/scripts.js' Error: Asset _globals/scripts.js not found in the store and also not on the disk: Unable to find or read file /root/_globals/scripts.js. ENOENT: no such file or directory, open '/root/_globals/scripts.js'
at readAsset (/root/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T19:17:23.443Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:17:30.701Z - error: Rendering request 4 finished with error in 10 ms
2021-01-06T19:17:30.702Z - error: Error when processing render request 4 Asset _globals/scripts.js not found in the store and also not on the disk: Unable to find or read file /root/_globals/scripts.js. ENOENT: no such file or directory, open '/root/_globals/scripts.js' Error: Asset _globals/scripts.js not found in the store and also not on the disk: Unable to find or read file /root/_globals/scripts.js. ENOENT: no such file or directory, open '/root/_globals/scripts.js'
at readAsset (/root/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T19:17:30.702Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:17:46.493Z - error: Rendering request 5 finished with error in 12 ms
2021-01-06T19:17:46.493Z - error: Error when processing render request 5 Asset scripts.js not found in the store and also not on the disk: Unable to find or read file /root/scripts.js. ENOENT: no such file or directory, open '/root/scripts.js' Error: Asset scripts.js not found in the store and also not on the disk: Unable to find or read file /root/scripts.js. ENOENT: no such file or directory, open '/root/scripts.js'
at readAsset (/root/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T19:17:46.494Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:18:22.800Z - error: Rendering request 6 finished with error in 10 ms
2021-01-06T19:18:22.801Z - error: Error when processing render request 6 Asset scripts.js not found in the store and also not on the disk: Unable to find or read file /root/scripts.js. ENOENT: no such file or directory, open '/root/scripts.js' Error: Asset scripts.js not found in the store and also not on the disk: Unable to find or read file /root/scripts.js. ENOENT: no such file or directory, open '/root/scripts.js'
at readAsset (/root/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T19:18:22.802Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:18:32.060Z - error: Rendering request 7 finished with error in 12 ms
2021-01-06T19:18:32.061Z - error: Error when processing render request 7 Asset scripts.js not found in the store and also not on the disk: Unable to find or read file /root/scripts.js. ENOENT: no such file or directory, open '/root/scripts.js' Error: Asset scripts.js not found in the store and also not on the disk: Unable to find or read file /root/scripts.js. ENOENT: no such file or directory, open '/root/scripts.js'
at readAsset (/root/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T19:18:32.062Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:18:33.067Z - error: Rendering request 8 finished with error in 13 ms
2021-01-06T19:18:33.068Z - error: Error when processing render request 8 Asset scripts.js not found in the store and also not on the disk: Unable to find or read file /root/scripts.js. ENOENT: no such file or directory, open '/root/scripts.js' Error: Asset scripts.js not found in the store and also not on the disk: Unable to find or read file /root/scripts.js. ENOENT: no such file or directory, open '/root/scripts.js'
at readAsset (/root/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T19:18:33.069Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:18:35.980Z - error: Rendering request 9 finished with error in 23 ms
2021-01-06T19:18:35.982Z - error: Error when processing render request 9 Asset scripts.js not found in the store and also not on the disk: Unable to find or read file /root/scripts.js. ENOENT: no such file or directory, open '/root/scripts.js'
logs:
+0 Starting rendering request 9 (user: admin)
+2 Rendering template { name: appointment-confirmation, recipe: chrome-pdf, engine: handlebars, preview: true }
+8 Adding sample data saoWgKHbS6
+8 Resources not defined for this template.
+12 Replaced assets ["_globals/styles.css"]
+23 Rendering request 9 finished with error in 23 ms Error: Asset scripts.js not found in the store and also not on the disk: Unable to find or read file /root/scripts.js. ENOENT: no such file or directory, open '/root/scripts.js'
at readAsset (/root/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T19:18:35.985Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:18:49.204Z - error: Rendering request 10 finished with error in 14 ms
2021-01-06T19:18:49.204Z - error: Error when processing render request 10 Asset scripts not found in the store and also not on the disk: Request to file /root/scripts denied. Please allow it by setting config { "extensions": { "assets": { "allowedFiles": "**/*.*" } } } Error: Asset scripts not found in the store and also not on the disk: Request to file /root/scripts denied. Please allow it by setting config { "extensions": { "assets": { "allowedFiles": "**/*.*" } } }
at readAsset (/root/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T19:18:49.205Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:20:36.763Z - error: Rendering request 12 finished with error in 53 ms
2021-01-06T19:20:36.767Z - error: Error when processing render request 12 Failed to launch chrome!
/root/node_modules/puppeteer/.local-chromium/linux-706915/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
Error: Failed to launch chrome!
/root/node_modules/puppeteer/.local-chromium/linux-706915/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
at onClose (/root/node_modules/puppeteer/lib/Launcher.js:348:14)
at Interface.helper.addEventListener (/root/node_modules/puppeteer/lib/Launcher.js:337:50)
at emitNone (events.js:111:20)
at Interface.emit (events.js:208:7)
at Interface.close (readline.js:368:8)
at Socket.onend (readline.js:147:10)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
2021-01-06T19:20:36.768Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:22:56.946Z - error: Rendering request 13 finished with error in 345 ms
2021-01-06T19:22:56.947Z - error: Error when processing render request 13 Failed to launch chrome!
[0106/192256.936811:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
Error: Failed to launch chrome!
[0106/192256.936811:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
at onClose (/root/node_modules/puppeteer/lib/Launcher.js:348:14)
at Interface.helper.addEventListener (/root/node_modules/puppeteer/lib/Launcher.js:337:50)
at emitNone (events.js:111:20)
at Interface.emit (events.js:208:7)
at Interface.close (readline.js:368:8)
at Socket.onend (readline.js:147:10)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
2021-01-06T19:22:56.947Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:25:14.691Z - error: Rendering request 2 finished with error in 113 ms
2021-01-06T19:25:14.693Z - error: Error when processing render request 2 Failed to launch chrome!
[0106/192514.677982:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
Error: Failed to launch chrome!
[0106/192514.677982:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
at onClose (/root/node_modules/puppeteer/lib/Launcher.js:348:14)
at Interface.helper.addEventListener (/root/node_modules/puppeteer/lib/Launcher.js:337:50)
at emitNone (events.js:111:20)
at Interface.emit (events.js:208:7)
at Interface.close (readline.js:368:8)
at Socket.onend (readline.js:147:10)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
2021-01-06T19:25:14.693Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:26:31.588Z - error: Rendering request 1 finished with error in 329 ms
2021-01-06T19:26:31.590Z - error: Error when processing render request 1 Failed to launch chrome!
[0106/192631.574641:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
Error: Failed to launch chrome!
[0106/192631.574641:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
at onClose (/root/node_modules/puppeteer/lib/Launcher.js:348:14)
at Interface.helper.addEventListener (/root/node_modules/puppeteer/lib/Launcher.js:337:50)
at emitNone (events.js:111:20)
at Interface.emit (events.js:208:7)
at Interface.close (readline.js:368:8)
at Socket.onend (readline.js:147:10)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
2021-01-06T19:26:31.593Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:26:36.527Z - error: Rendering request 2 finished with error in 99 ms
2021-01-06T19:26:36.528Z - error: Error when processing render request 2 Failed to launch chrome!
[0106/192636.521061:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
Error: Failed to launch chrome!
[0106/192636.521061:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
at onClose (/root/node_modules/puppeteer/lib/Launcher.js:348:14)
at Interface.helper.addEventListener (/root/node_modules/puppeteer/lib/Launcher.js:337:50)
at emitNone (events.js:111:20)
at Interface.emit (events.js:208:7)
at Interface.close (readline.js:368:8)
at Socket.onend (readline.js:147:10)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
2021-01-06T19:26:36.529Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:29:53.131Z - error: Rendering request 3 finished with error in 610 ms
2021-01-06T19:29:53.137Z - error: Error when processing render request 3 Failed to launch chrome!
[0106/192953.117926:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
Error: Failed to launch chrome!
[0106/192953.117926:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
at onClose (/root/node_modules/puppeteer/lib/Launcher.js:348:14)
at Interface.helper.addEventListener (/root/node_modules/puppeteer/lib/Launcher.js:337:50)
at emitNone (events.js:111:20)
at Interface.emit (events.js:208:7)
at Interface.close (readline.js:368:8)
at Socket.onend (readline.js:147:10)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
2021-01-06T19:29:53.139Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T19:31:57.508Z - error: Rendering request 1 finished with error in 761 ms
2021-01-06T19:31:57.511Z - error: Error when processing render request 1 Failed to launch chrome!
[0106/193157.490172:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
Error: Failed to launch chrome!
[0106/193157.490172:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
at onClose (/root/node_modules/puppeteer/lib/Launcher.js:348:14)
at Interface.helper.addEventListener (/root/node_modules/puppeteer/lib/Launcher.js:337:50)
at emitNone (events.js:111:20)
at Interface.emit (events.js:208:7)
at Interface.close (readline.js:368:8)
at Socket.onend (readline.js:147:10)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
2021-01-06T19:31:57.514Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T22:08:23.758Z - error: Rendering request 7 finished with error in 17 ms
2021-01-06T22:08:23.760Z - error: Error when processing render request 7 Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css' Error: Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:08:23.763Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T22:08:27.466Z - error: Rendering request 8 finished with error in 7 ms
2021-01-06T22:08:27.468Z - error: Error when processing render request 8 Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css' Error: Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:08:27.469Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T22:09:19.000Z - error: Rendering request 11 finished with error in 9 ms
2021-01-06T22:09:19.001Z - error: Error when processing render request 11 Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css' Error: Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:09:19.002Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T22:09:49.936Z - error: Rendering request 13 finished with error in 26 ms
2021-01-06T22:09:49.937Z - error: Error when processing render request 13 Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css' Error: Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:09:49.939Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T22:10:15.008Z - error: Rendering request 15 finished with error in 13 ms
2021-01-06T22:10:15.009Z - error: Error when processing render request 15 Asset _globals/helpers.js not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/helpers.js. ENOENT: no such file or directory, open '/home/imex/_globals/helpers.js' Error: Asset _globals/helpers.js not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/helpers.js. ENOENT: no such file or directory, open '/home/imex/_globals/helpers.js'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:10:15.010Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T22:10:30.445Z - error: Rendering request 16 finished with error in 13 ms
2021-01-06T22:10:30.446Z - error: Error when processing render request 16 Asset _globals/helpers.js not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/helpers.js. ENOENT: no such file or directory, open '/home/imex/_globals/helpers.js' Error: Asset _globals/helpers.js not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/helpers.js. ENOENT: no such file or directory, open '/home/imex/_globals/helpers.js'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:10:30.449Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T22:10:33.854Z - error: Rendering request 17 finished with error in 11 ms
2021-01-06T22:10:33.856Z - error: Error when processing render request 17 Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css' Error: Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:10:33.857Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T22:10:36.642Z - error: Rendering request 18 finished with error in 12 ms
2021-01-06T22:10:36.643Z - error: Error when processing render request 18 Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css' Error: Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:10:36.645Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T22:10:37.993Z - error: Rendering request 19 finished with error in 17 ms
2021-01-06T22:10:37.995Z - error: Error when processing render request 19 Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css' Error: Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:10:37.996Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T22:10:49.342Z - error: Rendering request 21 finished with error in 13 ms
2021-01-06T22:10:49.348Z - error: Error when processing render request 21 Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css' Error: Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:10:49.349Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T22:10:50.660Z - error: Rendering request 22 finished with error in 17 ms
2021-01-06T22:10:50.661Z - error: Error when processing render request 22 Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css' Error: Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:10:50.662Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T22:11:28.973Z - error: Rendering request 23 finished with error in 16 ms
2021-01-06T22:11:28.976Z - error: Error when processing render request 23 Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css' Error: Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:11:28.977Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation
2021-01-06T22:14:55.599Z - error: Rendering request 30 finished with error in 10 ms
2021-01-06T22:14:55.601Z - error: Error when processing render request 30 Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css' Error: Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:14:55.602Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation(clone)
2021-01-06T22:14:56.568Z - error: Rendering request 31 finished with error in 15 ms
2021-01-06T22:14:56.569Z - error: Error when processing render request 31 Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css' Error: Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:14:56.571Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation(clone)
2021-01-06T22:15:02.412Z - error: Rendering request 32 finished with error in 12 ms
2021-01-06T22:15:02.413Z - error: Error when processing render request 32 Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css' Error: Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:15:02.415Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation(clone)
2021-01-06T22:16:17.483Z - error: Rendering request 34 finished with error in 17 ms
2021-01-06T22:16:17.489Z - error: Error when processing render request 34 Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css' Error: Asset _globals/styles.css not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/styles.css. ENOENT: no such file or directory, open '/home/imex/_globals/styles.css'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:16:17.489Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation(clone)
2021-01-06T22:18:46.282Z - error: Rendering request 35 finished with error in 14 ms
2021-01-06T22:18:46.283Z - error: Error when processing render request 35 Asset _globals/helpers.js not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/helpers.js. ENOENT: no such file or directory, open '/home/imex/_globals/helpers.js' Error: Asset _globals/helpers.js not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/helpers.js. ENOENT: no such file or directory, open '/home/imex/_globals/helpers.js'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:18:46.285Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation(clone)
2021-01-06T22:18:52.109Z - error: Rendering request 36 finished with error in 12 ms
2021-01-06T22:18:52.110Z - error: Error when processing render request 36 Asset _globals/helpers.js not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/helpers.js. ENOENT: no such file or directory, open '/home/imex/_globals/helpers.js' Error: Asset _globals/helpers.js not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/helpers.js. ENOENT: no such file or directory, open '/home/imex/_globals/helpers.js'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:18:52.111Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation(clone)
2021-01-06T22:18:52.882Z - error: Rendering request 37 finished with error in 33 ms
2021-01-06T22:18:52.884Z - error: Error when processing render request 37 Asset _globals/helpers.js not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/helpers.js. ENOENT: no such file or directory, open '/home/imex/_globals/helpers.js' Error: Asset _globals/helpers.js not found in the store and also not on the disk: Unable to find or read file /home/imex/_globals/helpers.js. ENOENT: no such file or directory, open '/home/imex/_globals/helpers.js'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-06T22:18:52.885Z - error: Error during processing request at https://reports.bodyshop.app/api/report/appointment-confirmation(clone)
2021-01-07T00:11:09.228Z - error: uncaughtException: Cannot read property 'split' of undefined date=Thu Jan 07 2021 00:11:09 GMT+0000 (UTC), pid=10834, uid=1000, gid=1000, cwd=/home/imex, execPath=/home/imex/.nvm/versions/node/v8.11.3/bin/node, version=v8.11.3, argv=[/home/imex/.nvm/versions/node/v8.11.3/bin/node, /home/imex/.nvm/versions/node/v8.11.3/lib/node_modules/pm2/lib/ProcessContainerForkLegacy.js], rss=134836224, heapTotal=71106560, heapUsed=61470512, external=2032420, loadavg=[0, 0, 0], uptime=16225
TypeError: Cannot read property 'split' of undefined
at Server.reporter.express.redirectServer.http.createServer (/home/imex/node_modules/jsreport-express/lib/reporter.express.js:59:53)
at emitTwo (events.js:126:13)
at Server.emit (events.js:214:7)
at Server.<anonymous> (/home/imex/.nvm/versions/node/v8.11.3/lib/node_modules/pm2/node_modules/@pm2/io/build/main/metrics/httpMetrics.js:166:33)
at parserOnIncoming (_http_server.js:619:12)
at HTTPParser.parserOnHeadersComplete (_http_common.js:112:17)
2021-01-07T00:27:01.576Z - error: Error when processing OData GET: /odata/assets/$filter=name%20eq%20'estimate_detail.query' Error: Not Found
at Router.router.dispatch (/home/imex/node_modules/simple-odata-server/lib/router.js:73:17)
at ODataServer.handle (/home/imex/node_modules/simple-odata-server/lib/odataServer.js:64:15)
at app.use (/home/imex/node_modules/jsreport-express/lib/routes.js:24:47)
at Layer.handle [as handle_request] (/home/imex/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/home/imex/node_modules/express/lib/router/index.js:317:13)
at /home/imex/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/home/imex/node_modules/express/lib/router/index.js:335:12)
at next (/home/imex/node_modules/express/lib/router/index.js:275:10)
at reporter.authorization.authorizeRequest.then (/home/imex/node_modules/jsreport-authentication/lib/authentication.js:266:16)
at <anonymous>
2021-01-07T00:52:30.592Z - error: Rendering request 15 finished with error in 40 ms
2021-01-07T00:52:30.593Z - error: Error when processing render request 15 Asset /Kavia/kavia_header.html not found in the store and also not on the disk: Unable to find or read file /Kavia/kavia_header.html. ENOENT: no such file or directory, open '/Kavia/kavia_header.html' Error: Asset /Kavia/kavia_header.html not found in the store and also not on the disk: Unable to find or read file /Kavia/kavia_header.html. ENOENT: no such file or directory, open '/Kavia/kavia_header.html'
at readAsset (/home/imex/node_modules/jsreport-assets/lib/assets.js:232:15)
at <anonymous>
2021-01-07T00:52:30.593Z - error: Error during processing request at https://reports.bodyshop.app/api/report/estimate_detail
2021-01-07T04:50:24.417Z - error: uncaughtException: Cannot read property 'split' of undefined date=Thu Jan 07 2021 04:50:24 GMT+0000 (UTC), pid=11345, uid=1000, gid=1000, cwd=/home/imex, execPath=/home/imex/.nvm/versions/node/v8.11.3/bin/node, version=v8.11.3, argv=[/home/imex/.nvm/versions/node/v8.11.3/bin/node, /home/imex/.nvm/versions/node/v8.11.3/lib/node_modules/pm2/lib/ProcessContainerForkLegacy.js], rss=134262784, heapTotal=70057984, heapUsed=61962528, external=2504334, loadavg=[0.00244140625, 0.00048828125, 0], uptime=32980
TypeError: Cannot read property 'split' of undefined
at Server.reporter.express.redirectServer.http.createServer (/home/imex/node_modules/jsreport-express/lib/reporter.express.js:59:53)
at emitTwo (events.js:126:13)
at Server.emit (events.js:214:7)
at Server.<anonymous> (/home/imex/.nvm/versions/node/v8.11.3/lib/node_modules/pm2/node_modules/@pm2/io/build/main/metrics/httpMetrics.js:166:33)
at parserOnIncoming (_http_server.js:619:12)
at HTTPParser.parserOnHeadersComplete (_http_common.js:112:17)
2021-01-07T06:01:42.695Z - error: uncaughtException: Cannot read property 'split' of undefined date=Thu Jan 07 2021 06:01:42 GMT+0000 (UTC), pid=12929, uid=1000, gid=1000, cwd=/home/imex, execPath=/home/imex/.nvm/versions/node/v8.11.3/bin/node, version=v8.11.3, argv=[/home/imex/.nvm/versions/node/v8.11.3/bin/node, /home/imex/.nvm/versions/node/v8.11.3/lib/node_modules/pm2/lib/ProcessContainerForkLegacy.js], rss=139726848, heapTotal=103612416, heapUsed=68997864, external=793187, loadavg=[0.00146484375, 0.025390625, 0], uptime=37258
TypeError: Cannot read property 'split' of undefined
at Server.reporter.express.redirectServer.http.createServer (/home/imex/node_modules/jsreport-express/lib/reporter.express.js:59:53)
at emitTwo (events.js:126:13)
at Server.emit (events.js:214:7)
at Server.<anonymous> (/home/imex/.nvm/versions/node/v8.11.3/lib/node_modules/pm2/node_modules/@pm2/io/build/main/metrics/httpMetrics.js:166:33)
at parserOnIncoming (_http_server.js:619:12)
at HTTPParser.parserOnHeadersComplete (_http_common.js:112:17)
2021-01-07T12:20:05.575Z - error: uncaughtException: Cannot read property 'split' of undefined date=Thu Jan 07 2021 12:20:05 GMT+0000 (UTC), pid=13050, uid=1000, gid=1000, cwd=/home/imex, execPath=/home/imex/.nvm/versions/node/v8.11.3/bin/node, version=v8.11.3, argv=[/home/imex/.nvm/versions/node/v8.11.3/bin/node, /home/imex/.nvm/versions/node/v8.11.3/lib/node_modules/pm2/lib/ProcessContainerForkLegacy.js], rss=129638400, heapTotal=103088128, heapUsed=62987384, external=1658615, loadavg=[0, 0, 0], uptime=59961
TypeError: Cannot read property 'split' of undefined
at Server.reporter.express.redirectServer.http.createServer (/home/imex/node_modules/jsreport-express/lib/reporter.express.js:59:53)
at emitTwo (events.js:126:13)
at Server.emit (events.js:214:7)
at Server.<anonymous> (/home/imex/.nvm/versions/node/v8.11.3/lib/node_modules/pm2/node_modules/@pm2/io/build/main/metrics/httpMetrics.js:166:33)
at parserOnIncoming (_http_server.js:619:12)
at HTTPParser.parserOnHeadersComplete (_http_common.js:112:17)
2021-01-07T13:15:41.587Z - error: uncaughtException: Cannot read property 'split' of undefined date=Thu Jan 07 2021 13:15:41 GMT+0000 (UTC), pid=24409, uid=1000, gid=1000, cwd=/home/imex, execPath=/home/imex/.nvm/versions/node/v8.11.3/bin/node, version=v8.11.3, argv=[/home/imex/.nvm/versions/node/v8.11.3/bin/node, /home/imex/.nvm/versions/node/v8.11.3/lib/node_modules/pm2/lib/ProcessContainerForkLegacy.js], rss=134336512, heapTotal=101515264, heapUsed=64572744, external=478275, loadavg=[0, 0.01611328125, 0], uptime=63297
TypeError: Cannot read property 'split' of undefined
at Server.reporter.express.redirectServer.http.createServer (/home/imex/node_modules/jsreport-express/lib/reporter.express.js:59:53)
at emitTwo (events.js:126:13)
at Server.emit (events.js:214:7)
at Server.<anonymous> (/home/imex/.nvm/versions/node/v8.11.3/lib/node_modules/pm2/node_modules/@pm2/io/build/main/metrics/httpMetrics.js:166:33)
at parserOnIncoming (_http_server.js:619:12)
at HTTPParser.parserOnHeadersComplete (_http_common.js:112:17)
2021-01-07T14:38:35.885Z - error: uncaughtException: Cannot read property 'split' of undefined date=Thu Jan 07 2021 14:38:35 GMT+0000 (UTC), pid=24479, uid=1000, gid=1000, cwd=/home/imex, execPath=/home/imex/.nvm/versions/node/v8.11.3/bin/node, version=v8.11.3, argv=[/home/imex/.nvm/versions/node/v8.11.3/bin/node, /home/imex/.nvm/versions/node/v8.11.3/lib/node_modules/pm2/lib/ProcessContainerForkLegacy.js], rss=113201152, heapTotal=78446592, heapUsed=53749096, external=726105, loadavg=[0.001953125, 0.0166015625, 0], uptime=68271
TypeError: Cannot read property 'split' of undefined
at Server.reporter.express.redirectServer.http.createServer (/home/imex/node_modules/jsreport-express/lib/reporter.express.js:59:53)
at emitTwo (events.js:126:13)
at Server.emit (events.js:214:7)
at Server.<anonymous> (/home/imex/.nvm/versions/node/v8.11.3/lib/node_modules/pm2/node_modules/@pm2/io/build/main/metrics/httpMetrics.js:166:33)
at parserOnIncoming (_http_server.js:619:12)
at HTTPParser.parserOnHeadersComplete (_http_common.js:112:17)
2021-01-07T17:30:51.446Z - error: Error in authorization server request: timeout of 6000ms exceeded
2021-01-07T17:30:51.449Z - error: Error during processing request at https://reports.bodyshop.app/odata/assets?$filter=name%20eq%20%27estimate_detail.query%27, details: timeout of 6000ms exceeded, stack: Error: timeout of 6000ms exceeded
at createError (/home/imex/node_modules/axios/lib/core/createError.js:16:15)
at ClientRequest.handleRequestTimeout (/home/imex/node_modules/axios/lib/adapters/http.js:256:16)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:111:20)
at ClientRequest.emit (events.js:208:7)
at Socket.emitTimeout (_http_client.js:706:34)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:106:13)
at Socket.emit (events.js:208:7)
at Socket._onTimeout (net.js:410:8)
at ontimeout (timers.js:498:11)
at tryOnTimeout (timers.js:323:5)
at Timer.listOnTimeout (timers.js:290:5)
2021-01-07T17:35:02.398Z - error: Authorization server has sent an invalid status code (403) in response, token assumed as invalid
2021-01-07T17:36:16.794Z - error: Authorization server has sent an invalid status code (403) in response, token assumed as invalid
2021-01-07T17:36:48.572Z - error: Authorization server has sent an invalid status code (403) in response, token assumed as invalid
2021-01-07T17:38:35.128Z - error: Authorization server has no "username" field in its response, token assumed as invalid
2021-01-07T17:38:36.607Z - error: uncaughtException: Cannot read property 'split' of undefined date=Thu Jan 07 2021 17:38:36 GMT+0000 (UTC), pid=27452, uid=1000, gid=1000, cwd=/home/imex, execPath=/home/imex/.nvm/versions/node/v8.11.3/bin/node, version=v8.11.3, argv=[/home/imex/.nvm/versions/node/v8.11.3/bin/node, /home/imex/.nvm/versions/node/v8.11.3/lib/node_modules/pm2/lib/ProcessContainerForkLegacy.js], rss=123133952, heapTotal=62758912, heapUsed=56893952, external=1486040, loadavg=[0.04296875, 0.05126953125, 0.07763671875], uptime=79072
TypeError: Cannot read property 'split' of undefined
at Server.reporter.express.redirectServer.http.createServer (/home/imex/node_modules/jsreport-express/lib/reporter.express.js:59:53)
at emitTwo (events.js:126:13)
at Server.emit (events.js:214:7)
at Server.<anonymous> (/home/imex/.nvm/versions/node/v8.11.3/lib/node_modules/pm2/node_modules/@pm2/io/build/main/metrics/httpMetrics.js:166:33)
at parserOnIncoming (_http_server.js:619:12)
at HTTPParser.parserOnHeadersComplete (_http_common.js:112:17)
2021-01-07T17:38:54.133Z - error: Authorization server has no "username" field in its response, token assumed as invalid
2021-01-07T17:39:19.153Z - error: username "patrick@imex.dev" returned from authorization server is not a jsreport user
2021-01-07T17:39:37.869Z - error: Authorization server has sent an invalid status code (403) in response, token assumed as invalid
2021-01-07T17:40:01.092Z - error: Authorization server has sent an invalid status code (403) in response, token assumed as invalid
2021-01-07T17:40:22.192Z - error: Authorization server has no "username" field in its response, token assumed as invalid
2021-01-07T17:40:24.945Z - error: Authorization server has no "username" field in its response, token assumed as invalid
2021-01-07T17:40:26.396Z - error: Authorization server has no "username" field in its response, token assumed as invalid
2021-01-07T17:40:27.743Z - error: Authorization server has no "username" field in its response, token assumed as invalid

10848
jsreport/logs/reporter.log Normal file

File diff suppressed because it is too large Load Diff

5922
jsreport/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

17
jsreport/package.json Normal file
View File

@@ -0,0 +1,17 @@
{
"name": "jsreport-server",
"main": "server.js",
"scripts": {
"start": "node server",
"jsreport": "jsreport"
},
"jsreport": {
"entryPoint": "server.js"
},
"dependencies": {
"jsreport": "^2.11.0"
},
"puppeteerArgs": [
"--no-sandbox"
]
}

14
jsreport/server.js Normal file
View File

@@ -0,0 +1,14 @@
const jsreport = require('jsreport')()
if (process.env.JSREPORT_CLI) {
// export jsreport instance to make it possible to use jsreport-cli
module.exports = jsreport
} else {
jsreport.init().then(() => {
// running
}).catch((e) => {
// error during startup
console.error(e.stack)
process.exit(1)
})
}