Client and Server error while removing phone from ubuntuone-preferences

Bug #595407 reported by Roman Yepishev
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu One Client
Invalid
Undecided
Natalia Bidart
Ubuntu One Servers
Fix Released
Medium
Martin Albisetti
ubuntuone-client (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Latest OOPS-ID with such issue: 13424-1629appserverZeaJdHbIGAAIBEeBEbBaeJIGDdAGIfEHH23675.oops.bz2

Caused by:
api/urls.py: url(r'^1.0/devices/remove/phone/(?P<number>\w+)$', 'remove_phone'),

Which goes to:
api/views.py:def remove_phone(request):
----------------------------------^ missing number parameter

Which is invoked by ubuntuone-preferences:
def remove(self, button, kind, token):
        """
        Callback for the Remove button.

        Starts an async request to remove a device.
        """
        make_rest_request(url=('%sremove/%s/%s' % (self.base_url,
                                                   kind.lower(), token)),

After an attempt to remove the phone from ubuntuone-client the following is printed:
HTTP Error 500: INTERNAL SERVER ERROR
ERROR:ubuntuone-preferences:Invalid response getting devices list.

Tags: desktop+
Roman Yepishev (rye)
Changed in ubuntuone-servers:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Ubuntu One web team (ubuntuone-web)
Roman Yepishev (rye)
summary: - remove_phone() got an unexpected keyword argument 'number'' - ubuntuone-
- preferences does /remove/phone/$token
+ Server & client error when removing phone from ubuntuone-preferences
summary: - Server & client error when removing phone from ubuntuone-preferences
+ Client and Server error while removing phone from ubuntuone-preferences
visibility: private → public
description: updated
tags: added: desktop+
Changed in ubuntuone-client:
assignee: nobody → Ubuntu One Desktop+ team (ubuntuone-desktop+)
Martin Albisetti (beuno)
Changed in ubuntuone-servers:
status: Confirmed → Triaged
assignee: Ubuntu One web team (ubuntuone-web) → Martin Albisetti (beuno)
milestone: none → post-m-cleanup
Martin Albisetti (beuno)
Changed in ubuntuone-servers:
status: Triaged → In Progress
Martin Albisetti (beuno)
Changed in ubuntuone-servers:
status: In Progress → Fix Committed
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Roman, can you please detail what work is needed on u1client side?

Thanks!

Changed in ubuntuone-client:
status: New → Incomplete
assignee: Ubuntu One Desktop+ team (ubuntuone-desktop+) → Roman Yepishev (rye)
Revision history for this message
Roman Yepishev (rye) wrote :

Naty, ubuntuone-preferences should use some kind of identifier to remove the phone but I guess the server side should select the phone entry attached to the account and remove it since we support only one phone at a time.

Changed in ubuntuone-client:
assignee: Roman Yepishev (rye) → Naty Bidart (nataliabidart)
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

token is None since:

(10:02:34 AM) rye: nessita, ah, that.. client sends None instead of phone identifier but the trick is that server/client should agree on whether the identifier should be sent at all.
(10:04:52 AM) nessita: rye: client is sending None as device_id? hm...
(10:05:07 AM) rye: nessita, yes, since the rest api does not provide any device_id

Revision history for this message
Martin Albisetti (beuno) wrote :

Working around this issue on the server-side, defaulting to the device the user has registered if we get None.

Changed in ubuntuone-servers:
status: Fix Committed → In Progress
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Calling the url

https://one.ubuntu.com/api/1.0/devices/remove/phone/50255

gave me a 500, with oops id

<!-- OOPS-ID-1813appserverZBcfEcCCGaeaBEcfbbbFDEDdDDEAEEdFb105139 -->

Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Found the oops and reported a dedicated bug for it.

Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Setting this bug as Invalid for ubuntuone-client since we're making the server more robust to handle the /None request.
New control panel will send the device id.

Changed in ubuntuone-client (Ubuntu):
status: New → Invalid
Changed in ubuntuone-client:
status: Incomplete → Invalid
Martin Albisetti (beuno)
Changed in ubuntuone-servers:
status: In Progress → 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.