Debug toolbar is missing #2 #11036

Closed
opened 2025-12-29 21:39:26 +01:00 by adam · 12 comments
Owner

Originally created by @Azmodeszer on GitHub (Apr 16, 2025).

Deployment Type

Self-hosted

NetBox Version

v4.2.7

Python Version

3.11

Steps to Reproduce

I have the same problem: https://github.com/netbox-community/netbox/issues/19193 (only that it doesn't magically fix itself after a few tries :) )

  1. Set DEBUG = True and INTERNAL_IPS = ('*') (or my IP specifically) in the config.
  2. Restart the service.
  3. Check the webUI.

Expected Behavior

Toolbar shows up.

Observed Behavior

I only see the debug mode banner, but no toolbar.

Originally created by @Azmodeszer on GitHub (Apr 16, 2025). ### Deployment Type Self-hosted ### NetBox Version v4.2.7 ### Python Version 3.11 ### Steps to Reproduce I have the same problem: https://github.com/netbox-community/netbox/issues/19193 (only that it doesn't magically fix itself after a few tries :) ) 1. Set `DEBUG = True` and `INTERNAL_IPS = ('*')` (or my IP specifically) in the config. 2. Restart the service. 3. Check the webUI. ### Expected Behavior Toolbar shows up. ### Observed Behavior I only see the debug mode banner, but no toolbar.
adam closed this issue 2025-12-29 21:39:26 +01:00
Author
Owner

@Azmodeszer commented on GitHub (Apr 16, 2025):

Tried on Firefox and Chrome, also in incognito mode without any extensions. Same.

@Azmodeszer commented on GitHub (Apr 16, 2025): Tried on Firefox and Chrome, also in incognito mode without any extensions. Same.
Author
Owner

@peteeckel commented on GitHub (Apr 16, 2025):

Did you really set INTERNAL_IPS = ('*') or rather INTERNAL_IPS = ('*',)? Not sure what will happen with the first notation, but it's definitely not valid python syntax for a tuple.

>>> INTERNAL_IPS = ('*')
>>> INTERNAL_IPS
'*'
>>> INTERNAL_IPS = ('*',)
>>> INTERNAL_IPS
('*',)

According to the docs, Django expect it to be a list (or tuple).

@peteeckel commented on GitHub (Apr 16, 2025): Did you really set `INTERNAL_IPS = ('*')` or rather `INTERNAL_IPS = ('*',)`? Not sure what will happen with the first notation, but it's definitely not valid python syntax for a tuple. ```python >>> INTERNAL_IPS = ('*') >>> INTERNAL_IPS '*' >>> INTERNAL_IPS = ('*',) >>> INTERNAL_IPS ('*',) ``` According to the [docs](https://docs.djangoproject.com/en/5.2/ref/settings/#internal-ips), Django expect it to be a list (or tuple).
Author
Owner

@Azmodeszer commented on GitHub (Apr 16, 2025):

Neither works.

@Azmodeszer commented on GitHub (Apr 16, 2025): Neither works.
Author
Owner

@peteeckel commented on GitHub (Apr 16, 2025):

OK, I just wanted to be sure. I tried INTERNAL_IPS = ('*',) yesterday as well and it didn't help either, but then suddenly (and without me being able to find the reason) it worked.

@peteeckel commented on GitHub (Apr 16, 2025): OK, I just wanted to be sure. I tried `INTERNAL_IPS = ('*',)` yesterday as well and it didn't help either, but then suddenly (and without me being able to find the reason) it worked.
Author
Owner

@jeremystretch commented on GitHub (Apr 16, 2025):

  1. Set DEBUG = True and INTERNAL_IPS = ('*') (or my IP specifically) in the config.

INTERNAL_IPS is a Django setting and I don't believe it supports wildcards (unlike ALLOWED_HOSTS).

I am unable to replicate this locally when setting INTERNAL_IPS = ('127.0.0.1', '::1').

@jeremystretch commented on GitHub (Apr 16, 2025): > 1. Set `DEBUG = True` and `INTERNAL_IPS = ('*')` (or my IP specifically) in the config. [`INTERNAL_IPS`](https://docs.djangoproject.com/en/5.2/ref/settings/#internal-ips) is a Django setting and I don't believe it supports wildcards (unlike `ALLOWED_HOSTS`). I am unable to replicate this locally when setting `INTERNAL_IPS = ('127.0.0.1', '::1')`.
Author
Owner

@Azmodeszer commented on GitHub (Apr 16, 2025):

Fair enough, but it didn't work with my specific IP either. It does accept private IPs, right?

@Azmodeszer commented on GitHub (Apr 16, 2025): Fair enough, but it didn't work with my specific IP either. It does accept private IPs, right?
Author
Owner

@jeremystretch commented on GitHub (Apr 16, 2025):

Yes, but the IP listed needs to match what Django sees as the source IP address of the incoming request.

@jeremystretch commented on GitHub (Apr 16, 2025): Yes, but the IP listed needs to match what Django sees as the source IP address of the incoming request.
Author
Owner

@Azmodeszer commented on GitHub (Apr 16, 2025):

Yep, that's what I put in there.

@Azmodeszer commented on GitHub (Apr 16, 2025): Yep, that's what I put in there.
Author
Owner

@DanSheps commented on GitHub (Apr 16, 2025):

It also needs to be a tuple, not just a single IP. If you do a single IP it will break apart the IP into it's component parts, example, 127.0.0.1 becomes: 1, 2, 7, 0, 0, 1

@DanSheps commented on GitHub (Apr 16, 2025): It also needs to be a tuple, not just a single IP. If you do a single IP it will break apart the IP into it's component parts, example, `127.0.0.1` becomes: `1`, `2`, `7`, `0`, `0`, `1`
Author
Owner

@Azmodeszer commented on GitHub (Apr 16, 2025):

This is what I set: INTERNAL_IPS = ('127.0.0.1','::1','192.168.1.100')

@Azmodeszer commented on GitHub (Apr 16, 2025): This is what I set: `INTERNAL_IPS = ('127.0.0.1','::1','192.168.1.100')`
Author
Owner

@DanSheps commented on GitHub (Apr 16, 2025):

I am unable to replicate this on my end as well, I see the debug toolbar pop up with no issues on my test instance.

@DanSheps commented on GitHub (Apr 16, 2025): I am unable to replicate this on my end as well, I see the debug toolbar pop up with no issues on my test instance.
Author
Owner

@jeremystretch commented on GitHub (Apr 16, 2025):

I'm going to close this out as it does not appear to be a NetBox issue. @Azmodeszer if you uncover a bug which requires a changes to NetBox itself to resolve, please submit a new bug report.

@jeremystretch commented on GitHub (Apr 16, 2025): I'm going to close this out as it does not appear to be a NetBox issue. @Azmodeszer if you uncover a bug which requires a changes to NetBox itself to resolve, please submit a new bug report.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11036