Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't seem to work with node v6.4.0 #19

Closed
nschoe opened this issue Aug 26, 2016 · 6 comments
Closed

Doesn't seem to work with node v6.4.0 #19

nschoe opened this issue Aug 26, 2016 · 6 comments

Comments

@nschoe
Copy link

nschoe commented Aug 26, 2016

So I've updated node to 6.4.0 and the application was crashing severely and my handler for process.on ('uncaughtException') was triggered. It is passed an err argument which I displayed on the console.

Weirdly, what I got on the console was: TypeError: undefined is not a function. That's it, no stack, no code, nothing.
The err object was an instance or Error, but that's all. I could no get any information from where the bloody error came from.

We kept stuck on this for 3 entire days ^^

We have finally managed to isolate the problem (magically really because we had about nowhere to begin) to a call Logger.notice (...). So we went up to our Logger module, and finally narrowed it down to a call Syslog.log(...) where Syslog is require ('modern-syslog').

I haven't had time to properly inspect the code, but guys, somewhere you must be throwing a string as an error or something like this, because there was no stack and it killed me.

Bonus point: I stumbled on the README.md which says "Note that syslog functions cannot fail, and neither throw errors, nor callback". I have to admit I might have called you names...

Anyway, you might to take a look into that, I suspect that this happens when you call code inside the core.cc file, but again, not sure, I haven't had time to inspect further.

@johnspackman
Copy link

I've just had exactly the same experience; this code is all that is required to reproduce the problem:

var Syslog = require('modern-syslog');

Syslog.log(Syslog.LOG_WARNING, "hello");

Output is:

$ node test/test-syslog.js
undefined:0



TypeError: undefined is not a function

This happens on 32-bit node v6.5.0 running on Debian 8, using modern-syslog 1.1.3 installed via npm.

@johnspackman
Copy link

The fix is already complete one month ago in #17 but not released on npm - please release a new version, this just cost me 8 hours of trial and error to track down the cause

@msimerson
Copy link
Contributor

+1, please cut a new release for node v6 compatibility.

@nschoe
Copy link
Author

nschoe commented Sep 8, 2016

I'm glad I'm not the only one.
Seems weird they don't respond, I hope they will npm publish soon.

@johnspackman
Copy link

I found that to use the plugin direct from git instead of the npm one, change the package.json to this:

"dependencies": {
    "modern-syslog": "git+https://github.com/strongloop/modern-syslog.git"

@rmg
Copy link
Member

rmg commented Mar 20, 2017

Closing, assuming this was indeed fixed by #17 which was part of v1.1.4 on Sept. 30.

@nschoe please re-open if this is still a problem for you.

@rmg rmg closed this as completed Mar 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants