Opened 3 years ago
Closed 3 years ago
#34487 closed Bug (needsinfo)
Django crashes due to ManifestStaticFilesStorage plugin in 4.2
| Reported by: | Thijs Suijten | Owned by: | nobody |
|---|---|---|---|
| Component: | contrib.staticfiles | Version: | 4.2 |
| Severity: | Normal | Keywords: | static ManifestStaticFilesStorage |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
I have a pretty standard Django setup, I upgraded to 4.2 and deployed my application only to find a 500 error on the login page with the below exception.
My suspicion is that this is caused because of: "4.2: Experimental optional support for finding paths to JavaScript modules in import and export statements was added."
This is my stack trace (from Google AppEngine)
Internal Server Error: /admin/login/
Traceback (most recent call last):
File "/layers/google.python.pip/pip/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
File "/layers/google.python.pip/pip/lib/python3.10/site-packages/django/core/handlers/base.py", line 220, in _get_response
response = response.render()
File "/layers/google.python.pip/pip/lib/python3.10/site-packages/django/template/response.py", line 111, in render
self.content = self.rendered_content
File "/layers/google.python.pip/pip/lib/python3.10/site-packages/django/template/response.py", line 89, in rendered_content
return template.render(context, self._request)
File "/layers/google.python.pip/pip/lib/python3.10/site-packages/django/template/backends/django.py", line 61, in render
return self.template.render(context)
File "/layers/google.python.pip/pip/lib/python3.10/site-packages/django/template/base.py", line 175, in render
return self._render(context)
File "/layers/google.python.pip/pip/lib/python3.10/site-packages/django/test/utils.py", line 112, in instrumented_test_render
return self.nodelist.render(context)
File "/layers/google.python.pip/pip/lib/python3.10/site-packages/django/template/base.py", line 1005, in render
return SafeString("".join([node.render_annotated(context) for node in self]))
File "/layers/google.python.pip/pip/lib/python3.10/site-packages/django/template/base.py", line 1005, in <listcomp>
return SafeString("".join([node.render_annotated(context) for node in self]))
File "/layers/google.python.pip/pip/lib/python3.10/site-packages/django/template/base.py", line 966, in render_annotated
return self.render(context)
File "/layers/google.python.pip/pip/lib/python3.10/site-packages/django/template/loader_tags.py", line 157, in render
return compiled_parent._render(context)
File "/layers/google.python.pip/pip/lib/python3.10/site-packages/django/test/utils.py", line 112, in instrumented_test_render
return self.nodelist.render(context)
File "/layers/google.python.pip/pip/lib/python3.10/site-packages/django/template/base.py", line 1005, in render
return SafeString("".join([node.render_annotated(context) for node in self]))
File "/layers/google.python.pip/pip/lib/python3.10/site-packages/django/template/base.py", line 1005, in <listcomp>
return SafeString("".join([node.render_annotated(context) for node in self]))
File "/layers/google.python.pip/pip/lib/python3.10/site-packages/django/template/base.py", line 966, in render_annotated
return self.render(context)
File "/layers/google.python.pip/pip/lib/python3.10/site-packages/django/template/loader_tags.py", line 157, in render
return compiled_parent._render(context)
File "/layers/google.python.pip/pip/lib/python3.10/site-packages/django/test/utils.py", line 112, in instrumented_test_render
return self.nodelist.render(context)
File "/layers/google.python.pip/pip/lib/python3.10/site-packages/django/template/base.py", line 1005, in render
return SafeString("".join([node.render_annotated(context) for node in self]))
File "/layers/google.python.pip/pip/lib/python3.10/site-packages/django/template/base.py", line 1005, in <listcomp>
return SafeString("".join([node.render_annotated(context) for node in self]))
File "/layers/google.python.pip/pip/lib/python3.10/site-packages/django/template/base.py", line 966, in render_annotated
return self.render(context)
File "/layers/google.python.pip/pip/lib/python3.10/site-packages/django/template/loader_tags.py", line 157, in render
return compiled_parent._render(context)
File "/layers/google.python.pip/pip/lib/python3.10/site-packages/django/test/utils.py", line 112, in instrumented_test_render
return self.nodelist.render(context)
File "/layers/google.python.pip/pip/lib/python3.10/site-packages/django/template/base.py", line 1005, in render
return SafeString("".join([node.render_annotated(context) for node in self]))
File "/layers/google.python.pip/pip/lib/python3.10/site-packages/django/template/base.py", line 1005, in <listcomp>
return SafeString("".join([node.render_annotated(context) for node in self]))
File "/layers/google.python.pip/pip/lib/python3.10/site-packages/django/template/base.py", line 966, in render_annotated
return self.render(context)
File "/layers/google.python.pip/pip/lib/python3.10/site-packages/django/template/loader_tags.py", line 63, in render
result = block.nodelist.render(context)
File "/layers/google.python.pip/pip/lib/python3.10/site-packages/django/template/base.py", line 1005, in render
return SafeString("".join([node.render_annotated(context) for node in self]))
File "/layers/google.python.pip/pip/lib/python3.10/site-packages/django/template/base.py", line 1005, in <listcomp>
return SafeString("".join([node.render_annotated(context) for node in self]))
File "/layers/google.python.pip/pip/lib/python3.10/site-packages/django/template/base.py", line 966, in render_annotated
return self.render(context)
File "/layers/google.python.pip/pip/lib/python3.10/site-packages/django/templatetags/static.py", line 116, in render
url = self.url(context)
File "/layers/google.python.pip/pip/lib/python3.10/site-packages/django/templatetags/static.py", line 113, in url
return self.handle_simple(path)
File "/layers/google.python.pip/pip/lib/python3.10/site-packages/django/templatetags/static.py", line 129, in handle_simple
return staticfiles_storage.url(path)
File "/layers/google.python.pip/pip/lib/python3.10/site-packages/django/contrib/staticfiles/storage.py", line 203, in url
return self._url(self.stored_name, name, force)
File "/layers/google.python.pip/pip/lib/python3.10/site-packages/django/contrib/staticfiles/storage.py", line 182, in _url
hashed_name = hashed_name_func(*args)
File "/layers/google.python.pip/pip/lib/python3.10/site-packages/django/contrib/staticfiles/storage.py", line 513, in stored_name
raise ValueError(
ValueError: Missing staticfiles manifest entry for 'admin/js/theme.js'
Note:
See TracTickets
for help on using tickets.
Replying to tsuijten:
This is disabled by default, so cannot cause any issues.
I don't think you've explained the issue in enough detail to confirm a bug in Django. Please reopen the ticket if you can debug your issue and provide details about why and where Django is at fault or a sample project that reproduces your issue.