Skip to content

Bug/Question: Duplicate INVENTREE_SOCIAL_BACKENDS after 1.6.0? #13044

Closed

Description

@p-fruck

Please verify that this bug has NOT been raised before.

  • I checked and didn't find a similar issue

Describe the bug*

I just upgraded to 1.6.0 from 1.5.7 and got the following error message:

django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: openid_connect

I had INVENTREE_SOCIAL_BACKENDS=allauth.socialaccount.providers.openid_connect in my .env. After removing this environment variable, the upgrade worked and my inventree is running again (including OIDC login). I am not sure if this is intended? Maybe this happened because I also have a database entry for the OIDC application and the database and environment config are conflicting?
But from the code it seems like the issue is that the openid connect and saml providers are registered by default now and there is no deduplication check for the social backends?

DEFAULT_SOCIAL = ['saml', 'openid_connect']
_SOCIAL_BACKENDS = list(dict.fromkeys([*DEFAULT_SOCIAL, *SOCIAL_BACKENDS]))
# region auth
for app in _SOCIAL_BACKENDS: # pragma: no cover
# Ensure that the app starts with 'allauth.socialaccount.providers'
social_prefix = 'allauth.socialaccount.providers.'
if not app.startswith(social_prefix):
app = social_prefix + app
INSTALLED_APPS.append(app)

Steps to Reproduce

  1. Set up inventree 1.6.0
  2. Set INVENTREE_SOCIAL_BACKENDS to allauth.socialaccount.providers.openid_connect
  3. Notice the error message

Expected behaviour

I would expect my setup to work as before since I haven't changed the OIDC config for over a year

Deployment Method

Docker

Version Information

Update from 1.5.7 to 1.6.0

Try to reproduce on the demo site

I did not try to reproduce

Is the bug reproducible on the demo site?

Not reproducible

Relevant log output

Traceback (most recent call last):
  File "/home/inventree/src/backend/InvenTree/manage.py", line 26, in <module>
    main()
    ~~~~^^
  File "/home/inventree/src/backend/InvenTree/manage.py", line 21, in main
    execute_from_command_line(sys.argv)
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "/root/.local/lib/python3.14/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
    ~~~~~~~~~~~~~~~^^
  File "/root/.local/lib/python3.14/site-packages/django/core/management/__init__.py", line 416, in execute
    django.setup()
    ~~~~~~~~~~~~^^
  File "/root/.local/lib/python3.14/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/lib/python3.14/site-packages/django/apps/registry.py", line 93, in populate
    raise ImproperlyConfigured(
    ...<2 lines>...
    )
django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: openid_connect
ERROR: InvenTree command failed: 'python3 manage.py collectplugins -v 0'
- Refer to the error messages in the log above for more information
Task 'plugins' failed with an error.
Task 'install' failed with an error.
Task 'update' failed with an error.

I have reviewed this report for correctness and filled out all sections.

  • I have checked this report. I acknowledge that filing bugs via AI agents without review might lead to being blocked.

Activity

  1. added
    bug
    question
    triage:not-checked
    on Oct 20, 2026
  2. added theissue type on Oct 20, 2026
  3. added
    setup
    and removed
    question
    triage:not-checked
    on Oct 20, 2026
  4. added this to the 1.6.1 milestone on Oct 20, 2026
  5. SchrodingersGat commented on Oct 20, 2026

    @SchrodingersGat
    Member

    @p-fruck thanks for reporting - see #13046

  6. p-fruck commented on Oct 21, 2026

    @p-fruck
    ContributorAuthor

    @SchrodingersGat thank you once again for the quick response and fix 🥳

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsetup

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions