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 'log' of undefined #320

Closed
rationalthug opened this issue Aug 10, 2016 · 5 comments
Closed

TypeError: Cannot read property 'log' of undefined #320

rationalthug opened this issue Aug 10, 2016 · 5 comments

Comments

@rationalthug
Copy link

After I launch a deepstream server using the node api, I use

server.on('started', launchClient)

to start a client running in the same node process, where launchClient is a function. When the client tries to connect to the server, I can see the connection being received in the log:

INCOMING_CONNECTION | from 127.0.0.1:51407 via tcp

But immediately after, I get the following error:

TypeError: Cannot read property 'log' of undefined at HttpAuthenticationRequest._onComplete (/node_modules/deepstream.io/src/authentication/http-authentication-request.js:51:25)

At first, I thought this might be due to a logger configuration error, but that doesn't seem to be the case. Should I be starting the client in it's own process?

@rationalthug
Copy link
Author

Ok, actually launching the client in a separate process does NOT solve the issue. I don't see any other required config settings in the docs. What am I missing?

@rationalthug
Copy link
Author

rationalthug commented Aug 10, 2016

Found the bug in authentication/http-authentication-request.js.

The calls to the logger in _onComplete should be calling this._logger.log instead of this._settings.logger.log Will send a pull request to fix.

@yasserf
Copy link
Contributor

yasserf commented Aug 10, 2016

Good find!

If you don't mind, could u agree to the cla first?

https://deepstream.io/info/community/cla/

Thanks!

@rationalthug
Copy link
Author

Sure thing, just submitted the cla.

@yasserf
Copy link
Contributor

yasserf commented Aug 12, 2016

got it, cheers

jaime-ez pushed a commit to jaime-ez/deepstream.io that referenced this issue Feb 20, 2024
…nt-contrib-uglify-2.1.0

Update grunt-contrib-uglify to version 2.1.0 🚀
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

3 participants