verdaccio: NewRelic Agent throwing errors after update to 3.3.0 version
Describe the bug NewRelic Agent throwing errors after update to 3.3.0 version. Error is following:
{"v":0,"level":50,"name":"newrelic","hostname":"5538dce32c23","pid":75,"time":"2018-08-01T14:20:12.118Z","msg":"Unable to serialize payload for method connect.","component":"remote_method","stack":"TypeError: this is not a Date object.\n at Object.valueOf (<anonymous>)\n at Object.[Symbol.toPrimitive] (<anonymous>)\n at Object.toJSON (<anonymous>)\n at JSON.stringify (<anonymous>)\n at stringify (/www/docker/node_modules/json-stringify-safe/stringify.js:5:15)\n at RemoteMethod.serialize (/www/docker/node_modules/newrelic/lib/collector/remote-method.js:42:15)\n at RemoteMethod.call [as invoke] (/www/docker/node_modules/newrelic/lib/collector/remote-method.js:64:8)\n at CollectorAPI._connect (/www/docker/node_modules/newrelic/lib/collector/api.js:186:21)\n at getEnvDict (/www/docker/node_modules/newrelic/lib/collector/api.js:178:10)\n at factMapCb (/www/docker/node_modules/newrelic/lib/collector/facts.js:67:12)","message":"this is not a Date object."}
As result - empty NewRelic logs
After some investigation
After some investigation in diffs: https://github.com/verdaccio/verdaccio/compare/v3.2.0...v3.3.0 I’ve found a PR https://github.com/verdaccio/verdaccio/pull/764. After that PR merge it breaks NewRelic logic.
It works well after the commit https://github.com/verdaccio/verdaccio/commit/825f5a57eaa04a895fbf9673481fcf647b0a0d68
But after the https://github.com/verdaccio/verdaccio/commit/29bb57ad5f5d762e8f1f4e3267f5bd11f8caa272 commit it is broken.
Screenshots

About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 17 (8 by maintainers)
Commits related to this issue
- fix: removes asciidoctor.js support (#884) — committed to verdaccio/verdaccio by ayusharma 6 years ago
- fix: removes asciidoctor.js support (#884) (#947) — committed to verdaccio/verdaccio by ayusharma 6 years ago
- fix: removes asciidoctor.js support (#884) (#947) — committed to verdaccio/verdaccio by ayusharma 6 years ago
Here you go:
The first one is a stdout logs (with enabled NewRelic’s debug logs level mode) on start of the verdaccio 3.2.0 server: 3.2.0-OK.txt
This one is with verdaccio 3.4.1 (errors are the same for version 3.3.0-3.4.1) 3.3.0-3.4.1-Errors.txt
I hope this could help you to find an issue and fix it as soon as possible.
Thanks.
One more thing, once you have some “fix”/“next” tagged version - I’m ready to debug this fix. Even a commit.
Also, I’ve tried to revert all changes related to https://github.com/verdaccio/verdaccio/commit/29bb57ad5f5d762e8f1f4e3267f5bd11f8caa272 commit - and with the latest version NewRelic goes back up to the regular work (without any issues)
Seams like there is some mismatch in types or something else once including “asciidoctor.js”: “1.5.6” package that breaks NewRelic agent logic.
Hi @aremishevsky !
I’m talking about provide a full example that prove is not working…maybe you can create a private repository or use codepen, code sandbox…whatever…
Without access to the new relic integration we cannot debug.
Sorry but I would prefer your full example.
Thank you!
@aremishevsky we have analyzed the log and the error seems to come from YOUR plugin. If the problem is due to the library conflict, as you said, we would like you to prove it to us… Please feel free to create a bug simulation and post the link here … Thanks!