kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

Setup Wizard - Devices that are not fully setup are showing up in the 'Select device' modal

Open pcenov opened this issue 10 months ago • 9 comments

Observed behavior

While attempting to setup a Learn-only device I noticed that in the 'Select device' modal we are showing devices that are not yet fully setup (specifically there are no learners that we can import from them). If I select such a device I am getting an error and have to start again. This can cause some confusion if there are multiple devices in the network that are in the same state.

https://github.com/learningequality/kolibri/assets/79847249/7192dd31-af71-462e-be9e-8dedc294117f

Expected behavior

A device that's not fully setup should not be displayed in the list with the available devices.

Steps to reproduce the issue

  1. Install Kolibri 0.16.1 on 2 devices.
  2. Launch Kolibri on both devices and start going through he following flow in the Setup Wizard: Group learning > Learn-only device > Import one or more existing user account from an existing facility
  3. Click on the displayed device.

Logs

logs.zip

Usage Details

Kolibri 0.16.1 official Windows 11, Ubuntu 22 - Chrome

pcenov avatar Apr 09 '24 14:04 pcenov

@radinamatic

pcenov avatar Apr 09 '24 14:04 pcenov

We should be careful how we approach this, for performance reasons. Ideally we provide this information about learners being available in the public facility API since we sometimes already check facility information in the device modal. Although, this means it wouldn't be backwards compatible.

bjester avatar Apr 23 '24 15:04 bjester

Better error management related to the console error could be a good next step. See the referenced line: this.selectedFacilityId = this.facilities[0].id;

It looks like the problem is that this.facilities is just empty

marcellamaki avatar May 07 '24 14:05 marcellamaki

Hi @pcenov - I've gone through a few different setups that I've tried, to see if I can reproduce this for manual QA purposes and confirming the fix I have in mind, and so far I haven't been able to create it. I just want to be sure that I have the same scenario. Can you you describe specifically how you created the "device that's not fully setup"? Did you start a setup of a full facility and disconnect/hard stop the setup so that it didn't complete? Or something else? Thank you!

marcellamaki avatar May 07 '24 18:05 marcellamaki

Hi @marcellamaki, on one of your devices you need to install Kolibri by going through Setup Wizard > Full facility (or On my own) and have it running without having created any learners on that facility. Since there aren't any learners on it, when you try to import learners from it while setting up a LOD you will get the error shown above. :)

pcenov avatar May 08 '24 08:05 pcenov

Hi @marcellamaki, on one of your devices you need to install Kolibri by going through Setup Wizard > Full facility (or On my own) and have it running without having created any learners on that facility. Since there aren't any learners on it, when you try to import learners from it while setting up a LOD you will get the error shown above. :)

Also, if you've previously run this setup in your browser, be sure to delete the cookies before trying it again, or it'll skip the modal.

jredrejo avatar May 08 '24 10:05 jredrejo

Hi @pcenov - I am not sure how to create a facility that has no learners, because even if there is just one user in the full facility, the admin, I think that that user could be available for import as a learner to another facility. I am sorry to be having such trouble with this, but could you explain the exact setup that you used for this first facility that you were doing the import from? I still haven't been able to recreate it 🙃

I also tried running two kolibris (A and B) and not completing the setup for A (i.e. having it be at the end of the setup wizard, but not continuing through to "finish"), and then trying to import from kolibri A. It didn't appear in the list of devices, which I think is actually the expected/correct behavior. (or @jredrejo if you have another suggestion of something I am missing, please chime in).

marcellamaki avatar May 09 '24 13:05 marcellamaki

Hi @marcellamaki - sorry for the trouble, apparently my memory has mislead me, and I was also having difficulties replicating it today... Turns out that you need to do a fresh install of Kolibri on the first device and just start the Setup Wizard and leave it there. Then when you try to import a LOD on your second device you will see the issue. If in the same setup I attempt to import a full facility or create a new user account for an existing facility, the 'Select device' modal is correctly not showing the device so it's just when you attempt to import learners.

https://github.com/learningequality/kolibri/assets/79847249/d8a4a10c-950b-4b94-add1-d7d1f563bc0b

pcenov avatar May 10 '24 09:05 pcenov

Ah great, thank you @pcenov - I've been able to reproduce it now and think I have some ideas for how to fix. Thanks!!

marcellamaki avatar May 10 '24 13:05 marcellamaki

Fixed in #12397

rtibbles avatar Aug 22 '24 15:08 rtibbles