Ticket #10801 (new defect)

Opened 3 years ago

Last modified 3 years ago

Friends tray is not right on sharer

Reported by: erikos Owned by: erikos
Priority: high Milestone: 11.3.0
Component: sugar Version: Development build as of this date
Keywords: collaboration Cc: Jvonau
Action Needed: code Verified: no
Deployments affected: Blocked By:
Blocking:

Description

A: share activity

B: join

A's tray: only A is visible

B's tray: A and B is visible

We seem to hit: http://git.sugarlabs.org/sugar/mainline/blobs/master/src/jarabe/model/neighborhood.py#line462

Attachments

setactivities_2.patch (4.1 kB) - added by erikos 3 years ago.
Patch that does call SetActivities when we join and leave a shared activity

Change History

Changed 3 years ago by erikos

  • summary changed from Freinds tray is not right on sharer to Friends tray is not right on sharer

Changed 3 years ago by erikos

  • priority changed from normal to high

Changed 3 years ago by erikos

  • next_action changed from diagnose to code

On the sharer side when the activity changes we get the 'CurrentActivityChanged' signal. We only update the current-buddy of the ActivityModel] in this case, and therefore we do not add the buddy to the friends tray.

Changed 3 years ago by erikos

Ok, I have been looking closer to what we did in 0.84. As we were listening to the toolkit's activity presence service we were able to track 'buddy-left' and 'buddy-joined' from the activity. The activity itself listens on member changes on the text channel of the activity to determine if a buddy left or joined.

In the shell we only listen for member changes on the connection atm, in order to track the presence of buddies in general. I have done a quick test if we can as well track the member changes per activity like we do in the toolkit. It works as expected but it adds a bit of code and I would have to restructure model/neighborhood.py quite a bit.

A quick/temporary fix would be to listen for current-buddy-changed in the frame. Which is not fully right and different to what we had before. For example:

- A shares an activity

- B joins it

- as the current activity of B changes this is tracked on A and B is added to the Frame of A

- if B now switches to another activity he is removed from the Frame of A even so he does not leave the activity (stops it)

Changed 3 years ago by erikos

  • next_action changed from code to diagnose

A more deeper analysis: so the original issue is that we did not get ActivityChanges signals (Sugar level) for the activity on machine A when B joins. I looked at the logs from a sharing session in 0.84 and here we do get the ActivityChanges signal on A fine.

The logs on B when B joins the shared session from A looks like:

The interesting part here is "salut_avahi_olpc_activity_announce: announce activity".

(telepathy-salut:3914): tp-glib-DEBUG: channel_request_new: New channel request at 0x95a9318: ctype=org.fre\
edesktop.Telepathy.Channel.Type.Text htype=2 handle=1 suppress=1
** (telepathy-salut:3914): DEBUG: salut_ft_manager_handle_request: File transfer request
** (telepathy-salut:3914): DEBUG: salut_muc_manager_request_new_muc_channel: found 239.255.71.28 port 27091\
 for room c6dbc8771198ddfa30c20e9af4a963b0827bc155
** (telepathy-salut:3914): DEBUG: salut_muc_manager_request_new_muc_channel: Connect succeeded
** (telepathy-salut:3914): DEBUG: salut_muc_manager_new_muc_channel: Requested channel for handle: 1
^[[1m^[[37mtp_group_mixin_change_flags: emitting group flags changed
  added    : [^[[22mCAN_ADD|MESSAGE_ADD^[[1m]
  removed  : [^[[22m^[[1m]
  flags now: [^[[22mCAN_ADD|MESSAGE_ADD^[[1m]
^[[0m^[[1m^[[37mtp_group_mixin_change_flags: emitting group flags changed
  added    : [^[[22mCAN_ADD|MESSAGE_ADD^[[1m]
  removed  : [^[[22m^[[1m]
  flags now: [^[[22mCAN_ADD|MESSAGE_ADD^[[1m]
^[[0m** (telepathy-salut:3914): DEBUG: salut_muc_channel_invited: Got an invitation to c6dbc8771198ddfa30c2\
0e9af4a963b0827bc155 from 23837ace@xo-0c-dd-46
^[[1m^[[36memit_members_changed_signals: emitting members changed
  message       : ""
  added         : [^[[22m^[[1m]
  removed       : [^[[22m^[[1m]
  local_pending : [^[[22m^[[1m]
  remote_pending: [^[[22m1 (23837ace@xo-0c-dd-46)^[[1m]
  actor         : 1
  reason        : 0: unspecified reason
[[0m(telepathy-salut:3914): tp-glib-DEBUG: satisfy_request: completing queued request 0x95a9318 with succe\
ss, channel_type=org.freedesktop.Telepathy.Channel.Type.Text, handle_type=2, handle=1, suppress_handler=1
(telepathy-salut:3914): tp-glib-DEBUG: channel_request_free: Freeing channel request at 0x95a9318: ctype=or\
g.freedesktop.Telepathy.Channel.Type.Text htype=2 handle=1 suppress=1
(telepathy-salut:3914): tp-glib-DEBUG: channel_request_new: New channel request at 0x95a91a8: ctype=org.fre\
edesktop.Telepathy.Channel.Type.Tubes htype=2 handle=1 suppress=1
** (telepathy-salut:3914): DEBUG: salut_ft_manager_handle_request: File transfer request
** (telepathy-salut:3914): DEBUG: new_tubes_channel: creating new tubes chan, object path /org/freedesktop/\
Telepathy/Connection/salut/local_xmpp/_323837ace/MucTubesChannel1
** (telepathy-salut:3914): DEBUG: salut_tubes_channel_constructor: Registering at '/org/freedesktop/Telepat\
hy/Connection/salut/local_xmpp/_323837ace/MucTubesChannel1'
(telepathy-salut:3914): tp-glib-DEBUG: satisfy_request: completing queued request 0x95a91a8 with success, c\
hannel_type=org.freedesktop.Telepathy.Channel.Type.Tubes, handle_type=2, handle=1, suppress_handler=1
(telepathy-salut:3914): tp-glib-DEBUG: channel_request_free: Freeing channel request at 0x95a91a8: ctype=or\
g.freedesktop.Telepathy.Channel.Type.Tubes htype=2 handle=1 suppress=1
** (telepathy-salut:3914): DEBUG: muc_connection_connected_cb: I didn't create this muc. Waiting for sender\
s before adding myself as member
** (telepathy-salut:3914): DEBUG: salut_avahi_muc_channel_publish_service: service created: c6dbc8771198ddf\
a30c20e9af4a963b0827bc155 c6dbc8771198ddfa30c20e9af4a963b0827bc155._clique._udp.local 27091
^[[1m^[[36memit_members_changed_signals: emitting members changed
  message       : ""
  added         : [^[[22m2 (db4b7150@xo-05-29-cd)^[[1m]
  removed       : [^[[22m^[[1m]
  local_pending : [^[[22m^[[1m]
  remote_pending: [^[[22m^[[1m]
  actor         : 0
  reason        : 0: unspecified reason
^[[0m** (telepathy-salut:3914): DEBUG: salut_muc_channel_new_senders: Got new senders. Adding myself as mem\
ber
^[[1m^[[36memit_members_changed_signals: emitting members changed
  message       : ""
  added         : [^[[22m1 (23837ace@xo-0c-dd-46)^[[1m]
  removed       : [^[[22m^[[1m]
  local_pending : [^[[22m^[[1m]
  remote_pending: [^[[22m^[[1m]
  actor         : 1
  reason        : 0: unspecified reason
^[[0m** (telepathy-salut:3914): DEBUG: salut_avahi_olpc_activity_announce: announce activity c6dbc8771198dd\
fa30c20e9af4a963b0827bc155:23837ace@xo-0c-dd-46
** (telepathy-salut:3914): DEBUG: salut_connection_olpc_set_current_activity: called
** (telepathy-salut:3914): DEBUG: salut_muc_channel_received_stanza: Message with an empty body
** (telepathy-salut:3914): DEBUG: salut_connection_olpc_set_current_activity: called

and on B:

the interesting part here is: "salut_contact_joined_activity: Contact 23837ace@xo-0c-dd-46: joined activity c6dbc8771198ddfa30c20e9af4a963b0827bc155"

ESC[1mESC[36memit_members_changed_signals: emitting members changed
  message       : ""
  added         : [ESC[22m2 (23837ace@xo-0c-dd-46)ESC[1m]
  removed       : [ESC[22mESC[1m]
  local_pending : [ESC[22mESC[1m]
  remote_pending: [ESC[22mESC[1m]
  actor         : 0
  reason        : 0: unspecified reason
ESC[0m** (telepathy-salut:1967): DEBUG: salut_muc_channel_received_stanza: Message with an empty body
** (telepathy-salut:1967): DEBUG: salut_contact_joined_activity: Contact 23837ace@xo-0c-dd-46: joined activity c6dbc8771198ddfa30c20e9af4a963b0827bc155
** (telepathy-salut:1967): DEBUG: contact_change_cb: Emitting contact changes for 23837ace@xo-0c-dd-46: 32
** (telepathy-salut:1967): DEBUG: _contact_manager_contact_olpc_activities_changed: called for 2
** (telepathy-salut:1967): DEBUG: salut_contact_foreach_olpc_activity: called
** (telepathy-salut:1967): DEBUG: foreach_olpc_activity: c6dbc8771198ddfa30c20e9af4a963b0827bc155 => 1
** (telepathy-salut:1967): DEBUG: salut_contact_foreach_olpc_activity: end
** (telepathy-salut:1967): DEBUG: salut_contact_foreach_olpc_activity: called
** (telepathy-salut:1967): DEBUG: foreach_olpc_activity: c6dbc8771198ddfa30c20e9af4a963b0827bc155 => 1
** (telepathy-salut:1967): DEBUG: salut_contact_foreach_olpc_activity: end
** (telepathy-salut:1967): DEBUG: activity_resolved_cb: called: "c6dbc8771198ddfa30c20e9af4a963b0827bc155:23837ace@xo-0c-dd-46".local. on xo-0c-dd-46.local port 0
** (telepathy-salut:1967): DEBUG: contact_resolved_cb: Contact 23837ace@xo-0c-dd-46: Resolver (23837ace@xo-0c-dd-46 _presence._tcp intf: 3 proto: 0): contact 23837ace@xo-0c-dd-46 resolved
** (telepathy-salut:1967): DEBUG: salut_presence_cache_process_caps: Called for 23837ace@xo-0c-dd-46 with 'sha-1' 'http://telepathy.freedesktop.org/caps' '1yvwIQ0PRIwztFW4qosGEoXvhOo='
** (telepathy-salut:1967): DEBUG: disco_waiter_new: created waiter 0x8944b10 for contact 23837ace@xo-0c-dd-46
** (telepathy-salut:1967): DEBUG: salut_contact_change_current_activity: Current activity c6dbc8771198ddfa30c20e9af4a963b0827bc155, room handle 1
** (telepathy-salut:1967): DEBUG: contact_change_cb: Emitting contact changes for 23837ace@xo-0c-dd-46: 16
** (telepathy-salut:1967): DEBUG: contact_resolved_cb: Contact 23837ace@xo-0c-dd-46: Resolver (23837ace@xo-0c-dd-46 _presence._tcp intf: 3 proto: 0): contact 23837ace@xo-0c-dd-46 resolved
** (telepathy-salut:1967): DEBUG: salut_presence_cache_process_caps: Called for 23837ace@xo-0c-dd-46 with 'sha-1' 'http://telepathy.freedesktop.org/caps' '1yvwIQ0PRIwztFW4qosGEoXvhOo='
** (telepathy-salut:1967): DEBUG: disco_waiter_new: created waiter 0x8920650 for contact 23837ace@xo-0c-dd-46
** (telepathy-salut:1967): DEBUG: salut_contact_change_current_activity: Unsetting current activity
** (telepathy-salut:1967): DEBUG: contact_change_cb: Emitting contact changes for 23837ace@xo-0c-dd-46: 16

When I look at the logs from the current version we do not have the 'announce' message from B and on A no message that B has joined.

What I tried as well is to share an activity from a 0.92 machine (A) and join with a 0.84 machine (B). B does announce the activity fine and B does receive the 'has joined' message. This leads me to the conclusion that the issue is when we join the activity that we do not announce that, A is then not knowing about the new state of B (ActivitiesChanged).

Changed 3 years ago by jvonau

  • cc Jvonau added

Changed 3 years ago by erikos

Patch that does call SetActivities when we join and leave a shared activity

Changed 3 years ago by erikos

  • next_action changed from diagnose to code
Note: See TracTickets for help on using tickets.