State not found for class 'GtkTextCellAccessible'

Bug #1248618 reported by Víctor R. Ruiz
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Autopilot
Invalid
High
Unassigned
Online Accounts: GNOME Control Center
Fix Committed
High
Alberto Mardegan
gnome-control-center-signon (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Using up-to-date Saucy, Autopilot 1.4 from ppa:autopilot/experimental, libautopilot-gtk 1.4bzr57saucy0 and gnome-control-center-signon 0.1.7~+13.10.20130724.1-0ubuntu1

Test fails at gnome_control_center_signon.test_control_center_signon.ControlCenterTests. test_create_oauth2_account

process-stdout: {{{Autopilot GTK interface loaded. Wire protocol version is 1.4.}}}

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/gnome_control_center_signon/test_control_center_signon.py", line 189, in test_create_oauth2_account
    account_item = self.app.select_single('GtkTextCellAccessible', accessible_name='FakeOAuth\njohn')
  File "/usr/lib/python2.7/dist-packages/autopilot/introspection/dbus.py", line 318, in select_single
    raise StateNotFoundError(type_name, **kwargs)
StateNotFoundError: State not found for class 'GtkTextCellAccessible' and filters {'accessible_name': 'FakeOAuth\njohn'}.

Related branches

Alberto Mardegan (mardy)
Changed in gnome-control-center-signon:
importance: Undecided → High
Alberto Mardegan (mardy)
Changed in gnome-control-center-signon:
status: New → Confirmed
status: Confirmed → In Progress
affects: gnome-control-center-signon → autopilot
Changed in autopilot:
status: In Progress → Confirmed
assignee: Alberto Mardegan (mardy) → nobody
Revision history for this message
Alberto Mardegan (mardy) wrote :

This is actually a bug in autopilot. Here's the test code:

http://bazaar.launchpad.net/~online-accounts/gnome-control-center-signon/trunk/view/head:/tests/autopilot/gnome_control_center_signon/test_control_center_signon.py#L170

Note that lines 170 and 189 are identical. In line 170, we check that the GtkTextCellAccessible item exists (and this succeeds), then the account is removed and on line 189 we perform the same query, this time to ensure that the GtkTextCellAccessible *doesn't* exist. The previous version or autopilot was just retuning None if a query returned no result, while version 1.4 appears to be crashing.

Revision history for this message
Alberto Mardegan (mardy) wrote :

OK, it appears that the documented behaviour for the select_single() in autopilot 1.4 is to raise the 'StateNotFoundError' exception when the item is not found. I'll update the tests to use this, then.
I'll let the autopilot team decide what to do with this bug on their side, whether to just mark it as invalid or try and restore the old behaviour (which to me appears much simpler to handle, when writing tests).

Changed in gnome-control-center-signon:
status: New → Confirmed
assignee: nobody → Alberto Mardegan (mardy)
importance: Undecided → High
Revision history for this message
Alberto Mardegan (mardy) wrote :

Incidentally, it would be nice if autopilot documentation wrote that one has to import autopilot.introspection.dbus in order to catch the 'StateNotFoundError' exception.

Alberto Mardegan (mardy)
Changed in gnome-control-center-signon:
status: Confirmed → In Progress
Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote :

mardy:

This is the new behavior in 1.4. I thought we had ported all the test suites, but I guess we missed yours. Sorry! The new bahavior is by design - it removes a much larger number of nasty hacks that were required with the old behavior.

However, it sounds like you can make use of the 'wait_destroyed' method (I thin that's what it's called - I don't have the source in front of me right now), which will wait until a proxy object you have no longer exists. So your second select_single should just call 'wait_destroyed' on the proxy object that you got from your first select_single call.

Regarding having to import autopilot.introspection.dbus, that's a PITA, and I plan on fixing it this cycle.

Changed in autopilot:
status: Confirmed → Invalid
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:gnome-control-center-signon at revision 170, scheduled for release in gnome-control-center-signon, milestone Unknown

Changed in gnome-control-center-signon:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-control-center-signon - 0.1.7~+14.04.20131126.2-0ubuntu1

---------------
gnome-control-center-signon (0.1.7~+14.04.20131126.2-0ubuntu1) trusty; urgency=low

  [ Ken VanDine ]
  * Added depends for signon-keyring-extension, this is only needed by
    plugins that use gnome-control-center-signon.

  [ Alberto Mardegan ]
  * Move to autopilot 1.4. (LP: #1248618)

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 171
 -- Ubuntu daily release <email address hidden> Tue, 26 Nov 2013 19:09:04 +0000

Changed in gnome-control-center-signon (Ubuntu):
status: New → 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.