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

TypeError: Cannot call method 'addListener' of undefined #24

Closed
rsms opened this issue Feb 2, 2011 · 4 comments
Closed

TypeError: Cannot call method 'addListener' of undefined #24

rsms opened this issue Feb 2, 2011 · 4 comments

Comments

@rsms
Copy link
Contributor

rsms commented Feb 2, 2011

On node v0.3.8-pre:

node.js:116
        throw e; // process.nextTick error, or 'error' event on first tick
        ^
TypeError: Cannot call method 'addListener' of undefined
    at [object Object]._performSecureRequest (/usr/local/lib/node/.npm/oauth/0.8.4/package/lib/oauth.js:306:20)
    at [object Object].getOAuthRequestToken (/usr/local/lib/node/.npm/oauth/0.8.4/package/lib/oauth.js:390:8)
    at Object.<anonymous> (term.ie.oauth-PLAINTEXT.js)
    at Module._compile (module.js:287:26)
    at Object..js (module.js:293:10)
    at Module.load (module.js:219:31)
    at Function._load (module.js:186:10)
    at Array.<anonymous> (module.js:307:10)
    at EventEmitter._tickCallback (node.js:108:26)

This is the result of running examples/term.ie.oauth-PLAINTEXT.js

@rsms
Copy link
Contributor Author

rsms commented Feb 2, 2011

Here's a patch which fixes this issue (oauth.js and the example, not oauth2.js):

https://gist.github.com/94e954f8bb6d637c15f7 raw

@ciaranj
Copy link
Owner

ciaranj commented Feb 2, 2011

Thank you I'm planning on making a 0.4 compatability branch tonight, I'll pull this in as the starting place :)

@rsms
Copy link
Contributor Author

rsms commented Feb 2, 2011

Nice. Right now I'm AFK until later tonight. I've patched it further as most of the http stuff has changed. Will send over those patches asap.

@ciaranj
Copy link
Owner

ciaranj commented Feb 2, 2011

Fixed in 5041ca1 , the tests all now run through to green now again (on 0.3.8) I'll probably introduce a breaking API change once 0.4 is released to leverage the new streaming style of coding (assuming it is suitable!)

This issue was closed.
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