But the control center still crashes..

In the last milestone, adding a TODOist provider to gnome-online-accounts looked like it had a bug which made the control-center crash. Here’s a brief description as to what happened :

  • Run the control center.
  • Add the TODOist account.
      • The dialog to enter the credentials opens.
      • If you cross the above step, it asks for permission to access resources from your account.
      • Granting the permissions, the accounts.conf file gets written and the account gets added.

    And BAM!! it crashes.

    Next time you run the control-center right away, the account would be there showing up all nice.

Hence we go to GDB to seek help about what’s the matter with gnome-online-accounts or control-center. Now GDB’s stack trace (which I’ve lost now and can’t reproduce due to some other graphics problems) pointed out some problem with the Intel graphics drivers which I obviously did not know as how to overcome.

Then in discussion with mclasen about this thing, he pointed out the workaround for the bug which was running control center with the prefix


and yay! it works now.  Now this had something to do with wayland backend creating some issues with Intel graphics drivers which I cannot really decode at the moment ¯\_(ツ)_/¯

And closing this one with a realization I had after this bug:

“All software has bugs, and a working system is just one where most bugs are not triggered too frequently” –mclasen

Adding TODOist Provider

The first milestone of the project – writing a TODOist Provider for gnome-online-accounts. This provider will be used for authentication of user and providing authorization to read/write todo-lists from Recipes to TODOist.

The API documentation for TODOist is available here.

    • The process started from registering Recipes and getting the client_id and client_secret from the TODOist.
    • Then comes coding the GoaTodoistProvider that implements GoaOAuth2Provider. Subclasses must implement these methods from GoaOAuth2ProviderClass:
      • GoaOAuth2ProviderClass.get_authorization_uri: getting the authorization url
      • GoaOAuth2ProviderClass.get_token_uri : getting the token url
      • GoaOAuth2ProviderClass.get_redirect_uri : getting the redirection url (which is https://localhost/ for Desktop Clients)
      • GoaOAuth2ProviderClass.get_scope : decides the level of access to ask from the user
      • GoaOAuth2ProviderClass.get_client_id : getting the client_id obtained from TODOist.
      • GoaOAuth2ProviderClass.get_client_secret : getting the client_secret obtained from TODOist
      • GoaOAuth2ProviderClass.get_identity_sync : to obtain the presentation_id (email id in this case) from the json object returned using REST API by reading user’s properties
    • Additionally, the GoaProviderClass methods (that should chain up to its parent class) must be implemented: GoaProviderClass.get_provider_type, GoaProviderClass.get_provider_name , GoaProviderClass.build_object

The final view of how the provider looks like this: