Repository navigation
Description
Please verify that this bug has NOT been raised before.
- I checked and didn't find a similar issue
Describe the bug*
'GenericOAuth2ApiLoginView' object has no attribute 'login'
Traceback (most recent call last):
File "/root/.local/lib/python3.11/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.local/lib/python3.11/site-packages/allauth/socialaccount/providers/oauth2/views.py", line 105, in view
return self.dispatch(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/inventree/src/backend/InvenTree/InvenTree/social_auth_urls.py", line 33, in dispatch
return self.login(request, *args, **kwargs)
^^^^^^^^^^
AttributeError: 'GenericOAuth2ApiLoginView' object has no attribute 'login'
Steps to Reproduce
- Open a new (incognito) screen
- Open the login page
- Login with SSO
- Confirm the SSO redirect
Internal Server Error
The server raised an internal error
Refer to the error log in the admin interface for further details
Expected behaviour
Expected to be redirected to Google for a login.
The login process works properly in the previous (original?) UI. That is I am redirected to Google to enter my credentials.
Deployment Method
- Docker
- Package
- Bare metal
- Other - added info in Steps to Reproduce
Version Information
Version Information:
InvenTree-Version: 0.17.2
Django Version: 4.2.17
Commit Hash: 4b56492
Commit Date: 2025-01-07
Database: postgresql
Debug-Mode: False
Deployed using Docker: True
Platform: Linux-6.11.0-13-generic-x86_64-with
Installer: DOC
Active plugins: [{'name': 'InvenTreeBarcode', 'slug': 'inventreebarcode', 'version': '2.1.0'}, {'name': 'InvenTreeCoreNotificationsPlugin', 'slug': 'inventreecorenotificationsplugin', 'version': '1.0.0'}, {'name': 'InvenTreeCurrencyExchange', 'slug': 'inventreecurrencyexchange', 'version': '1.0.0'}, {'name': 'InvenTreeLabel', 'slug': 'inventreelabel', 'version': '1.1.0'}, {'name': 'InvenTreeLabelMachine', 'slug': 'inventreelabelmachine', 'version': '1.0.0'}, {'name': 'InvenTreeLabelSheet', 'slug': 'inventreelabelsheet', 'version': '1.0.0'}, {'name': 'DigiKeyPlugin', 'slug': 'digikeyplugin', 'version': '1.0.0'}, {'name': 'LCSCPlugin', 'slug': 'lcscplugin', 'version': '1.0.0'}, {'name': 'MouserPlugin', 'slug': 'mouserplugin', 'version': '1.0.0'}, {'name': 'TMEPlugin', 'slug': 'tmeplugin', 'version': '1.0.0'}]
Please verify if you can reproduce this bug on the demo site.
- I can reproduce this bug on the demo site.
Relevant log output
The bug is not reproducible on the demo site because of the use of SSO.
Activity
SchrodingersGat commentedon Jan 25, 2025
@duane701 this will likely be addressed in #6293 which completely reworks SSO support for the new interface
MrARM commentedon Mar 18, 2025
This issue is still present in 0.17.9. Same exception and line numbers.
SchrodingersGat commentedon Mar 18, 2025
The fix in #6293 will be available at the next major release - it can't be backported to the
0.17.xbranch