recipes icon indicating copy to clipboard operation
recipes copied to clipboard

empty staticfiles.json breaks server

Open greenring opened this issue 3 years ago • 6 comments

Version

Please provide your current version (can be found on the system page since v0.8.4) Version: 1.0.0

Bug description

Exactly as described in #198 . I had a power cut. Somehow staticfiles.json became an empty file and I go HTTP 500 errors when trying to connect to the recipes server.

The workaround was as simple as stopping the container, deleting the empy file, and restarting the container.

greenring avatar Nov 04 '21 21:11 greenring

Very interesting. I will need to look into this and see if Django offers any features to mitigate this or if we can add a script to check if the file is empty

vabene1111 avatar Nov 05 '21 13:11 vabene1111

issue occured again (discord) some kind of fix is needed

vabene1111 avatar Nov 21 '21 18:11 vabene1111

Hi everybody, for what it's worth: I observed the same error on my setup (Raspbian). Luckily the workaround (deleting /opt/recipes/staticfiles/staticfiles.json within the container and restarting it) also did the trick for me.

P.S.: I love this project, thanks a lot for your work on this.

JackGuyver avatar Jan 20 '22 13:01 JackGuyver

Having the same problem using the latest docker image on my Raspberry Pi 4. Just deleting the file and restarting didn't help.

Had to additionally run

source venv/bin/activate

./manage.py collectstatic

and restart the whole stack.

RubberDog avatar Nov 26 '22 11:11 RubberDog

collectstatic is run by the boot.sh script so i suspect that you did not poperly down the containers so boot was not run again but yes, the fix you describe is what fixes the problem

vabene1111 avatar Nov 28 '22 06:11 vabene1111

Having the same problem using the latest docker image on my Raspberry Pi 4. Just deleting the file and restarting didn't help.

Had to additionally run

source venv/bin/activate

./manage.py collectstatic

and restart the whole stack.

Thank you, this was the fix for my issue today as well. Deleting the file alone didn't help as you described.