Closed Bug 1016671 Opened 11 years ago Closed 11 years ago

In-app product without image URL causes error

Categories

(Marketplace Graveyard :: Payments/Refunds, defect, P3)

x86
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: kumar, Assigned: andy+bugzilla)

References

Details

STR - create an in-app product through DevHub - try to purchase with fxpay.purchase(productId) Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/wsgiref/handlers.py", line 93, in run self.result = application(self.environ, self.start_response) File "/Users/kumar/.virtualenvs/zamboni/lib/python2.6/site-packages/django/core/handlers/wsgi.py", line 206, in __call__ response = self.get_response(request) File "/Users/kumar/.virtualenvs/zamboni/lib/python2.6/site-packages/django/core/handlers/base.py", line 194, in get_response response = self.handle_uncaught_exception(request, resolver, sys.exc_info()) File "/Users/kumar/.virtualenvs/zamboni/lib/python2.6/site-packages/django/core/handlers/base.py", line 112, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/Users/kumar/.virtualenvs/zamboni/lib/python2.6/site-packages/django/views/generic/base.py", line 69, in view return self.dispatch(request, *args, **kwargs) File "/Users/kumar/.virtualenvs/zamboni/lib/python2.6/site-packages/django/views/decorators/csrf.py", line 57, in wrapped_view return view_func(*args, **kwargs) File "/Users/kumar/.virtualenvs/zamboni/lib/python2.6/site-packages/rest_framework/views.py", line 399, in dispatch response = self.handle_exception(exc) File "/Users/kumar/dev/zamboni/mkt/api/base.py", line 137, in handle_exception return super(MarketplaceView, self).handle_exception(exc) File "/Users/kumar/.virtualenvs/zamboni/lib/python2.6/site-packages/rest_framework/views.py", line 364, in handle_exception response = self.settings.EXCEPTION_HANDLER(exc) File "/Users/kumar/.virtualenvs/zamboni/lib/python2.6/site-packages/rest_framework/views.py", line 396, in dispatch response = handler(request, *args, **kwargs) File "/Users/kumar/dev/zamboni/mkt/webpay/views.py", line 137, in post token = get_product_jwt(InAppProduct(inapp), contribution) File "/Users/kumar/dev/zamboni/mkt/webpay/webpay_jwt.py", line 33, in get_product_jwt 'icons': product.icons(), File "/Users/kumar/dev/zamboni/mkt/webpay/webpay_jwt.py", line 126, in icons return {64: absolutify(self.inapp.logo_url)} File "/Users/kumar/dev/zamboni/apps/amo/helpers.py", line 330, in absolutify if url.startswith('http'): AttributeError: 'NoneType' object has no attribute 'startswith'
Blocks: 944480
I think we wanted this to return the app's icon when it wasn't present. Adding a property to pick the right one should fix it.
Priority: -- → P3
we could also return the generic rocket icon which is the fallback for app purchases without icons: https://marketplace-dev-cdn.allizom.org/media/img/mkt/icons/rocket.png
Assignee: nobody → amckay
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.