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

0.18 - 'Select device' modal - Disabled server address #12912

Open
pcenov opened this issue Dec 5, 2024 · 3 comments
Open

0.18 - 'Select device' modal - Disabled server address #12912

pcenov opened this issue Dec 5, 2024 · 3 comments
Labels
APP: Device Re: Device App (content import/export, facility-syncing, user permissions, etc.) DEV: frontend P0 - critical Priority: Release blocker or regression

Comments

@pcenov
Copy link
Member

pcenov commented Dec 5, 2024

Observed behavior

If I have manually added a device in the 'Select device' modal, then when I restart the Kolibri server and attempt again to import resources from this device it is grayed out. If I remove it and add it again it can be accessed correctly until the next restart of the server:

disabled.mp4

The following request is returning a 500 error: http://127.0.0.1:8080/api/discovery/networklocation/073da5ede5324d2285df0cbc1a7c71c8/update_connection_status/

Expected behavior

The device should not be disabled if it's available and can be accessed.

Steps to reproduce the issue

  1. Install the build asset from https://github.com/learningequality/kolibri/releases/tag/v0.18.0-alpha0
  2. Go to Device > Channels > Import > Local network or internet
  3. Add a new device such as "https://hotfixes.studio.learningequality.org/"
  4. Restart Kolibri
  5. Go again to Device > Channels > Import > Local network or internet and observe that the device is disabled

Usage Details

https://github.com/learningequality/kolibri/releases/tag/v0.18.0-alpha0
Ubuntu 22 - Chrome

@pcenov
Copy link
Member Author

pcenov commented Dec 5, 2024

@radinamatic

@radinamatic radinamatic added P0 - critical Priority: Release blocker or regression APP: Device Re: Device App (content import/export, facility-syncing, user permissions, etc.) DEV: frontend labels Dec 5, 2024
@radinamatic
Copy link
Member

Just an additional detail: in my testing it was not even necessary to restart Kolibri server for the device to appear grayed out, it happens as soon as the user attempts a second import (new channel, or additional resources from the same one), it becomes inactive (unreachable), The only way out is to remove the device and add it again, mighty annoying... 😒

@Varun-Kolanu
Copy link

Varun-Kolanu commented Dec 10, 2024

The device data that is coming from /networklocation endpoint for the url https://hotfixes.studio.learningequality.org has operating_system field as an empty string. Due to which /update_connection is facing an error:

Image

So, due to the not null constraint is the reason.
I traced back the endpoints and found that platform.system() is not able to determine operating system of the machine where the Kolibri Studio is hosted on.

Location of endpoints:
kolibri/core/public/api.py, line 69: (get_device_info..) and
kolibri/core/device/utils.py, line 469 (platform.system())

So, I would like to know if this error persists in your testing for other urls too?
Because I tested some of the urls like a local network of kolibri app running on my mobile and I found it was working fine for those. (But all the Kolibri studio urls are facing the issue because /api/public/info of those is returning operating_system: null)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APP: Device Re: Device App (content import/export, facility-syncing, user permissions, etc.) DEV: frontend P0 - critical Priority: Release blocker or regression
Projects
None yet
Development

No branches or pull requests

3 participants