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

[Bug] Viewers that change their names causing database issues #2198

Closed
1 task done
CKY- opened this issue Jul 5, 2023 · 1 comment
Closed
1 task done

[Bug] Viewers that change their names causing database issues #2198

CKY- opened this issue Jul 5, 2023 · 1 comment
Labels
Bug A defect in the app
Projects

Comments

@CKY-
Copy link
Collaborator

CKY- commented Jul 5, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

when a user changes their name firebot trys to create a new user and fails with

2023-03-19 00:06:19.0601 - error: [v5.57.0] ViewerDB: Error adding user 
{
  message: "Can't insert key 409993989, it violates the unique constraint",
  stack: "Error: Can't insert key 409993989, it violates the unique constraint\n" +
    '    at _AVLTree.insert (C:\\Users\\username\\AppData\\Local\\firebotv5\\app-5.57.0\\resources\\app.asar\\node_modules\\binary-search-tree\\lib\\avltree.js:273:19)\n' +
    '    at AVLTree.insert (C:\\Users\\username\\AppData\\Local\\firebotv5\\app-5.57.0\\resources\\app.asar\\node_modules\\binary-search-tree\\lib\\avltree.js:307:27)\n' +
    '    at Index.insert (C:\\Users\\username\\AppData\\Local\\firebotv5\\app-5.57.0\\resources\\app.asar\\node_modules\\nedb\\lib\\indexes.js:77:15)\n' +
    '    at Datastore.addToIndexes (C:\\Users\\username\\AppData\\Local\\firebotv5\\app-5.57.0\\resources\\app.asar\\node_modules\\nedb\\lib\\datastore.js:180:29)\n' +
    '    at Datastore._insertInCache (C:\\Users\\username\\AppData\\Local\\firebotv5\\app-5.57.0\\resources\\app.asar\\node_modules\\nedb\\lib\\datastore.js:402:10)\n' +
    '    at Datastore._insert (C:\\Users\\username\\AppData\\Local\\firebotv5\\app-5.57.0\\resources\\app.asar\\node_modules\\nedb\\lib\\datastore.js:348:10)\n' +
    '    at C:\\Users\\username\\AppData\\Local\\firebotv5\\app-5.57.0\\resources\\app.asar\\node_modules\\nedb\\lib\\executor.js:40:13\n' +
    '    at Immediate.process [as _onImmediate] (C:\\Users\\username\\AppData\\Local\\firebotv5\\app-5.57.0\\resources\\app.asar\\node_modules\\nedb\\node_modules\\async\\lib\\async.js:731:21)\n' +
    '    at processImmediate (internal/timers.js:461:21)',
  key: '409993989',
  errorType: 'uniqueViolated'
}

Expected Behavior

firebot to update the existing user

Steps To Reproduce

No response

Version

5.57.0

What operating system are you using Firebot on?

Windows 10

Relevant log output

No response

Contact Details (Optional)

No response

@zunderscore
Copy link
Collaborator

So much of what we do in v5 is tied to username vs user ID. This may be far too big of an undertaking for v5, so for now, I'm marking this for v6. We already plan to make v6 user ID centric vs username anyway.

@zunderscore zunderscore added the v6 Enhancement that will likely not be considered until v6 label Dec 18, 2023
@CKY- CKY- added Dev Complete Release Pending Issue has been resolved and is waiting to be packaged as part of a release and removed v6 Enhancement that will likely not be considered until v6 labels Feb 7, 2024
@SReject SReject closed this as completed Feb 16, 2024
Work Status automation moved this from Backlog to Closed Feb 16, 2024
@github-actions github-actions bot removed Release Pending Issue has been resolved and is waiting to be packaged as part of a release Dev Complete labels Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A defect in the app
Projects
Work Status
  
Closed
Development

No branches or pull requests

3 participants