Closed anubra266 closed 3 years ago
Hello Anubra. Just installed and same issue for me
Thanks @simonhabran. What platform are you on? I'm on Ubuntu 20
Doing some investigation I think I found the source of this problem.
If you open the console (F12 for Firefox) and type a message, an error is raised:
Uncaught TypeError: message.owner is null
addMessage http://localhost:5000/media/dist/chat-90111456a06d8b27e1c3ea2e0f460141.js:735
And doing some debugging, it seems that message.owner
is indeed null
, but only when posting a message (the addMethod
is used when showing message history, and the owner is set accordingly).
I'll be doing more digging into this. Obviously, the owner is stored in Mongo, otherwise, they wouldn't appear. Somewhere along the line of passing the message to the callback the owner is not being set.
My only question: where is the callback for when a user posts a message? From there I can discover where the user is not being set.
Hi,
The issue is on app/core/messages.js
on line 44.
A quickfix would be to replace it with this:
User.findOne({'_id': message.owner}, function(err, user) {
Hi, thanks for the trick, but unfortunately file upload doesn't work either. Waiting forward for another fix :).
EDIT: just try this fix locally in app/core/files.js online 80 as well :
User.findOne({'_id': options.owner}, function(err, user) {
seems to work like a charm.
Cheers
The issue is on app/core/messages.js on line 44. A quickfix would be to replace it with this: User.findOne({'_id': message.owner}, function(err, user) {
@eusebiu-biroas Thanks. It is work for me.
Just cloned it, and can't find all those advanced features, such as password protected rooms. And I have to refresh page to see messages after i send them. It's not realtime, what's causing this, The response makes me pretty sure, this is not how everyone's copy is behaving