Repository navigation
Description
Please verify that this bug has NOT been raised before.
- I checked and didn't find a similar issue
Describe the bug*
When installing a plugin with static files (e.g. inventree-bulk-plugin) it creates an error on server startup while collecting plugin static files.
Steps to Reproduce
- Install
inventree-bulk-plugin - Restart server
- see logs
Expected behaviour
The static files should be collected correctly
Deployment Method
Docker
Version Information
InvenTree-Version: 1.4.0 dev
Django Version: 5.2.14
Commit Hash: 0668075
Commit Date: 2026-05-26
Commit Branch: null
Database: django.db.backends.postgresql
Debug-Mode: False
Deployed using Docker: True
Platform: Linux-6.8.12-15-pve-x86_64-with-glibc2.41
Installer: DOC
Active plugins: [{"name":"InvenTreeBarcode","slug":"inventreebarcode","version":"2.2.0"},{"name":"BOM Exporter","slug":"bom-exporter","version":"1.1.0"},{"name":"InvenTree Exporter","slug":"inventree-exporter","version":"1.0.0"},{"name":"Parameter Exporter","slug":"parameter-exporter","version":"2.0.0"},{"name":"InvenTreeEmailNotifications","slug":"inventree-email-notification","version":"1.0.0"},{"name":"InvenTreeUINotifications","slug":"inventree-ui-notification","version":"1.0.0"},{"name":"InvenTreeCurrencyExchange","slug":"inventreecurrencyexchange","version":"1.0.0"},{"name":"InvenTreeMachines","slug":"inventree-machines","version":"1.0.0"},{"name":"InvenTreeLabel","slug":"inventreelabel","version":"1.1.0"},{"name":"InvenTreeLabelMachine","slug":"inventreelabelmachine","version":"1.0.0"},{"name":"Custom Plugin","slug":"custom_plugin","version":"0.0.1"},{"name":"Report LSP","slug":"report-lsp","version":"0.1.2"},{"name":"InvenTreeBulkPlugin","slug":"inventree-bulk-plugin","version":"1.5.2"},{"name":"InvenTreeZebra","slug":"inventree-zebra","version":"0.1.1"}]
Try to reproduce on the demo site
I did not try to reproduce
Is the bug reproducible on the demo site?
Not reproducible
Relevant log output
Traceback (most recent call last):
File "/root/.local/lib/python3.14/site-packages/django_q/pusher.py", line 11, in <module>
apps.check_apps_ready()
~~~~~~~~~~~~~~~~~~~~~^^
File "/root/.local/lib/python3.14/site-packages/django/apps/registry.py", line 138, in check_apps_ready
raise AppRegistryNotReady("Apps aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/inventree/src/backend/InvenTree/plugin/installer.py", line 153, in install_plugins_file
plugin.staticfiles.collect_plugins_static_files()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/home/inventree/src/backend/InvenTree/plugin/staticfiles.py", line 45, in collect_plugins_static_files
copy_plugin_static_files(slug, check_reload=False)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/inventree/src/backend/InvenTree/plugin/staticfiles.py", line 112, in copy_plugin_static_files
staticfiles_storage.save(destination_path, src)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.local/lib/python3.14/site-packages/django/core/files/storage/base.py", line 49, in save
name = self._save(name, content)
File "/root/.local/lib/python3.14/site-packages/django/core/files/storage/filesystem.py", line 156, in _save
os.chmod(full_path, self.file_permissions_mode)
~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/home/inventree/data/static/plugins/inventree-bulk-plugin/dist/bulk-creation-panel.js'
Activity
SchrodingersGat commentedon Jun 9, 2026
The subdirectories should be created automatically - can you determine which (if any) of the following directories do not exist as expected:
./static/plugins/./static/plugins/inventree-bulk-plugin/./static/plugins/inventree-bulk-plugin/dist/wolflu05 commentedon Jun 9, 2026
I think I found the issue here too. Its again the
inventree-report-lsp-plugin. It runnsinvoke pluginsto the same time the server starts which also collects plugin static files during the same time so a race condition occours and the files get deleted twice where another process expects them... I did not know that invoke plugins also collects static files. Sorry for the trouble again.