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 set property 'body' of undefined #12

Closed
wiktorschmidt opened this issue Aug 19, 2011 · 5 comments
Closed

TypeError: Cannot set property 'body' of undefined #12

wiktorschmidt opened this issue Aug 19, 2011 · 5 comments

Comments

@wiktorschmidt
Copy link

$ node test/simple.js
http://jamendo.com/
http://tedxparis.com

/[...]/lib/crawler.js:74
response.body = body;
^
TypeError: Cannot set property 'body' of undefined
at Object.callback (/[...]/crawler/lib/crawler.js:74:39)
at Request.callback (/[...]/crawler/lib/crawler.js:70:43)
at Request. (/[...]/request/main.js:154:67)
at Request.emit (events.js:64:17)
at Object._onTimeout (/[...]/crawler/node_modules/request/main.js:320:19)
at Timer.callback (timers.js:83:39)

@wiktorschmidt
Copy link
Author

After doing

npm uninstall crawler
git clone git://github.com/joshfire/node-crawler.git
npm install node-crawler/

it changes to:
response.uri = q.uri;
^
TypeError: Cannot set property 'uri' of undefined

@evilpacket
Copy link

I get the same results, Using node version v0.4.11

@Jellyfrog
Copy link
Contributor

@dklanac
Copy link

dklanac commented Jan 26, 2012

I was able to google.com to load after seeing in the above issue 7 link that it was timing out too quickly when set to 60 _milli_seconds. I upped it to a much higher value and could successfully execute simple.js.

@sylvinus
Copy link
Collaborator

Fixed in 0.2.0 update, thanks!

Timeout parameter was documented to be in milliseconds and I added a timeout unit test.

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

5 participants