Comment 0 for bug 1334676

Revision history for this message
Brendan Donegan (brendan-donegan) wrote : Dbus errors when launching an application since image #96

Without any apparent changes to autopilot itself, an issue has been introduced in launching applications since image #96. This manifests itself in the logs as:

12:58:11.249 INFO _launcher:255 - Launching process: ['/usr/lib/arm-linux-gnueabihf/qt5/bin/qmlscene', '-testability', '-I/usr/lib/modules', '/tmp/tmpBppkbb.qml', '--desktop_file_hint=/home/phablet/.local/share/applications/tmpbs7ZaX.desktop']
12:58:40.820 ERROR proxies:410 - Introspect error on :1.810:/com/canonical/Autopilot/Introspection: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
12:58:40.840 DEBUG proxies:413 - Executing introspect queue due to error

This adds about 30 seconds to the length of every test, and causes some tests to fail as they depend on the application being in a certain state when the test is run (e.g. https://bugs.launchpad.net/mediaplayer-app/+bug/1334186).

After some debugging I can see the following code section:

    def _launch_test_application(self, launcher_instance, application, *args):

        dbus_bus = launcher_instance.dbus_bus
        if dbus_bus != 'session':
            self.patch_environment("DBUS_SESSION_BUS_ADDRESS", dbus_bus)

        pid = launcher_instance.launch(application, *args)
        process = getattr(launcher_instance, 'process', None)
        application_name = getattr(
            launcher_instance,
            'dbus_application_name',
            None
        )

When I reach here, dbus_application_name is not set.