bad manifest results in UnicodeDecodeError: 'utf8' codec can't decode byte 0xe5 in position 93: invalid continuation byte

RESOLVED WONTFIX

Status

addons.mozilla.org Graveyard
Developer Pages
P1
normal
RESOLVED WONTFIX
6 years ago
2 years ago

People

(Reporter: kumar, Assigned: kumar)

Tracking

unspecified
6.4.5
x86
Mac OS X

Details

Attachments

(2 attachments)

Details: http://arecibo1.dmz.phx1.mozilla.com/view/1568802/

UnicodeDecodeError: 'utf8' codec can't decode byte 0xe5 in position 93: invalid continuation byte

  File "/data/www/addons.mozilla.org/zamboni/vendor/src/django/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/data/www/addons.mozilla.org/zamboni/apps/amo/decorators.py", line 112, in wrapper
    return f(*args, **kw)

  File "/data/www/addons.mozilla.org/zamboni/apps/amo/decorators.py", line 104, in wrapper
    return f(*args, **kw)

  File "/data/www/addons.mozilla.org/zamboni/apps/amo/decorators.py", line 29, in wrapper
    return func(request, *args, **kw)

  File "/data/www/addons.mozilla.org/zamboni/mkt/submit/decorators.py", line 19, in wrapper
    return f(request, *args, **kw)

  File "/data/www/addons.mozilla.org/zamboni/mkt/submit/views.py", line 73, in manifest
    if addon.has_icon_in_manifest():

  File "/data/www/addons.mozilla.org/zamboni/apps/webapps/models.py", line 135, in has_icon_in_manifest
    data = self.get_manifest_json()

  File "/data/www/addons.mozilla.org/zamboni/apps/webapps/models.py", line 143, in get_manifest_json
    return json.load(mf)

  File "/usr/lib64/python2.6/json/__init__.py", line 267, in load
    parse_constant=parse_constant, **kw)

  File "/usr/lib64/python2.6/json/__init__.py", line 307, in loads
    return _default_decoder.decode(s)

  File "/usr/lib64/python2.6/json/decoder.py", line 319, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())

  File "/usr/lib64/python2.6/json/decoder.py", line 336, in raw_decode
    obj, end = self._scanner.iterscan(s, **kw).next()

  File "/usr/lib64/python2.6/json/scanner.py", line 55, in iterscan
    rval, next_pos = action(m, context)

  File "/usr/lib64/python2.6/json/decoder.py", line 183, in JSONObject
    value, end = iterscan(s, idx=end, context=context).next()

  File "/usr/lib64/python2.6/json/scanner.py", line 55, in iterscan
    rval, next_pos = action(m, context)

  File "/usr/lib64/python2.6/json/decoder.py", line 155, in JSONString
    return scanstring(match.string, match.end(), encoding, strict)
oremj or clouserw, could one of you attach the file from /mnt/netapp_amo/addons.mozilla.org/files/temp/9ea334e2fc834028a66fdc3b96923afb.webapp so I can take a look at it?
Priority: -- → P2
Target Milestone: --- → 6.4.5
jason checked and it looks like this file doesn't exist anymore
Assignee: nobody → kumar.mcmillan
Priority: P2 → P1
making this a P1 because this code is not using encoding detection like other parts of the manifest code.
Created attachment 602399 [details]
user created manifest

this doesn't reproduce the exact traceback but produces a similar one that reveals the problem
Can someone attach this file for me? /mnt/netapp_amo/addons.mozilla.org/files/temp/dd689e8c818d4a6da1ab645d68ee6693.webapp It is a public manifest but it looks like the URL was changed to stop the error it originally reproduced. I'd like to check out the encoding of this file.
Created attachment 603861 [details]
non-utf8 manifest

manifest that can't be decoded with utf8 codec
Problems:

- we don't know what encoding these manifests were in
- chardet doesn't seem reliable enough to guess
- if we simply use chardet to make a guess, we run the risk of displaying the wrong info in its listing

Based on this, I think we should not attempt to fix this error but instead should prevent these manifests from entering the system in the first place (bug 733915)
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → WONTFIX
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.