Improve plugin error reporting when failed to load #11204

Closed
opened 2025-12-29 21:41:54 +01:00 by adam · 1 comment
Owner

Originally created by @PieterL75 on GitHub (May 21, 2025).

NetBox version

v4.2.9

Feature type

Change to existing functionality

Proposed functionality

When a plugin fails to load, the manage.py shows a random plugin that is not found. It will (almost) never be the one with the issues.
A correct error is only found in the journalctl.
This FR is a request to provide better feedback on what plugin is failing to load and why, when running the manage.py

Use case

After upgrading to v4.2.9, I got this error when running manage.py migrate (within the venv)

File "/opt/netbox/venv/lib/python3.12/site-packages/django/apps/registry.py", line 165, in get_app_config
raise LookupError(message)
LookupError: No installed app with label 'plugin_name1'.
But when setting plugin_name1 as the only plugin, the migration runs fine.

When restarted the netbox service and checked the journalctl, I saw this error

django.core.exceptions.ImproperlyConfigured: Plugin MyFCoolPlugin2 requires NetBox maximum version 4.1.99 (current: 4.2.9).
This means that plugin_name1 is not the one causing the problems, but MyCoolPlugin2.

It would be an improvement if the errormessage of the failing plugin is displayed in the manage.py error, instead of the random pluginname

Database changes

No response

External dependencies

No response

Originally created by @PieterL75 on GitHub (May 21, 2025). ### NetBox version v4.2.9 ### Feature type Change to existing functionality ### Proposed functionality When a plugin fails to load, the manage.py shows a random plugin that is not found. It will (almost) never be the one with the issues. A correct error is only found in the journalctl. This FR is a request to provide better feedback on what plugin is failing to load and why, when running the manage.py ### Use case After upgrading to v4.2.9, I got this error when running `manage.py migrate` (within the venv) > File "/opt/netbox/venv/lib/python3.12/site-packages/django/apps/registry.py", line 165, in get_app_config > raise LookupError(message) > LookupError: No installed app with label 'plugin_name1'. But when setting plugin_name1 as the only plugin, the migration runs fine. When restarted the netbox service and checked the journalctl, I saw this error > django.core.exceptions.ImproperlyConfigured: Plugin MyFCoolPlugin2 requires NetBox maximum version 4.1.99 (current: 4.2.9). This means that plugin_name1 is not the one causing the problems, but MyCoolPlugin2. It would be an improvement if the errormessage of the failing plugin is displayed in the manage.py error, instead of the random pluginname ### Database changes _No response_ ### External dependencies _No response_
adam added the type: feature label 2025-12-29 21:41:54 +01:00
adam closed this issue 2025-12-29 21:41:54 +01:00
Author
Owner

@jeremystretch commented on GitHub (May 22, 2025):

When a plugin fails to load, the manage.py shows a random plugin that is not found. It will (almost) never be the one with the issues.

This sounds pretty clearly like a bug. If you're able to reproduce it, please resubmit this as a bug report. We'll need concrete reproduction steps for testing.

@jeremystretch commented on GitHub (May 22, 2025): > When a plugin fails to load, the manage.py shows a random plugin that is not found. It will (almost) never be the one with the issues. This sounds pretty clearly like a bug. If you're able to reproduce it, please resubmit this as a bug report. We'll need concrete reproduction steps for testing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11204