Public bug reported:

The Manager class seems to be de-duplicating the list of accounts using
accountId as a key.  If an account has multiple service IDs, it seems
like it is random chance whether I'll see the service ID I'm interested
in.

As a test, I wrote a little program to list available accounts using
Manager::availableAccounts(), which showed my Twitter account once:

    Account 7:
      Name: [email protected]
      Service ID: twitter-poll

But when I tried invoking the underlying D-Bus method directly I could
see that the service was returning multiple account results for account
#7 (output reindented for readability):

    $ gdbus call --session --dest com.ubuntu.OnlineAccounts.Manager \
                 --object-path /com/ubuntu/OnlineAccounts/Manager \
                 --method com.ubuntu.OnlineAccounts.Manager.GetAccounts {}
    ([(uint32 7, {'authMethod': <1>,
                  'displayName': <'[email protected]'>,
                  'serviceId': <'twitter-microblog'>,
                  'settings/friends/color': <'#05BBFC'>,
                  'settings/friends/send_enabled': <true>,
                  'settings/gwibber/color': <'#05BBFC'>,
                  'settings/gwibber/send_enabled': <true>}),
      (7, {'authMethod': <1>,
           'displayName': <'[email protected]'>,
           'serviceId': <'twitter-poll'>}),
      ...],)

So this clearly looks like a bug in the client library.  It should be
using (accountId, serviceId) as the key for managing it's local
representation of the accounts.

** Affects: online-accounts-api (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1602159

Title:
  Manager class only provides access to one (random?) service ID for an
  account

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/online-accounts-api/+bug/1602159/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to