ValueError: Missing staticfiles manifest entry for 'css/bootstrap.min.css'

I can’t get rid of the error for missing file in Django version 5. I’ve tried many solutions but its not working for me. Please advise.

Error:

Traceback (most recent call last):
  File "D:\Program Files\Python312\Lib\wsgiref\handlers.py", line 137, in run
    self.result = application(self.environ, self.start_response)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mudassar\PycharmProjects\djevent\.venv\Lib\site-packages\django\core\handlers\wsgi.py", line 
124, in __call__
    response = self.get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mudassar\PycharmProjects\djevent\.venv\Lib\site-packages\django\core\handlers\base.py", line 
140, in get_response
    response = self._middleware_chain(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mudassar\PycharmProjects\djevent\.venv\Lib\site-packages\django\core\handlers\exception.py", 
line 57, in inner
    response = response_for_exception(request, exc)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mudassar\PycharmProjects\djevent\.venv\Lib\site-packages\django\core\handlers\exception.py", 
line 140, in response_for_exception
    response = handle_uncaught_exception(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mudassar\PycharmProjects\djevent\.venv\Lib\site-packages\django\core\handlers\exception.py", 
line 185, in handle_uncaught_exception
    return callback(request)
           ^^^^^^^^^^^^^^^^^
  File "C:\Users\mudassar\PycharmProjects\djevent\.venv\Lib\site-packages\django\utils\decorators.py", line 18
8, in _view_wrapper
    result = _process_exception(request, e)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mudassar\PycharmProjects\djevent\.venv\Lib\site-packages\django\utils\decorators.py", line 18
6, in _view_wrapper
    response = view_func(request, *args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mudassar\PycharmProjects\djevent\.venv\Lib\site-packages\django\views\defaults.py", line 99, 
in server_error
    return HttpResponseServerError(template.render())
                                   ^^^^^^^^^^^^^^^^^
  File "C:\Users\mudassar\PycharmProjects\djevent\.venv\Lib\site-packages\django\template\backends\django.py",
 line 61, in render
    return self.template.render(context)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mudassar\PycharmProjects\djevent\.venv\Lib\site-packages\django\template\base.py", line 171, 
in render
    return self._render(context)
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mudassar\PycharmProjects\djevent\.venv\Lib\site-packages\django\test\utils.py", line 111, in 
instrumented_test_render
    return self.nodelist.render(context)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mudassar\PycharmProjects\djevent\.venv\Lib\site-packages\django\template\base.py", line 1000,
 in render
    return SafeString("".join([node.render_annotated(context) for node in self]))
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mudassar\PycharmProjects\djevent\.venv\Lib\site-packages\django\template\base.py", line 961, 
in render_annotated
    return self.render(context)
           ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mudassar\PycharmProjects\djevent\.venv\Lib\site-packages\django\template\loader_tags.py", lin
e 159, in render
    return compiled_parent._render(context)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mudassar\PycharmProjects\djevent\.venv\Lib\site-packages\django\test\utils.py", line 111, in 
instrumented_test_render
    return self.nodelist.render(context)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mudassar\PycharmProjects\djevent\.venv\Lib\site-packages\django\template\base.py", line 1000,
 in render
    return SafeString("".join([node.render_annotated(context) for node in self]))
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mudassar\PycharmProjects\djevent\.venv\Lib\site-packages\django\template\base.py", line 961, 
in render_annotated
    return self.render(context)
           ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mudassar\PycharmProjects\djevent\.venv\Lib\site-packages\django\template\loader_tags.py", lin
e 210, in render
    return template.render(context)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mudassar\PycharmProjects\djevent\.venv\Lib\site-packages\django\template\base.py", line 173, 
in render
    return self._render(context)
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mudassar\PycharmProjects\djevent\.venv\Lib\site-packages\django\test\utils.py", line 111, in 
instrumented_test_render
    return self.nodelist.render(context)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mudassar\PycharmProjects\djevent\.venv\Lib\site-packages\django\template\base.py", line 1000,
 in render
    return SafeString("".join([node.render_annotated(context) for node in self]))
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mudassar\PycharmProjects\djevent\.venv\Lib\site-packages\django\template\base.py", line 961, 
in render_annotated
    return self.render(context)
           ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mudassar\PycharmProjects\djevent\.venv\Lib\site-packages\django\templatetags\static.py", line
 116, in render
    url = self.url(context)
          ^^^^^^^^^^^^^^^^^
  File "C:\Users\mudassar\PycharmProjects\djevent\.venv\Lib\site-packages\django\templatetags\static.py", line
 113, in url
    return self.handle_simple(path)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mudassar\PycharmProjects\djevent\.venv\Lib\site-packages\django\templatetags\static.py", line
 129, in handle_simple
    return staticfiles_storage.url(path)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mudassar\PycharmProjects\djevent\.venv\Lib\site-packages\django\contrib\staticfiles\storage.p
y", line 203, in url
    return self._url(self.stored_name, name, force)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mudassar\PycharmProjects\djevent\.venv\Lib\site-packages\django\contrib\staticfiles\storage.p
y", line 182, in _url
    hashed_name = hashed_name_func(*args)
                  ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mudassar\PycharmProjects\djevent\.venv\Lib\site-packages\django\contrib\staticfiles\storage.p
y", line 516, in stored_name
    raise ValueError(
ValueError: Missing staticfiles manifest entry for 'css/bootstrap.min.css'
[15/Apr/2024 05:01:53] "GET / HTTP/1.1" 500 59

We need more information like, can you show us your STATIC_ROOT and STATIC_URL ? Can you show us your STATICFILES_STORAGE? Did you collectstatic? Have you tried to clear the cache and try again?

Side note: When posting code, templates, or error messages here, enclose the code between lines of three backtick - ` characters. This means you’ll have a line of ```, then your code, then another line of ```. This forces the forum software to keep your code properly formatted. (I’ve taken the liberty of fixing your original post for you.)

Thank you for your response. Below are my settings.py. Also I’ve added static in URL with media as well.

import os
from pathlib import Path

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'django-insecure-(+rl)1n#q*(&5n@!i$pfv-g&uwd(1dvgpy3s20v%4=53=u=g@9'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False

ALLOWED_HOSTS = ['127.0.0.1', '91.108.111.152', '91.108.111.152:8000', 'disabilityjobcenter.pk']


# Application definition

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sites',
    'django.contrib.sessions',
    'django.contrib.messages',
    #'whitenoise.runserver_nostatic',
    'django.contrib.staticfiles',
    'core',
    'tinymce',
    'crispy_forms',
    'crispy_bootstrap4',
    #'debug_toolbar',

]
handler404 = 'core.views.error_404_view'
handler400 = 'core.views.error_400_view'
handler500 = 'core.views.error_500_view'
handler403 = 'core.views.error_403_view'

CRISPY_TEMPLATE_PACK = 'bootstrap4'

SITE_ID = 1
TINYMCE_DEFAULT_CONFIG = {
    "theme": "silver",
    "height": 500,
    "font-family": "Arial, Monospace, sans-serif, serif, Comic Sans MS",
    "font-size": "10px, 12px, 14px, 16px, 18px, 20px, 24px, 36px",
    "menubar": True,
    "plugins": "advlist,autolink,lists,link,image,charmap,print,preview,anchor,"
    "searchreplace,visualblocks,code,fullscreen,insertdatetime,media,table,paste,"
    "code,help,wordcount",
    "toolbar": "undo redo | formatselect | "
    "bold italic backcolor | alignleft aligncenter "
    "alignright alignjustify | bullist numlist outdent indent | "
    "removeformat | help",
    "images_upload_url": "upload_image",

}    

DATA_UPLOAD_MAX_MEMORY_SIZE = 5242880 # 5 MB

DJANGORESIZED_DEFAULT_SIZE = [1920, 1080]
DJANGORESIZED_DEFAULT_SCALE = 0.5
DJANGORESIZED_DEFAULT_QUALITY = 96
DJANGORESIZED_DEFAULT_KEEP_META = True
DJANGORESIZED_DEFAULT_FORCE_FORMAT = 'JPEG'
DJANGORESIZED_DEFAULT_FORMAT_EXTENSIONS = {'JPEG': ".jpg"}
DJANGORESIZED_DEFAULT_NORMALIZE_ROTATION = True


MIDDLEWARE = [
    'django.middleware.security.SecurityMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    #'whitenoise.middleware.WhiteNoiseMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
    #"debug_toolbar.middleware.DebugToolbarMiddleware",
]
INTERNAL_IPS = [
    # ...
    "127.0.0.1",
    # ...
]
ROOT_URLCONF = 'steprecruit.urls'

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [os.path.join(BASE_DIR, 'templates')],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                'django.template.context_processors.debug',
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                'django.contrib.messages.context_processors.messages',
            ],
        },
    },
]

WSGI_APPLICATION = 'steprecruit.wsgi.application'


# Database
# https://docs.djangoproject.com/en/5.0/ref/settings/#databases


DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'NAME': 'step',
        'USER': 'step',
        'PASSWORD': 'Hello123',
        'HOST': 'localhost',
        'PORT': '5432',
    }
}

# Password validation
# https://docs.djangoproject.com/en/5.0/ref/settings/#auth-password-validators

AUTH_PASSWORD_VALIDATORS = [
    {
        'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
    },
]


# Internationalization
# https://docs.djangoproject.com/en/5.0/topics/i18n/

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_TZ = True



STATIC_URL = '/static/'
AUTH_USER_MODEL = 'core.CustomUser'

STATIC_ROOT = os.path.join(os.path.dirname(BASE_DIR), "static", "static")
STATICFILES_DIRS = (
    os.path.join(BASE_DIR, 'static', 'static'),
)
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(os.path.dirname(BASE_DIR), "static", "media")

# Default primary key field type
# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'


LOGIN_REDIRECT_URL = "/"


#STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'

STATICFILES_FINDERS = [
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
]

# WHITENOISE_USE_FINDERS = True
# WHITENOISE_MANIFEST_STRICT = False
# WHITENOISE_ALLOW_ALL_ORIGINS = True 

URLS:

from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static
from django.contrib.staticfiles.urls import staticfiles_urlpatterns

admin.site.site_header = "STEP Admin"
admin.site.site_title = "STEP Admin Portal"
admin.site.index_title = "Welcome to STEP Job Portal"
from . import views
urlpatterns = [
    path('', include('core.urls')),
    path('admin/', admin.site.urls),
    path('tinymce/', include('tinymce.urls')),
    #path("__debug__/", include("debug_toolbar.urls")),
    #path("accounts/", include("django.contrib.auth.urls")),

    #path('<series>/<article>/upload_image', views.upload_image, name="upload_image"),
]

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
    urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) 

Side note: The lines of ``` must be lines by themselves. They can’t be parts of other lines. (I’ve fixed this for you on your recent post.)

You’ve got DEBUG=False.

Is this a production environment or a development environment?

How are you running your project?

Apologies for the mistake above. For now I did it for your visual in dev env locally. But on server its same in prod. I also commented out to test if its bug with Whitenoise. Thanking you in advance for your kind help.

All I solved this problem by uninstalling 5.0.3 and using 5.0.2. There was no error message and now my site is live.