[regression] OSK suppressed in autopilot tests

Bug #1542224 reported by Olivier Tilloy
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
Critical
Michał Sawicz
ubuntu-keyboard (Ubuntu)
Invalid
Undecided
Unassigned
unity8 (Ubuntu)
Fix Released
Critical
Josh Arenson

Bug Description

I’m seeing a large number of webbrowser-app autopilot test failures lately (I think this started 2 or 3 days ago).
Almost all of them expose a traceback like this:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/webbrowser_app/tests/test_addressbar_states.py", line 82, in test_does_not_clear_when_typing_while_loading
self.main_window.go_to_url(url)
File "/usr/lib/python3/dist-packages/webbrowser_app/emulators/browser.py", line 41, in go_to_url
self.address_bar.go_to_url(url)
File "/usr/lib/python3/dist-packages/autopilot/logging.py", line 46, in inner
return f(instance, *args, **kwargs)
File "/usr/lib/python3/dist-packages/webbrowser_app/emulators/browser.py", line 357, in go_to_url
self.write(url)
File "/usr/lib/python3/dist-packages/webbrowser_app/emulators/browser.py", line 361, in write
self.text_field.write(text, clear)
File "/usr/lib/python3/dist-packages/autopilot/logging.py", line 46, in inner
return f(instance, *args, **kwargs)
File "/usr/lib/python3/dist-packages/ubuntuuitoolkit/_custom_proxy_objects/_textfield.py", line 49, in write
self.keyboard.type(text)
File "/usr/lib/python3/dist-packages/autopilot/input/_osk.py", line 105, in type
self._keyboard.type(string, delay)
File "/usr/lib/python3/dist-packages/ubuntu_keyboard/emulators/keyboard.py", line 211, in type
self.press_key(char)
File "/usr/lib/python3/dist-packages/ubuntu_keyboard/emulators/keyboard.py", line 165, in press_key
raise RuntimeError("Keyboard is not on screen")
RuntimeError: Keyboard is not on screen

This has now been confirmed to occur in all autopilot tests that use the OSK (including the ubuntu-keyboard-autopilot tests)

Related branches

Revision history for this message
Olivier Tilloy (osomon) wrote :

Given that a new version of ubuntu-keyboard was published on 2016-01-29, that would more or less match when the failures started happening. Could this be a regression in ubuntu-keyboard 0.99.trunk.phablet2+16.04.20160128-0ubuntu1 ?

Revision history for this message
Olivier Tilloy (osomon) wrote :

Sometimes I’m seeing a different failure:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/webbrowser_app/tests/test_bookmark_options.py", line 170, in test_save_bookmarked_url_in_new_folder
self.main_window.go_to_url(url)
File "/usr/lib/python3/dist-packages/webbrowser_app/emulators/browser.py", line 41, in go_to_url
self.address_bar.go_to_url(url)
File "/usr/lib/python3/dist-packages/autopilot/logging.py", line 46, in inner
return f(instance, *args, **kwargs)
File "/usr/lib/python3/dist-packages/webbrowser_app/emulators/browser.py", line 357, in go_to_url
self.write(url)
File "/usr/lib/python3/dist-packages/webbrowser_app/emulators/browser.py", line 361, in write
self.text_field.write(text, clear)
File "/usr/lib/python3/dist-packages/autopilot/logging.py", line 46, in inner
return f(instance, *args, **kwargs)
File "/usr/lib/python3/dist-packages/ubuntuuitoolkit/_custom_proxy_objects/_textfield.py", line 49, in write
self.keyboard.type(text)
File "/usr/lib/python3/dist-packages/autopilot/input/_osk.py", line 105, in type
self._keyboard.type(string, delay)
File "/usr/lib/python3/dist-packages/ubuntu_keyboard/emulators/keyboard.py", line 211, in type
self.press_key(char)
File "/usr/lib/python3/dist-packages/ubuntu_keyboard/emulators/keyboard.py", line 176, in press_key
req_key_state = self._keypad_contains_key(req_keypad, key)
File "/usr/lib/python3/dist-packages/ubuntu_keyboard/emulators/keyboard.py", line 304, in _keypad_contains_key
self._update_details_for_keypad(keypad_name)
File "/usr/lib/python3/dist-packages/ubuntu_keyboard/emulators/keyboard.py", line 289, in _update_details_for_keypad
self._show_keypad(keypad_name)
File "/usr/lib/python3/dist-packages/ubuntu_keyboard/emulators/keyboard.py", line 329, in _show_keypad
self._current_keypad_name.wait_for(keypad_name)
File "/usr/lib/python3/dist-packages/autopilot/introspection/types.py", line 181, in wait_for
failure_msg))
AssertionError: After 10.0 seconds test on KeyboardContainer.state failed: 'SYMBOLS' != dbus.String('CHARACTERS', variant_level=1)

Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

Adding unity8 to the bug as it appears to be triggered by the unity8 landing here: http://people.canonical.com/~lzemczak/landing-team/ubuntu-touch/rc-proposed/ubuntu/krillin/399.commitlog

summary: - [regression] RuntimeError("Keyboard is not on screen") in webbrowser-app
- autopilot tests
+ [regression] RuntimeError("Keyboard is not on screen") in autopilot
+ tests
description: updated
Changed in ubuntu-keyboard (Ubuntu):
assignee: nobody → Michael Sheldon (michael-sheldon)
Michał Sawicz (saviq)
Changed in ubuntu-keyboard (Ubuntu):
status: New → Invalid
assignee: Michael Sheldon (michael-sheldon) → nobody
Changed in unity8 (Ubuntu):
status: New → Triaged
importance: Undecided → High
assignee: nobody → Josh Arenson (josharenson)
Revision history for this message
Michał Sawicz (saviq) wrote :

So bug #1474444 worked around this in a weird way by forcing stayHidden to true even when we changed it to false.

Recently we needed to add more fine grained control, which meant stayHidden isn't used any more.

We need to ignore the autopilot-created input devices by means of having a blacklist of devices, initially it might just be hardcoded, but should be configurable (and populated by the keyboard emulator probably).

summary: - [regression] RuntimeError("Keyboard is not on screen") in autopilot
- tests
+ [regression] OSK suppressed in autopilot tests
Revision history for this message
Michał Sawicz (saviq) wrote :

...*long-term* should be configurable...

Zoltan Balogh (bzoltan)
Changed in unity8 (Ubuntu):
importance: High → Critical
Changed in canonical-devices-system-image:
milestone: none → ww08-2016
status: New → Confirmed
importance: Undecided → Critical
tags: added: regression-proposed
Changed in canonical-devices-system-image:
assignee: nobody → Michał Sawicz (saviq)
Michał Sawicz (saviq)
Changed in unity8 (Ubuntu):
status: Triaged → In Progress
Changed in canonical-devices-system-image:
status: Confirmed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.6 KiB)

This bug was fixed in the package unity8 - 8.11+16.04.20160310.4-0ubuntu1

---------------
unity8 (8.11+16.04.20160310.4-0ubuntu1) xenial; urgency=medium

  [ Albert Astals Cid ]
  * Add context for Re-dock as asked by translators (LP: #1534608)
  * Add emblem to the preview header widget (LP: #1424720)
  * Add haptics to ScopesListCategoryItem buttons
  * Audio Cards: Make some of the image loading async (LP: #1533432)
  * Do not create fallback code for the card tool fake card (LP:
    #1545865)
  * Fix resizing the dash bringing temp scopes size out of sync (LP:
    #1543130)
  * Minor fixes for unity-scope-tool
  * Resolve title alignment on card creator time instead of on runtime
  * Use fixedHeaderHeight only in the non cardtool cards
  * Use the new undeprecated connectivityqt::Connectivity
  * asynchronous is only false on the fake card in cardtool
  * clazy fixes

  [ Albert Astals Cid, CI Train Bot ]
  * click scope: Add the else branch so we reset the card size in all
    situations

  [ Andrea Cimitan ]
  * PreviewSharing widget now accepts both string and array of
    widgetData["share-data"]["uri"] (LP: #1549056)
  * Update AP tests for new single preview
  * Use Text.Wrap for body notification text (LP: #1544909)

  [ Andrea Cimitan, Lukáš Tinkl, Michael Zanetti, Nick Dedekind ]
  * some fixes for the new palette (LP: #1554616)

  [ CI Train Bot ]
  * Resync trunk.
  * Update translation template

  [ CI Train Bot, Daniel d'Andrada ]
  * Ensure the QML engine doesn't delete our mock MirSurfaces on its
    own.

  [ Daniel d'Andrada ]
  * tst_Shell: Remove unused qml items

  [ Josh Arenson ]
  * Allow the shell to blacklist input devices and force the OSK shown.
    (LP: #1542224)

  [ Lukáš Tinkl ]
  * Disallow resizing windows up, past the Panel (LP: #1544766)
  * Elide the window title not to let it overflow into the indicators
    area (LP: #1535767)
  * Enable the PIN lockscreen to be used with a HW keyboard (LP:
    #1550359)
  * Fix tiny windows when switching stages
  * Provide a range of ports to QML JS Debugger
  * Watch for launcher item icon changes (LP: #1543290)

  [ Michael Terry ]
  * Proxy more mouse and touchpad properties to USC (LP: #1540398) (LP:
    #1543344, #1540398)
  * Refactor the AccountsService plugin and make it slightly faster.
  * To let the user log in if a mouse is connected, hide the greeter
    cover page on a mouse click (but NOT a touch click). (LP: #1540497)
  * Watch AccountsService for changes to the user's real name. This was
    preventing us from noticing when the user set their name in the
    welcome wizard.

  [ Michael Zanetti ]
  * Allow alt+tabbing in staged mode too (LP: #1540502)
  * Allow invoking the staged mode spreads by mouse right edge pushes
    too (LP: #1540392)
  * Allow loading the device configuration from an external file
  * Implement Launcher's keyboard navigation and updated pip design
  * Make launcher scalable, allow it locking (LP: #1511015)
  * Properly parent launcher items in all cases (LP: #1495732)
  * Read inputMethod surface from the new property int QtMir (LP:
    #1545286)
  * Some visual updates and rotation lock for the virtual touchpad (LP:
    ...

Read more...

Changed in unity8 (Ubuntu):
status: In Progress → Fix Released
Changed in canonical-devices-system-image:
status: In Progress → Fix Committed
Changed in canonical-devices-system-image:
status: Fix Committed → 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.