feathersjs-ecosystem / feathers-sync

Synchronize service events between Feathers application instances
MIT License
222 stars 41 forks source link

Node Crashes on user service `patch` or `put` requests #63

Closed codingfriend1 closed 7 years ago

codingfriend1 commented 7 years ago

Steps to reproduce

Make a put or patch request to the users collection. Even without any hooks running. This could be a problem with feathers-authenticate.

Problem: Node crashed with this error

/Users/myuser/Desktop/POCS/Feathers-Vue/node_modules/mongodb/lib/utils.js:123 process.nextTick(function() { throw err; }); ^

TypeError: Cannot read property 'app' of undefined at Object.updateEntity (/Users/myuser/Desktop/POCS/Feathers-Vue/node_modules/feathers-authentication/lib/socket/update-entity.js:4:17) at emitOne (events.js:101:20) at Object.emit [as _emit] (events.js:189:7) at Channel. (/Users/myuser/Desktop/POCS/Feathers-Vue/node_modules/feathers-sync/src/mongodb.js:23:27) at emitOne (events.js:96:13) at Channel.emit (events.js:189:7) at Channel. (/Users/myuser/Desktop/POCS/Feathers-Vue/node_modules/mubsub/lib/channel.js:169:22) at /Users/myuser/Desktop/POCS/Feathers-Vue/node_modules/mubsub/lib/channel.js:245:18 at handleCallback (/Users/myuser/Desktop/POCS/Feathers-Vue/node_modules/mongodb/lib/utils.js:120:56) at /Users/myuser/Desktop/POCS/Feathers-Vue/node_modules/mongodb/lib/cursor.js:682:5 at handleCallback (/Users/myuser/Desktop/POCS/Feathers-Vue/node_modules/mongodb-core/lib/cursor.js:171:5) at nextFunction (/Users/myuser/Desktop/POCS/Feathers-Vue/node_modules/mongodb-core/lib/cursor.js:682:5) at /Users/myuser/Desktop/POCS/Feathers-Vue/node_modules/mongodb-core/lib/cursor.js:640:9 at queryCallback (/Users/myuser/Desktop/POCS/Feathers-Vue/node_modules/mongodb-core/lib/wireprotocol/3_2_support.js:210:5) at /Users/myuser/Desktop/POCS/Feathers-Vue/node_modules/mongodb-core/lib/connection/pool.js:461:18 at _combinedTickCallback (internal/process/next_tick.js:67:7) at process._tickCallback (internal/process/next_tick.js:98:9)

System configuration

Mac Node: v7.6.0 "feathers-authentication": "^1.2.4" "feathers-sync": "^0.1.3"

codingfriend1 commented 7 years ago

This seems to have been a bug with feathers-authentication that was fixed by version 1.2.7