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

aws-sdk doesn't load from inside a node.js domain #75

Closed
vthunder opened this issue Mar 13, 2013 · 4 comments
Closed

aws-sdk doesn't load from inside a node.js domain #75

vthunder opened this issue Mar 13, 2013 · 4 comments

Comments

@vthunder
Copy link

While debugging issue #74, I tried to use the new (experimental) domains feature. Setting up a domain for the request works, but I also tried putting my entire server (including all the require()s--except require('domain') itself, of course) in a domain. That causes this error:

Error: addListener only takes instances of Function
at Request.EventEmitter.addListener (events.js:140:11)
at Object.AWS.EventEmitter.AWS.util.inherit.addListeners (/Users/dmills/Documents/Code/openhome/node_modules/aws-sdk/lib/event_emitter.js:63:14)
/lib/client.js:47:10)

Let me know if you want the full stack trace, I don't want to puke all over the bug report.

@lsegal
Copy link
Contributor

lsegal commented Mar 13, 2013

The full stack trace would actually be more useful. Are you calling something explicit on the request object? Requests should no longer extend from node's EventEmitter, as we are moving to more of a state machine based approach that can support asynchronous event transitions (something EventEmitter does not support).

Unfortunately this means that we currently do not support domains in the AWS.Request object. If you think it's useful to have this support, it's something we can look into adding, but without a stable domains API, it might not happen right away. Fortunately Node.js v0.10.0 bumped the API from experimental to unstable, so it looks like things are moving in the right direction for us to have a locked down API-- one that we would happily support.

@lsegal lsegal closed this as completed in 501a678 Mar 26, 2013
@lsegal
Copy link
Contributor

lsegal commented Mar 26, 2013

@vthunder thanks for the report. This latest change should add (basic) support for the new (now unstable) domain API in Node. This API might change in the future, so our support may break-- it also may not yet be complete. Test it out and let us know how it works for you.

@vthunder
Copy link
Author

vthunder commented May 8, 2013

Thanks! Apologies - I didn't pay attention to my Github notifications for a couple of months.

@lock
Copy link

lock bot commented Sep 30, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants