question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

First `yarn devserver` on new KOLIBRI_HOME fails first time only

See original GitHub issue

Observed behavior

I’ve seen this before and thought it was to do with me getting crazy with changing my KOLIBRI_HOME and branches because I used to just run all of my pip and yarn installs then retry starting the dev server - but now that I’ve seen it a few times I figure I should make an issue - especially after it just worked without me doing all of that reinstalling of dependencies.

  1. Set your KOLIBRI_HOME to a non-existent folder
  2. yarn devserver
  3. See that it fails:
Traceback (most recent call last):
  File "/home/jacob/.pyenv/versions/3.7.7/bin/kolibri", line 11, in <module>
    load_entry_point('kolibri', 'console_scripts', 'kolibri')()
  File "/home/jacob/.pyenv/versions/3.7.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/home/jacob/.pyenv/versions/3.7.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2843, in load_entry_point
    return ep.load()
  File "/home/jacob/.pyenv/versions/3.7.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2434, in load
    return self.resolve()
  File "/home/jacob/.pyenv/versions/3.7.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2440, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/jacob/Code/LearningEquality/kolibri/kolibri/utils/cli.py", line 29, in <module>
    from . import sanity_checks
  File "/home/jacob/Code/LearningEquality/kolibri/kolibri/utils/sanity_checks.py", line 10, in <module>
    from .conf import KOLIBRI_HOME
  File "/home/jacob/Code/LearningEquality/kolibri/kolibri/utils/conf.py", line 42, in <module>
    os.mkdir(KOLIBRI_HOME)
FileExistsError: [Errno 17] File exists: '/media/hdd/kolibris/14-informal'
  1. yarn devserver - now it works as expected.

Looks like the new home folder is being made twice without something catching the error when it tries and fails after it first finds that the folder doesn’t exist yet?

Expected behavior

I make a new KOLIBRI_HOME and can start the devserver on the first try.

User-facing consequences

Confusing for developers and contributors.

Context

0.14-beta9 Debian 10 Chrome

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
rtibblescommented, Jul 15, 2020

I am fairly sure that this would be fixed by #7254 - where for the devserver we use the production kolibri server running in autoreload mode. We already have safeguards against a non-existent Kolibri home in our production environment, so this would give a parallel experience for devs.

0reactions
jonboisercommented, Apr 1, 2021

Fixed in #7938, specifically for the non-existent KOLIBRI_HOME folder case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting started - Kolibri developer documentation
We are currently updating our “setting up Kolibri” (user workflow) for our upcoming 0.16 release, and the code is only partially merged in...
Read more >
Webpack-dev-server runs correctly the first time but returns ...
1 Answer 1 ... You probably has another webpack server running or it was not properly shut down, so the address (127.0.0.1:8080) is...
Read more >
Kolibri - Read the Docs
The Device Owner account registration page appears when you start the server for the first time after the installation of Kolibri and open...
Read more >
Not able to start dev server in my local machine #725 - GitHub
I did everything as mentioned in readme.md. The command - yarn run dev. I got this error :- yarn run v1.22.18
Read more >
Kolibri Documentation | Manualzz
Note: You need to do the initial setup only once, the first time you start Kolibri after the installation. 1. Select the default...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found