Error when Running node index.js
Closed this issue · 5 comments
Hello,
I get this error whenever I run "node index.js". Can you provide any insight? And please let me know if you need more information.
PS D:\butler-cw-master> node index.js
2019-03-29T12:40:07.301Z info: Starting Qlik Sense cache warmer.
2019-03-29T12:40:10.337Z verbose: Starting loading of appid a099cb6b-53fb-4e70-b213-2832073b0c02
(node:7508) UnhandledPromiseRejectionWarning: TypeError: Converting circular structure to JSON
at JSON.stringify ()
at loadAppIntoCache (D:\butler-cw-master\index.js:211:57)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:7508) 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:7508) [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.
I am getting the same error. Is there any way to resolve this?
I've tried,. but failed to reproduce this error.
I can only suggest you download the latest version from https://github.com/ptarmiganlabs/butler-cw/releases, a new version 2.2.0 was for example released today.
I however don't think that version includes anything that would fix the issue you are seeing.
I'd love to help, but you then have to provide as complete information as possible about your setup, versions of all software involved etc.
If something looks funky in your setup I'll of course let you know, but facts remain: The code works reliably here, and has been stable for at least a couple of years now. But there are of course a lot of variables that can and will affect things on your end.
Hi @mountaindude ,
Thanks for your response. I was able to resolve this error by passing the root certfificate as well for authentication while creating the engima session which seems to have been commented out in the code.
const configEnigma = {
schema,
url: SenseUtilities.buildUrl(urlConfig),
createSocket: url =>
new WebSocket(url, {
ca: rootCert, // added root certificate here
key: client_key,
cert: client,
headers: {
'X-Qlik-User': 'UserDirectory=Internal;UserId=sa_repository',
},
rejectUnauthorized: false,
}),
};
Very interesting!
I don't have a good explanation for this.
On my end things run just fine without referring to the root cert. Maybe I've imported into the keychain here on my development computer at some point... That could actually explain it.
Anyway - it's for sure a good idea to include the root cert, I'll update the code accordingly.
Cheers!
This issue was resolved in 2.2.1
https://github.com/ptarmiganlabs/butler-cw/releases/tag/v2.2.1