First `yarn devserver` on new KOLIBRI_HOME fails first time only
See original GitHub issueObserved 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.
- Set your KOLIBRI_HOME to a non-existent folder
yarn devserver
- 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'
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:
- Created 3 years ago
- Comments:8 (8 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
Fixed in #7938, specifically for the non-existent KOLIBRI_HOME folder case.