Public Demo Instance: Server Error when creating user which already exists #9503

Closed
opened 2025-12-29 20:50:44 +01:00 by adam · 4 comments
Owner

Originally created by @ByteOtter on GitHub (Apr 19, 2024).

Deployment Type

NetBox Cloud

NetBox Version

v3.7.5

Python Version

3.8

Steps to Reproduce

  1. Go to https://demo.netbox.dev
  2. Click on 'Login'
  3. Click on 'Click here to create a new user account'
  4. Enter test as username and password; Click 'Create & Sign In'
    --> See Server Error message

Alternatively:
Follow through to step 3
4. Enter some username and password.
5. Click 'Create & Sign In'
6. Logout
7. Click 'Login'
8. Click 'Create new user'
9. Try to enter the same username again; Click 'Create & Sign In'
--> See error

Expected Behavior

As the error clearly states, a user called test does already exist.
I expected a on-site hint that the user already exists and that I must choose another name. Not a Django error message.

Observed Behavior

A Server Error is displayed:

<class 'django.db.utils.IntegrityError'>

duplicate key value violates unique constraint "auth_user_username_key"
DETAIL:  Key (username)=(test) already exists.

Python version: 3.8.10
NetBox version: 3.7.5
Plugins: 
  netbox_demo: 0.3.1

image

Originally created by @ByteOtter on GitHub (Apr 19, 2024). ### Deployment Type NetBox Cloud ### NetBox Version v3.7.5 ### Python Version 3.8 ### Steps to Reproduce 1. Go to https://demo.netbox.dev 2. Click on 'Login' 3. Click on 'Click here to create a new user account' 4. Enter `test` as username and password; Click 'Create & Sign In' --> See Server Error message --- Alternatively: Follow through to step 3 4. Enter some username and password. 5. Click 'Create & Sign In' 6. Logout 7. Click 'Login' 8. Click 'Create new user' 9. Try to enter the same username again; Click 'Create & Sign In' --> See error ### Expected Behavior As the error clearly states, a user called `test` does already exist. I expected a on-site hint that the user already exists and that I must choose another name. Not a Django error message. ### Observed Behavior A `Server Error` is displayed: ``` <class 'django.db.utils.IntegrityError'> duplicate key value violates unique constraint "auth_user_username_key" DETAIL: Key (username)=(test) already exists. Python version: 3.8.10 NetBox version: 3.7.5 Plugins: netbox_demo: 0.3.1 ``` ![image](https://github.com/netbox-community/netbox/assets/90576030/7403b686-a165-4b67-a299-d9a746332738)
adam closed this issue 2025-12-29 20:50:44 +01:00
Author
Owner

@jeffgdotorg commented on GitHub (Apr 19, 2024):

Please try to reproduce this issue on a freshly installed instance. The public demo system's database has been through a lot and may be a factor; that's why our bug report issue template warns against relying on the demo instance for reproducing suspected bugs.

@jeffgdotorg commented on GitHub (Apr 19, 2024): Please try to reproduce this issue on a freshly installed instance. The public demo system's database has been through a lot and may be a factor; that's why our [bug report issue template](https://github.com/netbox-community/netbox/blob/develop/.github/ISSUE_TEMPLATE/bug_report.yaml) warns against relying on the demo instance for reproducing suspected bugs.
Author
Owner

@jeffgdotorg commented on GitHub (Apr 19, 2024):

The problem you're seeing is a known problem caused by a plugin that we use only on the demo system which enables anybody to create a new user. Nobody would ever use that plugin in production.

Thanks for being alert and taking the time to tell us about what you encountered.

@jeffgdotorg commented on GitHub (Apr 19, 2024): The problem you're seeing is a known problem caused by a plugin that we use only on the demo system which enables anybody to create a new user. Nobody would ever use that plugin in production. Thanks for being alert and taking the time to tell us about what you encountered.
Author
Owner

@ByteOtter commented on GitHub (Apr 19, 2024):

Thanks for clarifying! :)

@ByteOtter commented on GitHub (Apr 19, 2024): Thanks for clarifying! :)
Author
Owner

@jeremystretch commented on GitHub (Apr 19, 2024):

Nobody would ever use that plugin in production.

One hopes.

@jeremystretch commented on GitHub (Apr 19, 2024): > Nobody would ever use that plugin in production. One hopes.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9503