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

Crash while trying to write out reason for uncaughtException #46

Open
jrgm opened this issue Mar 18, 2016 · 2 comments
Open

Crash while trying to write out reason for uncaughtException #46

jrgm opened this issue Mar 18, 2016 · 2 comments

Comments

@jrgm
Copy link

jrgm commented Mar 18, 2016

I noticed this in a logfile. I don't have steps to reproduce, but it did happen. I guess you need to check that e.stack at least exists, and if not then maybe just dump String(e) or something.

/data/fxa-auth-server/node_modules/mozlog/node_modules/intel/lib/record.js:24
      return e.stack.substr(e.stack.indexOf('\n'));
                                    ^
TypeError: Cannot call method 'indexOf' of undefined
    at Object.toString (/data/fxa-auth-server/node_modules/mozlog/node_modules/intel/lib/record.js:24:37)
    at String (<anonymous>)
    at HekaFormatter.hekaFormat [as format] (/data/fxa-auth-server/node_modules/mozlog/lib/format.js:94:24)
    at StreamHandler.format (/data/fxa-auth-server/node_modules/mozlog/node_modules/intel/lib/handlers/handler.js:52:28)
    at StreamHandler.streamEmit [as _emit] (/data/fxa-auth-server/node_modules/mozlog/node_modules/intel/lib/handlers/stream.js:21:27)
    at StreamHandler.emit (/data/fxa-auth-server/node_modules/mozlog/node_modules/intel/lib/handlers/handler.js:13:15)
    at Logger.handle (/data/fxa-auth-server/node_modules/mozlog/node_modules/intel/lib/logger.js:218:29)
    at Logger._log (/data/fxa-auth-server/node_modules/mozlog/node_modules/intel/lib/logger.js:249:20)
    at Logger.critical (/data/fxa-auth-server/node_modules/mozlog/node_modules/intel/lib/logger.js:81:19)
    at Logger.catchException (/data/fxa-auth-server/node_modules/mozlog/node_modules/intel/lib/logger.js:192:10)
    at process.emit (events.js:95:17)
    at process._fatalException (node.js:301:26)
@jrgm
Copy link
Author

jrgm commented Mar 18, 2016

Ah, ok. I worked out how to duplicate this in fxa stage. If the auth_db server is not up, then auth_server and email bouncer when they start get an error with no stack EndpointError: 127.0.0.1:8001 error: connect ECONNREFUSED.

Don't know why it has no stack, but it doesn't.

@seanmonstar
Copy link
Owner

/me grumbles something about throwing Strings

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

2 participants