Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible to create a learner account on a second (imported) facility? #11832

Closed
radinamatic opened this issue Feb 2, 2024 · 2 comments
Closed
Assignees
Labels
APP: Setup Wizard Re: Setup Wizard (facility import, superuser creation, settings, etc.) DEV: backend Python, databases, networking, filesystem... DEV: frontend P0 - critical Priority: Release blocker or regression

Comments

@radinamatic
Copy link
Member

radinamatic commented Feb 2, 2024

Observed behavior

I managed to replicate this on 2 separate Android devices. My Windows 7 server device has 2 facilities, one created during the server setup (Win7new), and the second one imported from another VM (imported-from-Win11). This second one has several classes, and I have been using it exclusively during this past week.

  1. At first I tried to create a new learner account from the Huawei Android 8 tablet on the second facility, and got an error (Whoops!). I retried and the field validation was saying Username already exists, which did not make sense, since I searched users on that second facility on the server VM and the username I was trying to create was not there. I moved on, imported another user and went on testing something else.
  2. Some times after I was setting up another LoD (on the Motorola phone), tried again to create (not import) a new user on the second facility, and got the same message that the Username already exists. After the initial confusion I had a hunch and went to check the first facility (the one I never really used for class interactions during this testing), and lo and behold, the user I was trying to create did exist there, probably from the above setup on Huawei tablet. And this is not my fat finger miss-touching the wrong radio button during the facility selection, it actually seems that the option to create a new user is somehow bound to the first facility on the device, and would not obey the user's selection of the second facility.
LoD Win7 facility users imported-from-Win11 facility users
2024_02_02_00 48 43 2024-02-02_00-49-04 2024-02-02_00-49-46

Errors and logs

Windows 7 home folder (without content)

Expected behavior

User needs to be able to select the facility they need to create their new learner account.

User-facing consequences

Impossible to create a new learner account on a desired facility.

Steps to reproduce

You will need a server with 2 facilities, try setting up an LoD by creating a new account on the second one.

Context

  • Kolibri version: 0.16b13
  • Operating system: Windows 7

cc @pcenov to try to replicate

@radinamatic radinamatic added P0 - critical Priority: Release blocker or regression DEV: backend Python, databases, networking, filesystem... APP: Setup Wizard Re: Setup Wizard (facility import, superuser creation, settings, etc.) DEV: frontend labels Feb 2, 2024
@pcenov
Copy link
Member

pcenov commented Feb 2, 2024

Yes I was able to replicate this issue. A learner attempting to create an account on the imported facility is getting the following error and is not able to proceed:

      "id": "AUTHENTICATION_FAILED",
      "metadata": {
        "field": "non_field_errors",
        "message": "401 Client Error: Unauthorized for url: http://192.168.100.50:8080/api/public/facilityuser/?facility_id=af8e235a4458affd11c92980da3d648d"

When I go to Facility > Users I can see that the user is actually created but in the main facility, and not in the imported facility.

LOD-Create.new.user.on.imported.facility.mp4

@rtibbles
Copy link
Member

rtibbles commented Feb 8, 2024

Fixed in #11846

@rtibbles rtibbles closed this as completed Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APP: Setup Wizard Re: Setup Wizard (facility import, superuser creation, settings, etc.) DEV: backend Python, databases, networking, filesystem... DEV: frontend P0 - critical Priority: Release blocker or regression
Projects
None yet
Development

No branches or pull requests

3 participants