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

LiveChat duplicate key error, when guest tries to use same username/email #1864

Closed
tuudik opened this issue Jan 12, 2016 · 2 comments
Closed

Comments

@tuudik
Copy link

tuudik commented Jan 12, 2016

Steps to repro:

  1. Open live chat (incognito browser window) and register: user name / user.name@name.com
  2. Write something
  3. Close incognito browser window and open new
  4. Re-register with same user credentials as in step 2
  5. Internal Server Error
Exception while invoking method 'livechat:registerGuest' MongoError: E11000 duplicate key error index: rocketchat.users.$emails.address_1 dup key: { : "user.name@name.com" }
    at Object.Future.wait (/usr/share/Rocket.Chat/programs/server/node_modules/fibers/future.js:398:15)
    at [object Object].<anonymous> (packages/meteor/helpers.js:119:1)
    at [object Object].MongoConnection.(anonymous function) [as update] (packages/mongo/mongo_driver.js:736:1)
    at Object.CollectionHooks.defineAdvice.self (packages/matb33_collection-hooks/update.js:80:1)
    at Object.collection.(anonymous function) [as update] (packages/matb33_collection-hooks/collection-hooks.js:117:1)
    at [object Object].Mongo.Collection.(anonymous function) (packages/mongo/collection.js:590:1)
    at [object Object].Mongo.Collection.(anonymous function) [as update] (packages/dispatch_run-as-user/packages/dispatch_run-as-user.js:300:1)
    at [object Object].Meteor.methods.livechat:registerGuest (server/methods/registerGuest.js:69:16)
    at [object Object].methodsMap.(anonymous function) (packages/rocketchat_lib/server/lib/debug.js:23:1)
    at maybeAuditArgumentChecks (livedata_server.js:1698:12)
    - - - - -
    at Object.toError (/usr/share/Rocket.Chat/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/utils.js:114:11)
    at /usr/share/Rocket.Chat/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/collection/core.js:577:27
    at /usr/share/Rocket.Chat/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/db.js:1197:7
    at /usr/share/Rocket.Chat/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/db.js:1905:9
    at Server.Base._callHandler (/usr/share/Rocket.Chat/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/connection/base.js:453:41)
    at /usr/share/Rocket.Chat/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/connection/server.js:488:18
    at [object Object].MongoReply.parseBody (/usr/share/Rocket.Chat/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5)
    at [object Object].<anonymous> (/usr/share/Rocket.Chat/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/connection/server.js:446:20)
    at [object Object].emit (events.js:95:17)
    at [object Object].<anonymous> (/usr/share/Rocket.Chat/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:207:13)

Before this one, deleted old guest users and when registered in LiveChat (related #1824 (comment)):

Exception while invoking method 'sendMessageLivechat' MongoError: E11000 duplicate key error index: rocketchat.rocketchat_room.$name_1 dup key: { : "guest-1" }
    at Object.Future.wait (/usr/share/Rocket.Chat/programs/server/node_modules/fibers/future.js:398:15)
    at [object Object].<anonymous> (packages/meteor/helpers.js:119:1)
    at [object Object].MongoConnection.(anonymous function) [as insert] (packages/mongo/mongo_driver.js:736:1)
    at [object Object].Mongo.Collection.(anonymous function) (packages/mongo/collection.js:590:1)
    at [object Object].Mongo.Collection.(anonymous function) [as insert] (packages/dispatch_run-as-user/packages/dispatch_run-as-user.js:300:1)
    at _Class.RocketChat.models._Base._Class.insert (packages/rocketchat_lib/server/models/_Base.coffee:17:24)
    at [object Object].Meteor.methods.sendMessageLivechat (server/methods/sendMessageLivechat.js:30:28)
    at [object Object].methodsMap.(anonymous function) (packages/rocketchat_lib/server/lib/debug.js:23:1)
    at maybeAuditArgumentChecks (livedata_server.js:1698:12)
    at livedata_server.js:708:19
    - - - - -
    at Object.toError (/usr/share/Rocket.Chat/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/utils.js:114:11)
    at /usr/share/Rocket.Chat/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/collection/core.js:116:29
    at /usr/share/Rocket.Chat/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/db.js:1197:7
    at /usr/share/Rocket.Chat/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/db.js:1905:9
    at Server.Base._callHandler (/usr/share/Rocket.Chat/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/connection/base.js:453:41)
    at /usr/share/Rocket.Chat/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/connection/server.js:488:18
    at [object Object].MongoReply.parseBody (/usr/share/Rocket.Chat/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5)
    at [object Object].<anonymous> (/usr/share/Rocket.Chat/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/connection/server.js:446:20)
    at [object Object].emit (events.js:95:17)
    at [object Object].<anonymous> (/usr/share/Rocket.Chat/programs/server/npm/npm-mongo/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:207:13)
stream.permissions.read 7vGEbY5rx6DXATA6P WbRDgiFmgb6nTxHyDqaSkjX5mEpGkxNsfT
Exception while invoking method 'sendMessageLivechat' MongoError: E11000 duplicate key error index: rocketchat.rocketchat_room.$name_1 dup key: { : "guest-1" }
@mrkrumhausen
Copy link

I'm getting an a Internal server error when registering with previously used user credentials

@sampaiodiego
Copy link
Member

this is supposed to be fixed on #5201 and available from 0.49.0 version .. can you guys please confirm if it is still a problem?

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

No branches or pull requests

4 participants