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

Error changing profile username (login). #11155

Closed
siberijah opened this issue Jun 15, 2018 · 4 comments · Fixed by #11335
Closed

Error changing profile username (login). #11155

siberijah opened this issue Jun 15, 2018 · 4 comments · Fixed by #11335
Milestone

Comments

@siberijah
Copy link

Description:

Error changing username (login). As I can see, it was fixed in version 0.39.0 ( #3940 ) But still present in version 0.65.1 for all users.

Server Setup Information:

  • Version of Rocket.Chat Server: 0.65.1 (latest by this date)
  • Operating System: debian 9
  • Deployment Method(snap/docker/tar/etc): tar/pm2
  • Number of Running Instances: 1
  • DB Replicaset Oplog: unkown
  • Node Version: v8.9.3
  • mongoDB Version: v3.6.4

Relevant logs:

0|rocketch | Exception while invoking method 'saveUserProfile' MongoError: The positional operator did not find the match needed from the query.
0|rocketch |     at Function.MongoError.create (/var/www/rocketchat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/error.js:31:11)
0|rocketch |     at toError (/var/www/rocketchat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/utils.js:139:22)
0|rocketch |     at /var/www/rocketchat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/collection.js:1059:67
0|rocketch |     at /var/www/rocketchat/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:469:18
0|rocketch |     at _combinedTickCallback (internal/process/next_tick.js:131:7)
0|rocketch |     at process._tickDomainCallback (internal/process/next_tick.js:218:9)
0|rocketch |  => awaited here:
0|rocketch |     at Promise.await (/var/www/rocketchat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:60:12)
0|rocketch |     at Server.apply (/var/www/rocketchat/programs/server/packages/ddp-server.js:1749:27)
0|rocketch |     at Server.call (/var/www/rocketchat/programs/server/packages/ddp-server.js:1724:17)
0|rocketch |     at MethodInvocation.saveUserProfile (/var/www/rocketchat/programs/server/app/app.js:11075:14)
0|rocketch |     at MethodInvocation.methodMap.(anonymous function) (packages/rocketchat_monitoring.js:2731:30)
0|rocketch |     at MethodInvocation.methodsMap.(anonymous function) (/var/www/rocketchat/programs/server/packages/rocketchat_lib.js:2355:36)
0|rocketch |     at maybeAuditArgumentChecks (/var/www/rocketchat/programs/server/packages/ddp-server.js:1877:12)
0|rocketch |     at DDP._CurrentMethodInvocation.withValue (/var/www/rocketchat/programs/server/packages/ddp-server.js:902:126)
0|rocketch |     at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1186:12)
0|rocketch |     at DDPServer._CurrentWriteFence.withValue (/var/www/rocketchat/programs/server/packages/ddp-server.js:902:98)
0|rocketch |     at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1186:12)
0|rocketch |     at Promise (/var/www/rocketchat/programs/server/packages/ddp-server.js:902:46)
0|rocketch |     at new Promise (<anonymous>:null:null)
0|rocketch |     at Session.method (/var/www/rocketchat/programs/server/packages/ddp-server.js:875:23)
0|rocketch |     at /var/www/rocketchat/programs/server/packages/ddp-server.js:754:85
@sampaiodiego
Copy link
Member

I was not able to reproduce this..

can you please give additional info?

  • are you able to reproduce it all the times?
  • does it happen to all users? or just specific ones?
  • are you changing the username from the admin panel or my account page?
  • are you changing anything else or just the username? if changing additional things, does it happen when changing the username only?
  • is it vanilla source code or is it a modified fork?

any additional info you may think is relevant is welcome. thanks

@TwizzyDizzy
Copy link

TwizzyDizzy commented Jul 2, 2018

I cannot confirm this on Rocket.Chat 0.66.0. I'm using MongoDB 2.6 though, so it might be related to Mongo 3.x? (also see the linked issue)

Cheers
Thomas

@luckenbach
Copy link

luckenbach commented Jul 4, 2018

I can confirm this is still occurring on 0.66 on MongoDB 3.4.7

are you able to reproduce it all the times? - Yes
does it happen to all users? or just specific ones? - All Users
are you changing the username from the admin panel or my account page? - both
are you changing anything else or just the username? if changing additional things, does it happen when changing the username only? - Only username
is it vanilla source code or is it a modified fork? - Official Helm chat + update of Rocket.Chat image to 0.66

@sampaiodiego
Copy link
Member

thanks @luckenbach .. I was able to reproduce this running an instance without oplog tailing. on this case, I got the following error:

I20180704-11:09:00.386(-3)? Exception while invoking method 'saveUserProfile' MongoError: The positional operator did not find the match needed from the query. Unexpanded update: mentions.$.username

as you may notice, the PR #11335 should fix this.. thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants