[ISE] Internal Server Error previewing any API Reference page

RESOLVED FIXED

Status

defect
P1
major
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: sheppy, Unassigned)

Tracking

Details

(Whiteboard: [specification][type:bug])

Reporter

Description

5 years ago
What did you do?
================
1. Visited https://developer.mozilla.org/en-US/docs/Web/API/IDBFactory
2. Clicked Edit button.
3. Clicked Preview button.

What happened?
==============
Got an internal server error.

What should have happened?
==========================
A preview of the page should have appeared.

Is there anything else we should know?
======================================
Also happens for sure on:

https://developer.mozilla.org/en-US/docs/Web/API/Performance
https://developer.mozilla.org/en-US/docs/Web/API/Window
https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement

and more
I can confirm that we get an ISE. Luke, can you tell us whether this bug is affecting a lot of people, and can you tell us what the stack says about this?

:teoli and :fscholz think this may be a regression that appeared in the last couple of weeks.
Severity: normal → major
Flags: needinfo?(lcrouch)
39 errors in the last week.
Flags: needinfo?(lcrouch)
Reporter

Comment 3

5 years ago
It's worth noting of course that once someone figures out that clicking "Preview" always gets them an Internal Server Error, they will stop clicking it. :)
Duplicate of this bug: 1065638
Duplicate of this bug: 1081671
Tracebacks look like:

Traceback (most recent call last):
File "/usr/lib64/python2.6/site-packages/newrelic-2.22.1.20/newrelic/hooks/framework_django.py", line 492, in wrapper return wrapped(*args, **kwargs)
File "/data/www/developer.mozilla.org/kuma/apps/access/decorators.py", line 46, in _wrapped_view return view_fn(request, *args, **kwargs)
File "/data/www/developer.mozilla.org/kuma/vendor/src/django/django/views/decorators/http.py", line 41, in inner return func(request, *args, **kwargs)
File "/data/www/developer.mozilla.org/kuma/kuma/wiki/views.py", line 1339, in preview_revision return render(request, 'wiki/preview.html', data)
File "/data/www/developer.mozilla.org/kuma/vendor/src/django/django/shortcuts/__init__.py", line 44, in render return HttpResponse(loader.render_to_string(*args, **kwargs),
File "/data/www/developer.mozilla.org/kuma/vendor/src/django/django/template/loader.py", line 176, in render_to_string return t.render(context_instance)
File "/data/www/developer.mozilla.org/kuma/vendor/src/jingo/jingo/__init__.py", line 191, in render return super(Template, self).render(context_dict)
File "/usr/lib64/python2.6/site-packages/newrelic-2.22.1.20/newrelic/api/function_trace.py", line 96, in dynamic_wrapper return wrapped(*args, **kwargs)
File "/usr/lib64/python2.6/site-packages/jinja2/environment.py", line 891, in render return self.environment.handle_exception(exc_info, True)
File "/data/www/developer.mozilla.org/kuma/kuma/wiki/templates/wiki/preview.html", line 3, in top-level template code {% set classes = 'document' %}
File "/data/www/developer.mozilla.org/kuma/kuma/wiki/templates/wiki/base.html", line 14, in top-level template code {% set scripts = ('wiki',) %}
File "/data/www/developer.mozilla.org/kuma/templates/base.html", line 161, in top-level template code {% block content %}{% endblock %}
File "/data/www/developer.mozilla.org/kuma/kuma/wiki/templates/wiki/preview.html", line 9, in block "content" {% include 'wiki/includes/kumascript_errors.html' %}
File "/data/www/developer.mozilla.org/kuma/kuma/wiki/templates/wiki/includes/kumascript_errors.html", line 50, in top-level template code {{ _('Parsing macro:') }} <code>{{ template_name }}({% if error_meta.token %}{{ error_meta.token.args }}{% endif %})</code> (<a href="{{ url('wiki.edit_document', document.slug) }}">{{ _('Edit Document') }}</a>)<br>
File "/usr/lib64/python2.6/site-packages/jinja2/environment.py", line 371, in getattr return getattr(obj, attribute)
UndefinedError: 'document' is undefined 

From https://rpm.newrelic.com/accounts/263620/applications/3172075/traced_errors/2363939509

Comment 7

5 years ago
Bumping based on email on MDN-drivers list from Nickolay Ponomarev

"This is a regression in basic wiki functionality that affects a large
number of pages. I'd expect it to have a higher priority - it has been
sitting there untouched for a month."
Flags: needinfo?(mars)
Flags: needinfo?(hoosteeno)
Priority: -- → P1
PR is in for this.  I didn't see it come in originally.

Comment 9

5 years ago
Commits pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/0f1d4630ec0c10f0efca412cd9d4251e4f13f417
fix bug 1062856 - Prevent ISE on kumascript errors within preview

https://github.com/mozilla/kuma/commit/386a7e630d2589ad8eb98629ade38c7853aae780
Merge pull request #2822 from groovecoder/ks-preview-ise-1062856

fix bug 1062856 - Prevent ISE on kumascript errors within preview

Updated

5 years ago
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Flags: needinfo?(mars)
Flags: needinfo?(hoosteeno)
You need to log in before you can comment on or make changes to this bug.