Invalid archive_id in admin causes 500

Bug #644200 reported by Michael Vogt
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Software Center Agent
Fix Released
Medium
Michael Nelson

Bug Description

I just purchased the newly added 1$ test package. It hangs in "Payment authorized" state. I wil attach a screenshot. The UI in the client is alive and logs (every ~20 seconds or so):

on_title_changed <webkit.WebView object at 0x951839c (WebKitWebView at 0x983d048)> <webkit.WebFrame object at 0x9513e64 (WebKitWebFrame at 0x97b6d50)> Software purchase in progress
WARNING:softwarecenter.fixme:logs to the root logger: '('/usr/share/software-center/softwarecenter/view/purchasedialog.py', 145, '_process_json')'
WARNING:root:error processing json: 'Software purchase in progress'

That just means its getting title-changed events, but no progress from the web-ui.

The package "ricks-wallpapers" is still in state pending publication, so if that turns out to be the resaon for this hang,
then we should make sure to add to the wiki docs that the item can only added to the software-center-agent after its
verified that the PPA has published the package. Plus the status message is not very helpful at this point :)

QA notes:
 1) Log in to the admin interface
 2) Try to edit an application, updating it's archive_id to "~mvo/private-test" - which should fail with an appropriate validation message,
 3) Repeat (2) with "mvo/private/test"
 4) Set the archive id to something valid (syntactically) "mvo/private-test" and save.

Revision history for this message
Michael Vogt (mvo) wrote :
Revision history for this message
Michael Vogt (mvo) wrote :

I just tried it again now that ricks-wallpapers is published and it hangs as well in "payment authorized".

Thinking about it, this might be a issue with my credit card company. It has a additional security check in place (a challenge-response mechanism via a webpage) when I purchase something.

Revision history for this message
Anthony Lenton (elachuni) wrote :

The web app makes some strong suppositions about the structure of the archive_id field in Application, namely that it contains a single '/'. It will fail miserably when creating subscriptions on Launchpad if this condition isn't met, and yet it doesn't enforce this restriction when creating new applications via the admin interface.

We've asked for this to be fixed for the "ricks-wallpapers" app for now, but we should add a bit of validation code to ensure that new applications are created with good archive_id fields in the future.

Changed in software-center-agent:
milestone: none → 10.10
Changed in software-center-agent:
milestone: 10.10 → post-maverick
summary: - purchase of the 1$ item does not work, hangs in "Payment Authorized"
+ Invalid archive_id in admin causes 500
Changed in software-center-agent:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Anthony Lenton (elachuni) wrote :

Same thing happened again, this time the entered ppa was of the form "~teamname/ppa" (with an extra tilde at the beginning).

The whole process now fails more gracefully, but you still end up without the app.

We should add a descriptive text below the archive_id field explaining what the right format is, too.

Changed in software-center-agent:
importance: Low → Medium
Tom Haddon (mthaddon)
tags: added: canonical-losa-isd
Revision history for this message
Anthony Lenton (elachuni) wrote :

ftr, we should add validation code to have the archive_id field fully syntax-checked when adding or editing an app.

tags: added: kb-task
Changed in software-center-agent:
assignee: nobody → Michael Nelson (michael.nelson)
status: Confirmed → In Progress
description: updated
Changed in software-center-agent:
status: In Progress → Fix Committed
Revision history for this message
Dave Morley (davmor2) wrote :

I correctly get a warning that the application needs an exist archive to work from. and when set to the correct id the form saves

tags: added: sp-1
tags: added: kb-defect
removed: kb-task
Changed in software-center-agent:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.