← Back to team overview

ubuntu-webapps-bugs team mailing list archive

[Bug 1643732] Re: service() method returns invalid service instance

 

Here is the relevant code:

    QList<storage::internal::AccountDetails> accounts;
    for (auto const& acct : manager_.availableAccounts())
    {
        auto const it = BUS_NAMES.find(acct->serviceId());
        if (it == BUS_NAMES.end())
        {
            continue;
        }

        qDebug() << "using" << acct->serviceId();
        auto service = acct->service();
        qDebug() << "valid:" << service.isValid();
        qDebug() << "id:" << service.id();
        qDebug() << "icon:" << service.iconSource();
        qDebug() << "displayName:" << service.displayName();
        storage::internal::AccountDetails ad;
        ad.busName = it->second.bus_name;
        ad.objectPath = QDBusObjectPath(QStringLiteral("/provider/%1").arg(acct->id()));
        ad.id = acct->id();
        ad.serviceId = acct->serviceId();
        ad.providerName = it->second.provider_name;
        ad.iconName = "";

        accounts.append(ad);
    }

When I run this, it prints:

storage-framework-registry: [16:58:50.030] using "google-drive-scope"
storage-framework-registry: [16:58:50.031] valid: false
storage-framework-registry: [16:58:50.031] id: ""
storage-framework-registry: [16:58:50.031] icon: QUrl("")
storage-framework-registry: [16:58:50.032] displayName: ""

-- 
You received this bug notification because you are a member of Ubuntu
WebApps bug tracking, which is subscribed to online-accounts-api in
Ubuntu.
https://bugs.launchpad.net/bugs/1643732

Title:
  service() method returns invalid service instance

Status in online-accounts-api package in Ubuntu:
  Incomplete

Bug description:
  I have a Google Drive account configured. When I call GetAccounts(),
  the account is returned, and calling the service() method on the
  account returns a Service instance. But that instance returns false
  from isValid(), its id(), displayName(), and iconSource() methods
  return an empty string.

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


References