WideChat / Rocket.Chat

Have your own Slack like online chat, built with Meteor.
https://rocket.chat/
Other
3 stars 1 forks source link

Reproduce User in a bad state where search button does nothing at all + error when looking up #207

Open ear-dev opened 4 years ago

ear-dev commented 4 years ago

This has happened to me twice. For some reason my user gets into a bad state where search does nothing at all. Logging in with a different user works fine.

I'm not sure how to debug this. Is there some database value that got messed up that might cause this?

ear-dev commented 4 years ago

@shubhsherl Sorry it has taken me so long to get you this error message. This is what I am seeing on the server side when I try to do a spotlight search. I hope it helps. I'm not sure how my user got into this bad state.

server.js:204 Meteor ➔ method spotlight -> userId: rTQJN7BthzWFDp6iE, arguments: ["tet",{"0":{"name":"eric","username":"eric","_id":"rTQJN7BthzWFDp6iE"}},{"users":true,"rooms":true}] Exception while invoking method 'spotlight' MongoError: error processing query: ns=rocketchat.users limit=5Tree: $and $or settings.preferences.discoverability $eq "all" $not settings.preferences exists $or email regex /tet/i TEXT : query=tet, language=none, caseSensitive=0, diacriticSensitive=0, tag=NULL active $eq true username exists $not username $eq { name: "eric", username: "eric", _id: "rTQJN7BthzWFDp6iE" } Sort: { username: 1 } Proj: { username: 1, name: 1, status: 1, statusText: 1 } No query solutions at Connection. (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:443:61) at Connection.emit (events.js:311:20) at Connection.EventEmitter.emit (domain.js:482:12) at processMessage (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/connection.js:364:10) at Socket. (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/connection.js:533:15) at Socket.emit (events.js:311:20) at Socket.EventEmitter.emit (domain.js:482:12) at addChunk (_stream_readable.js:294:12) at readableAddChunk (_stream_readable.js:275:11) at Socket.Readable.push (_stream_readable.js:209:10) at TCP.onStreamRead (internal/stream_base_commons.js:186:23) => awaited here: at Function.Promise.await (/app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:56:12) at packages/mongo/mongo_driver.js:1037:14 at /app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40 => awaited here: at Promise.await (/app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:60:12) at SynchronousCursor._nextObject (packages/mongo/mongo_driver.js:1086:38) at SynchronousCursor.forEach (packages/mongo/mongo_driver.js:1100:22) at SynchronousCursor.map (packages/mongo/mongo_driver.js:1110:10) at SynchronousCursor.fetch (packages/mongo/mongo_driver.js:1134:17) at Cursor. [as fetch] (packages/mongo/mongo_driver.js:882:44) at MethodInvocation.spotlight (server/publications/spotlight.js:76:80) at MethodInvocation.methodsMap. (app/lib/server/lib/debug.js:67:34) at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1771:12) at packages/ddp-server/livedata_server.js:719:19 at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12) at packages/ddp-server/livedata_server.js:717:46 at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12) at packages/ddp-server/livedata_server.js:715:46 at new Promise () at Session.method (packages/ddp-server/livedata_server.js:689:23) at packages/ddp-server/livedata_server.js:559:43

shubhsherl commented 4 years ago

@ear-dev Can you confirm if notablescan is disabled in Viasat deployment. https://dba.stackexchange.com/a/223232

ear-dev commented 4 years ago

@shubhsherl confirmed. notablescan is false

shubhsherl commented 4 years ago

@ear-dev The issue might occur after the version change of mongo while upstream catchup in develop_pwa. https://jira.mongodb.org/browse/SERVER-38309?focusedCommentId=2105325&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-2105325

ear-dev commented 4 years ago

@shubhsherl I dumped and restored our db on the dev server and that issue went away. Awesome!! Thanks for looking into that. It's good to understand and to know that we have an easy fix if we get into that state again. I'm hoping that those, "internal server error" messages will also go away.