Hmtl-to-xlsx reports working on mac then git cloned to Ubuntu do not work
-
As in title, I have a couple reports that work on my mac that when cloned to Ubuntu do not work.
If important - I did have to delete some text in my settings file at Ubuntu after cloning for the reporter to initialize. Somehow it had text like "<<<<HEAD..." in it. So I deleted that stuff and then it did initialize.I have one HTML report that runs fine so it seems like maybe html-to-xmls is my problem. Both non-working reports use that recipe.
The error one of the reports throws is:
2021-08-19T14:11:01.977Z - debug: Executing recipe html-to-xlsx 2021-08-19T14:11:01.977Z - info: html-to-xlsx generation is starting 2021-08-19T14:11:04.991Z - info: html-to-xlsx generation was finished 2021-08-19T14:11:05.523Z - debug: Executing script anonymous using http-server strategy (node:13599) UnhandledPromiseRejectionWarning: [object Object] (node:13599) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:13599) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
The other is :
2021-08-19T14:30:52.364Z - debug: Executing recipe html 2021-08-19T14:30:52.364Z - debug: Executing script anonymous using http-server strategy (node:13599) UnhandledPromiseRejectionWarning: [object Object] (node:13599) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
I believe I followed the Ubuntu installation instructions exactly. This Ubuntu version is 18.04. I am cloning the /data folder only when I migrate.
Any advice?
Thank you
-
I see the following line in the log
2021-08-19T14:11:05.523Z - debug: Executing script anonymous using http-server strategy
It seems you send a script in your API request. It seems this fail. How does your API request looks like?
-
The unhandledRejection event is emitted whenever a promise rejection is not handled. "Rejection" is the canonical term for a promise reporting an error. As defined in ES6, a promise is a state machine representation of an asynchronous operation and can be in one of 3 states: "pending", "fulfilled", or "rejected". Somebody decided that JavaScript programmers couldn't be trusted with managing promise rejections properly and changed the HTML spec to require browsers to throw "unhandled promise rejection" errors if a rejected promise has no rejection handlers added before code returns to the event loop. The error usually happens in async await functions, and there’s an easy fix.
const functionName = async (arguments) => {
try {
// Your code here
} catch (error) {
// Handle rejection here
}
};