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

Opening "Add track" drawer produces duplicate keys error with internet accounts #3201

Closed
cmdcolin opened this issue Sep 20, 2022 · 1 comment · Fixed by #3204
Closed

Opening "Add track" drawer produces duplicate keys error with internet accounts #3201

cmdcolin opened this issue Sep 20, 2022 · 1 comment · Fixed by #3204
Labels
bug Something isn't working

Comments

@cmdcolin
Copy link
Collaborator

On jbrowse desktop

  • Start the hg19 quick launch
  • Open the add track drawer
  • Check dev tools

Error:

"Warning: Encountered two children with the same key, `.2:$placeholderId`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version."

desktop default has google drive and dropbox integrations. removing those e.g. making const defaultInternetAccounts = [] as any[] makes the warning go away

It is unclear why they receive placeholderId because the defaultInternetAccounts have internetAccountId fields

const defaultInternetAccounts = [
  {
    type: 'DropboxOAuthInternetAccount',
    internetAccountId: 'dropboxOAuth',
    name: 'Dropbox',
    description: 'Account to access Dropbox files',
    clientId: 'ykjqg1kr23pl1i7',
  },
  {
    type: 'GoogleDriveOAuthInternetAccount',
    internetAccountId: 'googleOAuth',
    name: 'Google Drive',
    description: 'Account to access Google Drive files',
    clientId:
      '109518325434-m86s8a5og8ijc5m6n7n8dk7e9586bg9i.apps.googleusercontent.com',
  },
]
@cmdcolin cmdcolin added the bug Something isn't working label Sep 20, 2022
@cmdcolin
Copy link
Collaborator Author

can use acct.id instead of acct.internetAccountId (as it is a full model, not a config, but the model provides a getter for the config slot called get internetAccountId that runs getConf(self,'internetAccountId')

note that this issue is just something I stumbled on, not related to any report or anything but it is good to get the key's right

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant