Skip to content
This repository has been archived by the owner. It is now read-only.

"Duplicate entry" database error on account create #625

Closed
zaach opened this issue Mar 17, 2014 · 5 comments
Closed

"Duplicate entry" database error on account create #625

zaach opened this issue Mar 17, 2014 · 5 comments

Comments

@zaach
Copy link
Contributor

@zaach zaach commented Mar 17, 2014

I'm getting this error on accounts-latest and api-accounts-latest. The account is still created despite the scary error:

{"name":"fxa-auth-server","hostname":"ip-10-80-227-43","pid":20418,"level":50,"op":"request.summary","code":500,"errno":999,"rid":"1395076969602-20418-63673","path":"/v1/account/create","lang":"en-US","agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.152 Safari/537.36","remoteAddressChain":["75.101.100.235","127.0.0.1"],"t":2081,"keys":"true","email":"zack.carter+testsync@gmail.com","trace":[],"stack":"Error: ER_DUP_ENTRY: Duplicate entry 'zack.carter+testsync@gmail.com' for key 'normalizedEmail'\n    at Query.Sequence._packetToError (/home/app/code/node_modules/mysql/lib/protocol/sequences/Sequence.js:30:14)\n    at Query.ErrorPacket (/home/app/code/node_modules/mysql/lib/protocol/sequences/Query.js:82:18)\n    at Protocol._parsePacket (/home/app/code/node_modules/mysql/lib/protocol/Protocol.js:202:24)\n    at Parser.write (/home/app/code/node_modules/mysql/lib/protocol/Parser.js:62:12)\n    at Protocol.write (/home/app/code/node_modules/mysql/lib/protocol/Protocol.js:37:16)\n    at Socket.<anonymous> (/home/app/code/node_modules/mysql/lib/Connection.js:72:28)\n    at Socket.EventEmitter.emit (events.js:95:17)\n    at Socket.<anonymous> (_stream_readable.js:746:14)\n    at Socket.EventEmitter.emit (events.js:92:17)\n    at emitReadable_ (_stream_readable.js:408:10)\n    --------------------\n    at Protocol._enqueue (/home/app/code/node_modules/mysql/lib/protocol/Protocol.js:110:26)\n    at PoolConnection.Connection.query (/home/app/code/node_modules/mysql/lib/Connection.js:165:25)\n    at query (/home/app/code/db/mysql.js:850:16)\n    at /home/app/code/db/mysql.js:763:18\n    at onSettled (/home/app/code/node_modules/p-promise/p.js:258:10)\n    at onTick (/home/app/code/node_modules/p-promise/p.js:40:4)\n    at process._tickDomainCallback (node.js:459:13)","msg":"ER_DUP_ENTRY: Duplicate entry 'zack.carter+testsync@gmail.com' for key 'normalizedEmail'","time":"2014-03-17T17:22:51.683Z","v":0}
@dannycoates
Copy link
Member

@dannycoates dannycoates commented Mar 17, 2014

Did that email already have an account? If so, was it verified?

@dannycoates
Copy link
Member

@dannycoates dannycoates commented Mar 17, 2014

I found this in the log. Did you intentionally submit 2 requests 109ms apart? If so I think I understand the problem.

17:22:51.574Z  INFO fxa-auth-server:  (op=request.summary, code=200, errno=0, rid=1395076969460-20418-1131, path=/v1/account/create, lang=en-US, t=2114, keys=true, email=zack.carter+testsync@gmail.com)
    agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.152 Safari/537.36
    --
    remoteAddressChain: [
      "75.101.100.235",
      "127.0.0.1"
    ]
17:22:51.683Z ERROR fxa-auth-server: ER_DUP_ENTRY: Duplicate entry 'zack.carter+testsync@gmail.com' for key 'normalizedEmail' (op=request.summary, code=500, errno=999, rid=1395076969602-20418-63673, path=/v1/account/create, lang=en-US, t=2081, keys=true, email=zack.carter+testsync@gmail.com, trace=[])
@zaach
Copy link
Contributor Author

@zaach zaach commented Mar 17, 2014

@dannycoates nope, didn't intend to.

@dannycoates
Copy link
Member

@dannycoates dannycoates commented Mar 17, 2014

@zaach well, thanks anyway :) #626 makes the error more friendly

I wonder why the client made two calls?

@chilts chilts closed this in #626 Mar 17, 2014
@ckarlof
Copy link
Contributor

@ckarlof ckarlof commented Mar 21, 2014

You can jam the button. :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants