Closed Bug 1032730 Opened 10 years ago Closed 10 years ago

Can't install apps from reviewer tools

Categories

(Marketplace Graveyard :: Reviewer Tools, defect, P2)

Avenir
x86_64
Windows 7
defect

Tracking

(Not tracked)

VERIFIED FIXED
2014-07-08

People

(Reporter: madalin.cotetiu, Assigned: cvan)

References

()

Details

(Keywords: regression, Whiteboard: [repoman])

Steps to reproduce
1. Open reviewer tools: https://marketplace-dev.allizom.org/reviewers/apps/
2. Click on Queues - Apps
3. Click on any app name
4. Click on the install button

Expected results:
The dialog box to install the app appears, the user can install the app.

Actual results:
The throbber keeps spinning and the app can't be installed. "TypeError: e is undefined" error message is displayed in console.

Notes/Issues:
Verified on FF33 (Win 7). This issue can be reproduced only on marketplace-dev.allizom.org
Screencast for this issue: http://screencast.com/t/cppKBbain
Stage is not affected: https://marketplace.allizom.org/reviewers/apps/review/thaifraumobi-dating

Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py", line 85, in run
    self.result = application(self.environ, self.start_response)
  File "/Users/chris/.virtualenvs/z/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 206, in __call__
    response = self.get_response(request)
  File "/Users/chris/.virtualenvs/z/lib/python2.7/site-packages/django/core/handlers/base.py", line 194, in get_response
    response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
  File "/Users/chris/.virtualenvs/z/lib/python2.7/site-packages/django/core/handlers/base.py", line 112, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/opt/zamboni/mkt/webapps/decorators.py", line 59, in wrapper
    return f(request, addon, *args, **kw)
  File "/opt/zamboni/apps/amo/decorators.py", line 128, in wrapper
    response = func(*args, **kw)
  File "/opt/zamboni/apps/amo/decorators.py", line 51, in wrapper
    return f(request, *args, **kw)
  File "/opt/zamboni/mkt/receipts/views.py", line 178, in issue
    flavour=flavour)
  File "/opt/zamboni/mkt/receipts/utils.py", line 106, in create_receipt
    return sign(receipt)
  File "/opt/zamboni/mkt/receipts/utils.py", line 43, in sign
    return jwt.encode(data, get_key(), u'RS512')
  File "/opt/zamboni/mkt/receipts/utils.py", line 167, in get_key
    return jwt.rsa_load(settings.WEBAPPS_RECEIPT_KEY)
AttributeError: 'module' object has no attribute 'rsa_load'

I thought this was a regression from bug 858729, but it doesn't seem to be the case.
Keywords: regression
Target Milestone: 2014-07-01 → 2014-07-08
Priority: -- → P2
Whiteboard: [repoman]
Target Milestone: 2014-07-08 → ---
Issue is now reproducing on MP-stage also https://marketplace.allizom.org/reviewers/
Please see screencast http://screencast.com/t/I3iRVmyWk1x
(In reply to Christopher Van Wiemeersch [:cvan] from comment #1)
> Stage is not affected:
> https://marketplace.allizom.org/reviewers/apps/review/thaifraumobi-dating
> 
> Traceback (most recent call last):
>   File
> "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/
> python2.7/wsgiref/handlers.py", line 85, in run
>     self.result = application(self.environ, self.start_response)
>   File
> "/Users/chris/.virtualenvs/z/lib/python2.7/site-packages/django/core/
> handlers/wsgi.py", line 206, in __call__
>     response = self.get_response(request)
>   File
> "/Users/chris/.virtualenvs/z/lib/python2.7/site-packages/django/core/
> handlers/base.py", line 194, in get_response
>     response = self.handle_uncaught_exception(request, resolver,
> sys.exc_info())
>   File
> "/Users/chris/.virtualenvs/z/lib/python2.7/site-packages/django/core/
> handlers/base.py", line 112, in get_response
>     response = wrapped_callback(request, *callback_args, **callback_kwargs)
>   File "/opt/zamboni/mkt/webapps/decorators.py", line 59, in wrapper
>     return f(request, addon, *args, **kw)
>   File "/opt/zamboni/apps/amo/decorators.py", line 128, in wrapper
>     response = func(*args, **kw)
>   File "/opt/zamboni/apps/amo/decorators.py", line 51, in wrapper
>     return f(request, *args, **kw)
>   File "/opt/zamboni/mkt/receipts/views.py", line 178, in issue
>     flavour=flavour)
>   File "/opt/zamboni/mkt/receipts/utils.py", line 106, in create_receipt
>     return sign(receipt)
>   File "/opt/zamboni/mkt/receipts/utils.py", line 43, in sign
>     return jwt.encode(data, get_key(), u'RS512')
>   File "/opt/zamboni/mkt/receipts/utils.py", line 167, in get_key
>     return jwt.rsa_load(settings.WEBAPPS_RECEIPT_KEY)
> AttributeError: 'module' object has no attribute 'rsa_load'
> 
> I thought this was a regression from bug 858729, but it doesn't seem to be
> the case.

You have the wrong jwt installed. This is normally done by installing without using --no-deps. Please clean our your JWT libraries and install the one mentioned in requirements.
The Javascript in the reviewer tools is asking for a receipt all the time. It should only be doing this for paid apps.
(In reply to Andy McKay [:andym] from comment #4)
> The Javascript in the reviewer tools is asking for a receipt all the time.
> It should only be doing this for paid apps.

Makes sense, but that's separate from the error ("There was a problem installing the app.") we're getting in the response of https://marketplace.allizom.org/reviewers/receipt/issue/thaifraumobi-dating?src= right?

http://cl.ly/image/1i3X201d2E29/Screen%20Shot%202014-07-07%20at%2011.24.11%20AM.png
Flags: needinfo?(amckay)
https://github.com/mozilla/zamboni/commit/3528aba

And filed bug 1035376 to stop hitting the receipt API for free apps.
Assignee: nobody → cvan
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: needinfo?(amckay)
Resolution: --- → FIXED
Target Milestone: --- → 2014-07-08
Verified as fixed in https://marketplace-dev.allizom.org/reviewers/ on FF33 (Win 7, Android 4.2.1).
Closing bug.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.