Attribute error when recieving ShareChanged message

Bug #553547 reported by John O'Brien
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu One Client
Fix Released
High
John O'Brien
Ubuntu One storage protocol
Fix Released
High
John O'Brien
ubuntuone-client (Ubuntu)
Fix Released
High
Ubuntu One Client Engineering team
Lucid
Fix Released
High
Ubuntu One Client Engineering team
ubuntuone-storage-protocol (Ubuntu)
Fix Released
High
Ubuntu One Client Engineering team
Lucid
Fix Released
High
Ubuntu One Client Engineering team

Bug Description

I deleted a share on the web, and got the following a few seconds later in the client:

2010-04-01 16:05:26,829 - ubuntuone.SyncDaemon.EQ - DEBUG - push_event: SV_SHARE_CHANGED, args:(), kw:{'info': UUID('eb16a306-6875-460b-ad07-8f43ea9fbc47'), 'message': 'deleted'}
2010-04-01 16:05:26,829 - ubuntuone.SyncDaemon.EQ - ERROR - Error encountered while handling: SV_SHARE_CHANGED in <ubuntuone.syncdaemon.volume_manager.VolumeManager object at 0x33931d0>
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/ubuntuone/syncdaemon/event_queue.py", line 790, in _dispatch
    method(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/ubuntuone/syncdaemon/volume_manager.py", line 541, in handle_SV_SHARE_CHANGED
    self.log.debug('share deleted! %s', info.share_id)
AttributeError: 'UUID' object has no attribute 'share_id

Related branches

Revision history for this message
John O'Brien (jdobrien) wrote : Re: [Bug 553547] [NEW] Attribute error when recieving ShareChanged message

On 04/01/2010 04:09 PM, John O'Brien wrote:
> Public bug reported:
>
> I deleted a share on the web, and got the following a few seconds later
> in the client:
>
> 2010-04-01 16:05:26,829 - ubuntuone.SyncDaemon.EQ - DEBUG - push_event: SV_SHARE_CHANGED, args:(), kw:{'info': UUID('eb16a306-6875-460b-ad07-8f43ea9fbc47'), 'message': 'deleted'}
> 2010-04-01 16:05:26,829 - ubuntuone.SyncDaemon.EQ - ERROR - Error encountered while handling: SV_SHARE_CHANGED in<ubuntuone.syncdaemon.volume_manager.VolumeManager object at 0x33931d0>
> Traceback (most recent call last):
> File "/usr/lib/python2.6/dist-packages/ubuntuone/syncdaemon/event_queue.py", line 790, in _dispatch
> method(*args, **kwargs)
> File "/usr/lib/python2.6/dist-packages/ubuntuone/syncdaemon/volume_manager.py", line 541, in handle_SV_SHARE_CHANGED
> self.log.debug('share deleted! %s', info.share_id)
> AttributeError: 'UUID' object has no attribute 'share_id
>
> ** Affects: ubuntuone-client
> Importance: Undecided
> Status: New
>
>
The error is caused because the client handler does not match what the
protocol sends to it. And the tests conform to what the client expects
and not what the protocol sends:

The protocol:

         if msg.type == protocol_pb2.Message.NOTIFY_SHARE:
             info =
sharersp.NotifyShareHolder.load_from_msg(msg.notify_share)
             self._share_change_callback("changed", info)
         elif msg.type == protocol_pb2.Message.SHARE_DELETED:
             self._share_change_callback("deleted",

uuid.UUID(msg.share_deleted.share_id))

The client:
     def handle_SV_SHARE_CHANGED(self, message, info):
         """ handle SV_SHARE_CHANGED event """
         if message == 'changed':
             if str(info.share_id) not in self.shares:
                 self.log.debug("New share notification, share_id: %s",
                          info.share_id)
                 dir_name = self._build_share_path(info.share_name,
                                                   info.from_visible_name)
                 path = os.path.join(self.m.shares_dir, dir_name)
                 share = Share.from_notify_holder(info, path)
                 self.add_share(share)
             else:
                 self.log.debug('share changed! %s', info.share_id)
                 self.share_changed(info)
         elif message == 'deleted':
             self.log.debug('share deleted! %s', info.share_id)
             self.share_deleted(str(info.share_id))

Revision history for this message
John O'Brien (jdobrien) wrote :

After further review, I think we should fix the protocol. It should not call the same callback with two different sets of arguments.

affects: ubuntuone-client → ubuntuone-storage-protocol
John O'Brien (jdobrien)
Changed in ubuntuone-storage-protocol:
assignee: nobody → John O'Brien (jdobrien)
importance: Undecided → High
status: New → In Progress
Revision history for this message
John O'Brien (jdobrien) wrote :

This bug reveals that share deletion notifications were never working as the protocol and client are coded differently. We need to review this issue and determine how we're going to fix this and maintain backward compatibility with older clients.

Changed in ubuntuone-client:
importance: Undecided → High
tags: added: desktop+ package u1-lucid
Changed in ubuntuone-client:
assignee: nobody → John O'Brien (jdobrien)
Changed in ubuntuone-client (Ubuntu):
status: New → Triaged
Changed in ubuntuone-client:
status: New → In Progress
milestone: none → lucid-final
Changed in ubuntuone-client (Ubuntu):
assignee: nobody → Ubuntu One Desktop+ team (ubuntuone-desktop+)
importance: Undecided → High
Changed in ubuntuone-storage-protocol (Ubuntu):
importance: Undecided → High
status: New → Triaged
assignee: nobody → Ubuntu One Desktop+ team (ubuntuone-desktop+)
Changed in ubuntuone-storage-protocol (Ubuntu):
milestone: none → ubuntu-10.04
Changed in ubuntuone-client (Ubuntu):
milestone: none → ubuntu-10.04
dobey (dobey)
Changed in ubuntuone-client:
status: In Progress → Fix Committed
Changed in ubuntuone-storage-protocol:
status: In Progress → Fix Committed
John O'Brien (jdobrien)
Changed in ubuntuone-client:
status: Fix Committed → Fix Released
Changed in ubuntuone-storage-protocol:
status: Fix Committed → Fix Released
Changed in ubuntuone-client (Ubuntu Lucid):
status: Triaged → Fix Committed
dobey (dobey)
Changed in ubuntuone-storage-protocol:
status: Fix Released → Fix Committed
milestone: none → lucid-final
Changed in ubuntuone-client (Ubuntu Lucid):
status: Fix Committed → In Progress
Changed in ubuntuone-client:
status: Fix Released → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntuone-storage-protocol - 1.2.0-0ubuntu1

---------------
ubuntuone-storage-protocol (1.2.0-0ubuntu1) lucid; urgency=low

  * New upstream release.
    - AttributeError when receiving ShareChanged message. (LP: #553547)
    - Errors not handled correctly (LP: #476632)
 -- Rodney Dawes <email address hidden> Thu, 15 Apr 2010 10:48:00 -0400

Changed in ubuntuone-storage-protocol (Ubuntu Lucid):
status: Triaged → Fix Released
Changed in ubuntuone-storage-protocol:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntuone-client - 1.2.0-0ubuntu1

---------------
ubuntuone-client (1.2.0-0ubuntu1) lucid; urgency=low

  * New upstream release.
    - TypeError: set_files_sync_enabled takes 2 arguments (LP: #555747)
    - Preferences menu icon is broken (LP: #561557)
    - u1sdtool --list-folders doesn't match Nautilus (LP: #547087)
    - AttributeError when receiving ShareChanged message (LP: #553547)
    - Sharing using contacts picker doesn't work (LP: #554269)
    - Silently fails to sync folder outside $HOME (LP: #554522)
    - Need to get public files list at start (LP: #556529)
    - Syncdaemon does local resan on unsubscribed folders (LP: #561713)
    - Start desktopcouch-service when authorizing (LP: #562618)
    - Errors not handled correctly (LP: #476635)
    - Switching sort order in contacts picker clears selection (LP: #551603)
    - Nautilus crashed with SIGSEGV in g_str_hash (LP: #561481)
    - DBus interface not showing full queue (LP: #557670)
    - Client does not handle TRY_AGAIN during Auth (LP: #522604)
  * Include the new logger.py in the python package. (LP: #561447)
  * Require new python-ubuntuone-storageporotocol.

  [Ken VanDine]
  * debian/patches/revert_string_change.patch
    - Revert a string change that landed to late
  * debian/rules
    - include simple-patchsys.mk
 -- Rodney Dawes <email address hidden> Thu, 15 Apr 2010 11:21:17 -0400

Changed in ubuntuone-client (Ubuntu Lucid):
status: In Progress → Fix Released
John O'Brien (jdobrien)
Changed in ubuntuone-client:
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.