[Django] #34487: Django crashes due to ManifestStaticFilesStorage plugin in 4.2

3 views
Skip to first unread message

Django

unread,
Apr 12, 2023, 3:51:12 AM4/12/23
to django-...@googlegroups.com
#34487: Django crashes due to ManifestStaticFilesStorage plugin in 4.2
-------------------------------------+-------------------------------------
Reporter: tsuijten | Owner: nobody
Type: Bug | Status: new
Component: | Version: 4.2
contrib.staticfiles | Keywords: static
Severity: Normal | ManifestStaticFilesStorage
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
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'
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34487>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 12, 2023, 3:59:26 AM4/12/23
to django-...@googlegroups.com
#34487: Django crashes due to ManifestStaticFilesStorage plugin in 4.2
-------------------------------------+-------------------------------------
Reporter: tsuijten | Owner: nobody
Type: Bug | Status: closed
Component: contrib.staticfiles | Version: 4.2
Severity: Normal | Resolution: needsinfo
Keywords: static | Triage Stage:
ManifestStaticFilesStorage | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* status: new => closed
* resolution: => needsinfo


Comment:

Replying to [ticket:34487 tsuijten]:


> 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 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.

--
Ticket URL: <https://code.djangoproject.com/ticket/34487#comment:1>

Reply all
Reply to author
Forward
0 new messages