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

Internal error when changing user username #11269

Closed
mjovanovic0 opened this issue Jun 27, 2018 · 4 comments
Closed

Internal error when changing user username #11269

mjovanovic0 opened this issue Jun 27, 2018 · 4 comments

Comments

@mjovanovic0
Copy link
Contributor

Description:

When I try to change username for user I get internal server error.

Steps to reproduce:

  1. Go to Admin panel
  2. Go to Users
  3. Find user you want to edit
  4. Edit user
  5. In username field change username to new one
  6. Save
  7. Exception occure

Expected behavior:

Username for user successfully changed.

Actual behavior:

Following exception:
Exception while invoking method 'insertOrUpdateUser'

MongoError: The positional operator did not find the match needed from the query.
    at Function.MongoError.create (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/error.js:31:11)
    at toError (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/utils.js:139:22)
    at /app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/collection.js:1059:67
    at /app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:469:18
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickDomainCallback (internal/process/next_tick.js:218:9)

Server Setup Information:

  • Version of Rocket.Chat Server: 0.65.2
  • Operating System: Ubuntu 16.04.4 LTS up-to-date
  • Deployment Method: docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog: Disabled
  • NodeJS Version: v8.9.3 - x64
  • MongoDB Version: v3.6.5
@justUmen
Copy link

I have the same kind of error when changing username.

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

Details : I just updated rocket to the latest version, and my mongo is 3.0 (Using docker)

@TwizzyDizzy
Copy link

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?

Cheers
Thomas

@TwizzyDizzy
Copy link

Just found #11155, so I'm closing this issue. Please add all future information over there! Thanks :)

Cheers (+close)
Thomas

@mjovanovic0
Copy link
Contributor Author

This issue is fixed in 0.66.1 with MR #11335 for #11155

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

No branches or pull requests

3 participants