Payment page 404 - unable to retrieve enterprise learner data for User

I’m having problems with the e-commerce payment page.

I’ve enabled tutor-ecommerce, added Stripe configuration, and added a ‘verified’ track to a course.

When I click the ‘Upgrade’ button for the course from the learner dashboard (http://ecommerce.local.edly.io/basket/add/?sku=77E0B27), I am redirected to http://apps.local.edly.io/payment/ with a 404.

E-commerce logs:

ecommerce-1  | 2024-04-08 15:03:21,587 INFO 6 [ecommerce.extensions.basket.views] /openedx/ecommerce/./ecommerce/extensions/basket/views.py:432 - Starting payment flow for user [myusername] for products [['77E0B27']]

ecommerce-1  | 2024-04-08 15:03:22,414 INFO 6 [ecommerce.enterprise.api] /openedx/ecommerce/./ecommerce/enterprise/api.py:199 - Unable to retrieve enterprise learner data for User: myusername, Exception: 404 Client Error: Not Found for url: http://local.edly.io/enterprise/api/v1/enterprise-learner/?username=myusername

ecommerce-1  | [pid: 6|app: 0|req: 72/278] 172.18.0.3 () {44 vars in 3594 bytes} [Mon Apr  8 15:03:21 2024] GET /basket/add/?sku=77E0B27 => generated 0 bytes in 969 msecs (HTTP/1.1 303) 7 headers in 250 bytes (1 switches on core 0)

LMS logs:

lms-1  | 2024-04-08 15:03:22,229 INFO 7 [tracking] [user None] [ip 172.18.0.14] logger.py:41 - {"name": "/enterprise/api/v1/enterprise-learner/", "context": {"user_id": null, "path": "/enterprise/api/v1/enterprise-learner/", "course_id": "", "org_id": "", "enterprise_uuid": ""}, "username": "", "session": "", "ip": "172.18.0.14", "agent": "python-requests/2.31.0 edx-rest-api-client/5.5.2 172.18.0.14", "host": "local.edly.io", "referer": "", "accept_language": "", "event": "{\"GET\": {\"username\": [\"myusername\"]}, \"POST\": {}}", "time": "2024-04-08T15:03:22.228961+00:00", "event_type": "/enterprise/api/v1/enterprise-learner/", "event_source": "server", "page": null}

lms-1  | 2024-04-08 15:03:22,341 INFO 7 [edx.footer] [user None] [ip 172.18.0.14] api.py:479 - images/logo.png

lms-1  | [pid: 7|app: 0|req: 133/365] 172.18.0.3 () {40 vars in 1323 bytes} [Mon Apr  8 15:03:22 2024] GET /enterprise/api/v1/enterprise-learner/?username=myusername => generated 8613 bytes in 158 msecs (HTTP/1.1 404) 6 headers in 314 bytes (1 switches on core 0)

@lemon8de, @samueljacob, @virgodarth, @tanktank1314, @Master_kratos looks like you’ve previously come up against a similar issue - did you have any success fixing it?

In E-commerce admin (sorry I am on mobile), try changing the url and either add or remove training slash from payment (again sorry, I don’t remember what it was but mostly it was to be added)

I think this might be part of the problem; when I try rebuilding the MFE image. The edx repos don’t have the required tags

------
 > [orders-git 1/1] ADD --keep-git-dir=true https://github.com/edx/frontend-app-ecommerce.git#open-release/quince.2 .:
0.202 Initialized empty Git repository in /var/lib/docker/overlay2/p63e3cpc2r7vgadrdyeg0x6nb/diff/
------
------
 > [payment-git 1/1] ADD --keep-git-dir=true https://github.com/edx/frontend-app-payment.git#open-release/quince.2 .:
0.052 Initialized empty Git repository in /var/lib/docker/overlay2/p2ogjppi72aj0ezaf76ubruvo/diff/
------
ERROR: failed to solve: failed to load cache key: repository does not contain ref open-release/quince.2, output: ""

(I had made an assumption that tutor local launch rebuilds the images, but I suppose it hasn’t been doing, and thus I was having an error because the required payment pages didn’t exist)

1 Like

Yeah, based on this Fresh error in Tutor 17.0.0 and 17.0.3 - #5 by borgdrone7 it looks like there is some repos that are being moved.

I’ve tried with a fresh install and still get the same issue. Do I need to do tutor image build mfe to get this to work? If so I can’t get it to do so, even after following the parallelism suggestion on the Troubleshooting page

The reason for this error was that I had not successfully built the MFE image (tutor images build mfe) after enabling the ecommerce plugin.

Running the build command means that the payment page now loads.