Hello,
I am on a clean install from pipy with
tutor 10.0.10
ecommerce==10.0.2
discovery==10.0.1
Unfortunately I cannot access the ecommerce /dashboard, /courses or /admin endpoints. I created a user with admin rights as indicated in the operations section of the plugin readme (https://github.com/overhangio/tutor-ecommerce#operations)
tutor local run ecommerce ./manage.py createsuperuser
When I try to login (both via /login and /admin in the ecommerce url) I get a “Server Error” message and the following in the logs:
ecommerce_1 | 2020-07-13 07:06:20,187 ERROR 9 [ecommerce.core.models] /openedx/ecommerce/ecommerce/core/models.py:606 - Could not find lms_user_id for user 3. Called from middleware with request path: /courses/, referrer: None
ecommerce_1 | NoneType: None
ecommerce_1 | 2020-07-13 07:06:20,198 ERROR 9 [django.request] /openedx/venv/lib/python3.6/site-packages/django/utils/log.py:228 - Internal Server Error: /courses/
ecommerce_1 | Traceback (most recent call last):
ecommerce_1 | File "/openedx/venv/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
ecommerce_1 | response = get_response(request)
ecommerce_1 | File "/openedx/venv/lib/python3.6/site-packages/django/core/handlers/base.py", line 106, in _get_response
ecommerce_1 | response = middleware_method(request, callback, callback_args, callback_kwargs)
ecommerce_1 | File "/openedx/ecommerce/ecommerce/extensions/analytics/middleware.py", line 44, in process_view
ecommerce_1 | user.add_lms_user_id('ecommerce_missing_lms_user_id_middleware', called_from)
ecommerce_1 | File "/openedx/ecommerce/ecommerce/core/models.py", line 608, in add_lms_user_id
ecommerce_1 | raise MissingLmsUserIdException(error_msg)
ecommerce_1 | ecommerce.core.exceptions.MissingLmsUserIdException: Could not find lms_user_id for user 3. Called from middleware with request path: /courses/, referrer: None
I found the following “decision” in the ecommerce repository: https://github.com/edx/ecommerce/blob/master/docs/decisions/0004-unique-identifier-for-users.rst
In the past I did manage to login by creating the user with the “createsuperuser” script, then creating the same user via the register form in the LMS and then a combination of logging in the lms and the ecommerce interfaces, however I have not been able to replicate such procedure.
I really appreciate any help you can provide.