Comment 0 for bug 1198277

Revision history for this message
Javier Collado (javier.collado) wrote : Failed to create proxy object for gallery app

I'm having trouble lately running test cases with autopilot. One of the problems is that I'm not able to launch the gallery application using something like:
launch_test_application('gallery-app', temp_sample_dir, app_type='qt')

In particular the backtrace that I obtain in this case is:

    Traceback (most recent call last):
      File "/usr/lib/python2.7/dist-packages/ubuntu_test_cases/memory_usage_measurement/tests/test_memory_usage.py", line 56, in test_scenario
        gallery.launch()
      File "/usr/lib/python2.7/dist-packages/ubuntu_test_cases/memory_usage_measurement/apps/gallery.py", line 37, in launch
        app_type='qt')
      File "/usr/lib/python2.7/dist-packages/autopilot/testcase.py", line 256, in launch_test_application
        return get_autopilot_proxy_object_for_process(process, emulator_base)
      File "/usr/lib/python2.7/dist-packages/autopilot/introspection/__init__.py", line 160, in get_autopilot_proxy_object_for_process
        return get_proxy_object_for_existing_process(pid, emulator_base=emulator_base)
      File "/usr/lib/python2.7/dist-packages/autopilot/introspection/__init__.py", line 205, in get_proxy_object_for_existing_process
        raise RuntimeError("Search criteria returned no results")
    RuntimeError: Search criteria returned no results

Something that might be related is that recently a needed to update the test cases in the device (mako) to make them work and that broke them when running them in my laptop. What I needed to do was replace `proxy.pid` with `proxy.process`. At first it looked to me like `pid` was renamed to `process`, but now I think something might be wrong with this because in the code `process` seems to be clearly set to whatever is returned by `subprocess.Popen` and `pid` is set to access `process.pid`.