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 read property 'url' of null #2

Open
suresh1271 opened this issue Sep 15, 2017 · 1 comment
Open

TypeError: Cannot read property 'url' of null #2

suresh1271 opened this issue Sep 15, 2017 · 1 comment

Comments

@suresh1271
Copy link

suresh1271 commented Sep 15, 2017

Hi @rmcdaniel , I tried your code in Runkit.com and working fine. But when I try to run in my local machine I am facing the below error. Can you please give me suitable solution for this below error.

**D:\app\nodejs\New folder\node-slackbot-master\node_modules\node-slackbot\lib\sla
ckbot.js:93
self.ws = new ws(data.url);
^

TypeError: Cannot read property 'url' of null
at D:\app\nodejs\New folder\node-slackbot-master\node_modules\node-slackbot
lib\slackbot.js:93:28
at ClientRequest. (D:\app\nodejs\New folder\node-slackbot-master
node_modules\node-slackbot\lib\slackbot.js:55:14)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at TLSSocket.socketErrorListener (_http_client.js:310:9)
at emitOne (events.js:96:13)
at TLSSocket.emit (events.js:188:7)
at emitErrorNT (net.js:1277:8)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)**

@ghost
Copy link

ghost commented Sep 4, 2018

Yes I got this error too sometime. I think this is because this line was triggered by https://github.com/rmcdaniel/node-slackbot/blob/master/lib/slackbot.js#L44 or https://github.com/rmcdaniel/node-slackbot/blob/master/lib/slackbot.js#L55. And at this line https://github.com/rmcdaniel/node-slackbot/blob/master/lib/slackbot.js#L92 cb is called without data fulfilled then we got error. So before we go into https://github.com/rmcdaniel/node-slackbot/blob/master/lib/slackbot.js#L93 we should check error.

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

1 participant