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

Cannot read property 'user' of undefined - lib\socket\update-entity.js:26:104 #529

jerfowler opened this Issue Jun 19, 2017 · 1 comment


None yet
2 participants
Copy link

jerfowler commented Jun 19, 2017

Getting the following error:

error: Unhandled Rejection at: Promise Promise {
TypeError: Cannot read property 'user' of undefined
at local-path\node_modules\feathers-authentication\lib\socket\update-entity.js:26:104
at Array.forEach (native)
at Object.updateEntity (local-path\node_modules\feathers-authentication\lib\socket\update-entity.js:24:26)

Looks to be an issue when assigning socketEntity:


Object.keys(socketMap).forEach(socketId => {
    const socket = socketMap[socketId];
    const socketEntity = (socket.feathers && socket.feathers[authConfig.entity]) || socket.request.feathers[authConfig.entity];

I would change that to:

Object.keys(socketMap).forEach(socketId => {
    const socket = socketMap[socketId];
    const feathers = socket.feathers || socket.request.feathers;
    const socketEntity = feathers && feathers[authConfig.entity];

I'll try and submit a pull request... if I can find the time!


This comment has been minimized.

Copy link

TimIsOverpowered commented Jun 20, 2017

I can confirm that I get this error every patch that is sent out. Everything updates, but the error goes through.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.