sdelements / lets-chat

Self-hosted chat app for small teams
http://sdelements.github.io/lets-chat
MIT License
9.76k stars 1.58k forks source link

Upgrade from 0.4.5 did something wrong #715

Closed mmeinert closed 7 years ago

mmeinert commented 7 years ago

Since IOS 10 update, all my Apple users complains of not being able to list and join rooms. It's not only related to Safari browser but also with Chrome.

App accepts/rejects user's credentials then screen load in a loop. All those users hadn't problems prior this update.

mmeinert commented 7 years ago

I was still using 0.4.5... I synced with master and now it's better but not good enough. Anytime a user try to join a password protected room, the server crash with this dump

events.js:154 throw er; // Unhandled 'error' event

Error: Illegal argument undefined at module.exports (/var/local/logbook/node_modules/md5/md5.js:152:13) at model.<anonymous> (/var/local/logbook/app/models/user.js:117:12) at VirtualType.applyGetters (/var/local/logbook/node_modules/mongoose/lib/virtualtype.js:77:25) at model.Document.get (/var/local/logbook/node_modules/mongoose/lib/document.js:904:18) at applyGetters (/var/local/logbook/node_modules/mongoose/lib/document.js:2262:35) at model.Document.$toObject (/var/local/logbook/node_modules/mongoose/lib/document.js:2044:5) at model.Document.toObject (/var/local/logbook/node_modules/mongoose/lib/document.js:2197:15) at clone (/var/local/logbook/node_modules/mongoose/lib/utils.js:252:16) at cloneArray (/var/local/logbook/node_modules/mongoose/lib/utils.js:334:14) at clone (/var/local/logbook/node_modules/mongoose/lib/utils.js:245:12) at cloneObject (/var/local/logbook/node_modules/mongoose/lib/utils.js:315:13) at clone (/var/local/logbook/node_modules/mongoose/lib/utils.js:258:16) at model.Document.$toObject (/var/local/logbook/node_modules/mongoose/lib/document.js:2032:13) at model.Document.toObject (/var/local/logbook/node_modules/mongoose/lib/document.js:2197:15) at model.toJSON (/var/local/logbook/app/models/room.js:177:21) at /var/local/logbook/app/controllers/rooms.js:277:31 at /var/local/logbook/app/core/rooms.js:55:13 at /var/local/logbook/app/models/room.js:163:13 at /var/local/logbook/node_modules/mongoose/lib/model.js:3340:16 at /var/local/logbook/node_modules/mongoose/lib/document.js:1944:18 at _combinedTickCallback (internal/process/next_tick.js:67:7) at process._tickCallback (internal/process/next_tick.js:98:9)

When the service is restarted the same user can join directly, just before it crashed he was added to the participants room's list...

I did a npm update and I don't understand, please help

hhaidar commented 7 years ago

@mmeinert it should be fixed in master now, thank you for bringing this up!

mmeinert commented 7 years ago

Thank you @hhaidar