plane
plane copied to clipboard
[bug]: GitHub Authentification Error
Is there an existing issue for this?
- [X] I have searched the existing issues
Current behavior
I'm not able to signin on Github with my account (self hosted instance). Other team members can sign-in with Github.
Error log:
obj, created = self.select_for_update().get_or_create(defaults, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/django/db/models/query.py", line 923, in get_or_create return self.create(**params), True ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/django/db/models/query.py", line 658, in create obj.save(force_insert=True, using=self.db) File "/usr/local/lib/python3.11/site-packages/django/db/models/base.py", line 814, in save self.save_base( File "/usr/local/lib/python3.11/site-packages/django/db/models/base.py", line 877, in save_base updated = self._save_table( ^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/django/db/models/base.py", line 1020, in _save_table results = self._do_insert( ^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/django/db/models/base.py", line 1061, in _do_insert return manager._insert( ^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/django/db/models/manager.py", line 87, in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/django/db/models/query.py", line 1805, in _insert return query.get_compiler(using=using).execute_sql(returning_fields) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1822, in execute_sql cursor.execute(sql, params) File "/usr/local/lib/python3.11/site-packages/sentry_sdk/utils.py", line 1711, in runner return sentry_patched_function(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/sentry_sdk/integrations/django/init.py", line 629, in execute result = real_execute(self, sql, params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 67, in execute return self._execute_with_wrappers( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers return executor(sql, params, many, context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 84, in _execute with self.db.wrap_database_errors: File "/usr/local/lib/python3.11/site-packages/django/db/utils.py", line 91, in exit raise dj_exc_value.with_traceback(traceback) from exc_value File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 89, in _execute return self.cursor.execute(sql, params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/psycopg/cursor.py", line 732, in execute raise ex.with_traceback(None) django.db.utils.IntegrityError: duplicate key value violates unique constraint "accounts_provider_provider_account_id_daac1f10_uniq" DETAIL: Key (provider, provider_account_id)=(github, 10955956) already exists. 192.168.176.5:38750 - "GET /auth/github/callback/?code=ca328c55fe1cc77e3920&state=5bbca5587dee481bbee56a80c59f69ca HTTP/1.1" 500
Steps to reproduce
I'm not sure about where the problem comes. I think we can reproduce with the following steps:
- Create an App on Github
- Configure Plane to login with github
- Login with your user (will works)
- Change Github configuration on plane
- Connect again with your user (error)
Environment
Production
Browser
Google Chrome
Variant
Self-hosted
Version
v0.22-dev