Closed Bug 696931 Opened 13 years ago Closed 13 years ago

Nonconforming apps cause tracebacks instead of graceful errors

Categories

(addons.mozilla.org Graveyard :: Developer Pages, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: krupa.mozbugs, Assigned: kumar)

References

()

Details

steps to reproduce: 1. Load https://addons-dev.allizom.org/z/en-US/developers/app/submit/2 2. Try to validate http://birdwalker.com/manifest.webapp or http://birdwalker.com/manifest.json expected behavior: validation is successful actual behavior: Validation fails with a 500 https://addons-dev.allizom.org/z/en-US/developers/upload/138d86c6dcbd424faa8cffbdcf2defbb/json?_=1319496647504 GET /z/en-US/developers/upload/138d86c6dcbd424faa8cffbdcf2defbb/json?_=1319496647504 HTTP/1.1 Host: addons-dev.allizom.org User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 Accept: application/json, text/javascript, */*; q=0.01 Accept-Language: en-us,fr;q=0.8,af;q=0.5,en;q=0.3 Accept-Encoding: gzip, deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Connection: keep-alive X-CSRFToken: 8e8c78e954f4737d3a518d4c753a7732 X-Requested-With: XMLHttpRequest Referer: https://addons-dev.allizom.org/z/en-US/developers/app/submit/2 Cookie: anoncsrf=ceb3b7d7ac94740dfefb57f508f353be; sessionid=19536ec50aa6e73194f9ab86541bdb17; AMOv3=ok8rp7meim5b0bh2q7ftqn2ne4; AMOappName=firefox; amo_home_promo_seen=5; yes-I-read-the-dev-agreement=; multidb_pin_writes=y HTTP/1.1 500 INTERNAL SERVER ERROR Server: Apache Vary: X-Mobile, Accept-Encoding X-Backend-Server: dev1 Cache-Control: no-cache Content-Type: text/html; charset=utf-8 Content-Encoding: gzip Strict-Transport-Security: max-age=2592000 Date: Mon, 24 Oct 2011 22:50:20 GMT X-Content-Security-Policy-Report-Only: policy-uri /services/csp/policy?build=e2e2 Via: Moz-Cache-pp-zlb01 Connection: close x-frame-options: DENY
The reason for this is that the web app manifest does not declare locales according to the spec: https://developer.mozilla.org/en/Apps/App_Manifest However, AMO should handle this error gracefully. This is the traceback: Traceback (most recent call last): File "/data/www/addons-dev.allizom.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-dev.allizom.org/zamboni/apps/amo/decorators.py", line 102, in wrapper return f(*args, **kw) File "/data/www/addons-dev.allizom.org/zamboni/apps/amo/decorators.py", line 94, in wrapper return f(*args, **kw) File "/data/www/addons-dev.allizom.org/zamboni/apps/amo/decorators.py", line 28, in wrapper return func(request, *args, **kw) File "/data/www/addons-dev.allizom.org/zamboni/apps/devhub/views.py", line 895, in upload_detail return json_upload_detail(request, upload) File "/data/www/addons-dev.allizom.org/zamboni/apps/amo/decorators.py", line 77, in wrapper response = f(*args, **kw) File "/data/www/addons-dev.allizom.org/zamboni/apps/devhub/views.py", line 832, in json_upload_detail pkg = parse_addon(upload, addon=addon) File "/data/www/addons-dev.allizom.org/zamboni/apps/files/utils.py", line 418, in parse_addon parsed = WebAppParser().parse(pkg, addon) File "/data/www/addons-dev.allizom.org/zamboni/apps/files/utils.py", line 198, in parse 'description', default='') File "/data/www/addons-dev.allizom.org/zamboni/apps/files/utils.py", line 183, in extract_locale for loc, data in locales.iteritems(): AttributeError: 'list' object has no attribute 'iteritems'
Thanks, kumar
Assignee: nobody → kumar.mcmillan
Severity: major → normal
Priority: -- → P3
Summary: App upload fails with a 500 → Nonconforming apps cause tracebacks instead of graceful errors
Target Milestone: 6.2.9 → 6.3.0
Target Milestone: 6.3.0 → 6.3.2
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: 6.3.2 → 6.3.3
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.