[sdk] App exits immediately on errors
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu UX |
Fix Released
|
Medium
|
Olga Kemmet |
Bug Description
When there is an error talking to the server, the app exists immediately. This is a bit disconcerting for the user, as it results in an app opening and immediately closing, thus giving the appearance of a crash. Instead, the app should be displaying an error message of some sort, asking them to try again later in the case of 500 errors from the server, or to explain that the requested product could not be found on the server, if a 404 happens when trying to get the package details.
The current behavior also makes it much more difficult to test the full work flow of purchasing an app, as pay-service and libpay do not expose any error state. To the user, this means the app effectively crashed and it's not possible to buy anything on the store.
-- SOLUTION --
Please use the attached error message for apps requiring Network connection and receiving a 5xx or 4xx HTTP error
Related branches
- Alejandro J. Cura (community): Approve
- dobey (community): Approve
- PS Jenkins bot (community): Approve (continuous-integration)
-
Diff: 495 lines (+158/-23)11 files modifiedapp/payui.qml (+76/-14)
app/ui/CheckoutPage.qml (+22/-1)
app/ui/DirectPurchase.qml (+19/-0)
app/ui/UbuntuPurchaseWebkit.qml (+1/-5)
backend/modules/payui/network.cpp (+6/-0)
backend/modules/payui/network.h (+1/-0)
backend/modules/payui/purchase.cpp (+11/-1)
backend/modules/payui/purchase.h (+2/-0)
backend/tests/mock_click_server.py (+8/-0)
backend/tests/test_network.cpp (+11/-1)
manifest.json (+1/-1)
summary: |
- App exits immediately on errors + [apps] App exits immediately on errors |
Changed in ubuntu-ux: | |
assignee: | nobody → Benjamin Keyser (bjkeyser) |
Changed in pay-ui: | |
status: | New → In Progress |
assignee: | nobody → Diego Sarmentero (diegosarmentero) |
importance: | Undecided → High |
summary: |
- [apps] App exits immediately on errors + [sdk] App exits immediately on errors |
Changed in ubuntu-ux: | |
assignee: | Benjamin Keyser (bjkeyser) → Giorgio Venturi (giorgio-venturi) |
importance: | Undecided → Medium |
status: | New → Triaged |
Changed in pay-ui: | |
status: | Fix Committed → Fix Released |
Changed in ubuntu-ux: | |
assignee: | Giorgio Venturi (giorgio-venturi) → Olga Kemmet (olga-kemmet) |
Changed in ubuntu-ux: | |
status: | Fix Committed → Fix Released |
This also happens if one is trying to talk to the staging server, but has production credentials.