RPC error when executing telemetry cmd for Guado in meeting mode. |
||||||
Issue description
Chrome Version: (copy from chrome://version)
OS: (e.g. Win7, OSX 10.9.5, etc...)
Google Chrome Version 61.0.3163.38
Platform Version 9765.21.0 (Official Build) dev-channel guado test
Firmware Version Google_Guado.6301.108.4
Boot Mode Dev
What steps will reproduce the problem?
(1)Run autotest to use telemetry to start meeting.
(2)Check whether page is in meeting.
(3)if yes, run telemetry to query device.
What is the expected result?
Once in meeting page all telemetry cmd should be available.
What happens instead?
RPC error is reported, and it reports telemetry is not available
Please use labels and text to provide additional information.
------------------------------------------------------------
========================================================================
6:56:19 INFO | autoserv| XMLRPC server started successfully.
06:56:21 INFO | autoserv| wait for telemetry
06:56:33 INFO | autoserv| thor meeting joined <<<<<<<<<<<<<<<<<<<<<<,
06:56:33 INFO | autoserv| wait for meeting in call page <<<<<<<<<<<<
06:56:34 INFO | autoserv| Failed RPC 'cfm.wait_for_meetings_in_call_page'((), {}) with status [<type 'exceptions.Exception'>].
06:56:34 INFO | autoserv| Exception : RPC error: cfm.wait_for_meetings_in_call_page<<<<<<
06:56:34 INFO | autoserv| Traceback (most recent call last):
06:56:34 INFO | autoserv| File "./multimedia_xmlrpc_server.py", line 89, in _dispatch
-----------------------------------------------------------------------
1:19:47 INFO | autoserv| wait for telemetry <<<<<<<<<<<<<<<<<<<<<
11:19:55 INFO | autoserv| thor meeting joined <<<<<<<<<<<<<<<<<<<<
11:19:55 INFO | autoserv| wait for meeting in call page <<<<<<<<<<<<<<<
11:19:55 INFO | autoserv| meeting is in call page <<<<<<<<<<<<<<
11:19:55 INFO | autoserv| Failed RPC 'cfm.get_preferred_speaker'((), {}) with status [<type 'exceptions.Exception'>].
11:19:55 INFO | autoserv| Exception : RPC error: cfm.get_preferred_speaker <<<<<<<
11:19:55 INFO | autoserv| Traceback (most recent call last):
11:19:55 INFO | autoserv| File "./multimedia_xmlrpc_server.py", line 89, in _dispatch
11:19:55 INFO | autoserv| return func(*params)
11:19:55 INFO | autoserv| File "/usr/local/autotest/cros/multimedia/cfm_facade_native.py", line 318, in get_preferred_speaker
11:19:55 INFO | autoserv| return self.cfmApi.get_preferred_speaker()
11:19:55 INFO | autoserv| File "/usr/local/autotest/common_lib/cros/cfm_meetings_api.py", line 182, in get_preferred_speaker
11:19:55 INFO | autoserv| return self._evaluate_telemetry_command('getPreferredAudioOutDevice()')
11:19:55 INFO | autoserv| File "/usr/local/autotest/common_lib/cros/cfm_meetings_api.py", line 23, in _evaluate_telemetry_command
11:19:55 INFO | autoserv| 'window.%s.%s' % (TELEMETRY_API, command))
11:19:55 INFO | autoserv| File "/usr/local/telemetry/src/third_party/catapult/common/py_trace_event/py_trace_event/trace_event_impl/decorators.py", line 52, in traced_function
11:19:55 INFO | autoserv| return func(*args, **kwargs)
11:19:55 INFO | autoserv| File "/usr/local/telemetry/src/third_party/catapult/telemetry/telemetry/internal/browser/web_contents.py", line 167, in EvaluateJavaScript
11:19:55 INFO | autoserv| return self._inspector_backend.EvaluateJavaScript(*args, **kwargs)
11:19:55 INFO | autoserv| File "/usr/local/telemetry/src/third_party/catapult/common/py_trace_event/py_trace_event/trace_event_impl/decorators.py", line 52, in traced_function
11:19:55 INFO | autoserv| return func(*args, **kwargs)
11:19:55 INFO | autoserv| File "/usr/local/telemetry/src/third_party/catapult/telemetry/telemetry/internal/backends/chrome_inspector/inspector_backend.py", line 237, in EvaluateJavaScript
11:19:55 INFO | autoserv| return self._EvaluateJavaScript(expression, context_id, timeout)
11:19:55 INFO | autoserv| File "/usr/local/telemetry/src/third_party/catapult/common/py_trace_event/py_trace_event/trace_event_impl/decorators.py", line 52, in traced_function
11:19:55 INFO | autoserv| return func(*args, **kwargs)
11:19:55 INFO | autoserv| File "/usr/local/telemetry/src/third_party/catapult/telemetry/telemetry/internal/backends/chrome_inspector/inspector_backend.py", line 36, in inner
11:19:55 INFO | autoserv| return func(inspector_backend, *args, **kwargs)
11:19:55 INFO | autoserv| File "/usr/local/telemetry/src/third_party/catapult/telemetry/telemetry/internal/backends/chrome_inspector/inspector_backend.py", line 501, in _EvaluateJavaScript
11:19:55 INFO | autoserv| return self._runtime.Evaluate(expression, context_id, timeout)
11:19:55 INFO | autoserv| File "/usr/local/telemetry/src/third_party/catapult/telemetry/telemetry/internal/backends/chrome_inspector/inspector_runtime.py", line 54, in Evaluate
11:19:55 INFO | autoserv| description=details.get('exception', {}).get('description'))
11:19:55 INFO | autoserv| EvaluateException: UncaughtTypeError:
11:19:55 INFO | autoserv| TypeError: window.hrTelemetryApi.getPreferredAudioOutDevice is not a function
11:19:55 INFO | autoserv| at <anonymous>:1:23
11:19:55 INFO | autoserv|
,
Aug 21 2017
I think we managed to get down to the bottom of this. The telemetry API has initially designed for hangouts which operated on all our test setups on a single window (read: screen). With mimo going live and having dual screen setups + mimo (possibly multiple mimos in the future) we need to update the telemetry API to accommodate multi-window support. The current problem is that http://cs/chromeos_public/src/third_party/autotest/files/client/common_lib/cros/kiosk_utils.py?l=31&rcl=4416ff5127e1af348f05fcf05a39f0b70133b356 returns only window/webview context, and it is not even deterministic. That causes our tests to send telemetry commands sometimes to the MIMO, sometimes to the main window. Also, the MIMO window does not expose most telemetry commands - that will be addresses today by a separate cl/ on the front end side.
,
Aug 21 2017
,
Aug 22 2017
For context, multi window support was added in https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/524633 and we need to expand on that logic.
,
Aug 22 2017
Harpreet, I am digging through the code base and notice some oddities. Since we want to add new objects represeting the e.g. MIMO, woudl it make sense to make a facade for it and expose it through a new cfm_xmlrpc_server object? I seems strange we're adding our APIs to the multimedia one directly. I've tried to expose the mimo property on the cfm facade, but the adapter in multimedia allow only one level of delegation. What I mean by this: we can atm we can do cfmFacade.isInMeeting(), but not cfmFacade.main_scree.isInMeeting() from within a test. We're hitting http://cs/chromeos_public/src/third_party/autotest/files/client/cros/multimedia/multimedia_xmlrpc_server.py?l=85&rcl=4442d6fb2c7fa950a49aad4c38402003dc4eb484 I think it would make sense to add a new cfm rpc server for the future - whatever we have we will keep running/maintaing but not add new features. The further I look at the infra here and the growing complexity of the project I believe it is in our best interest to define clearly how we interact with the cfm and its peripherals in our tests (through componentized APIs). As for writing tests we can always implement helper methods that would make them more generic and support running on different setups. wdyt?
,
Aug 23 2017
I don't see any benefit of creating a separate cfm_xmlrpc_server. Existing facades under multimedia provide other needed wiring for us to use the browser as well. It might be best to just add another facade for MIMO here itself if you want the ability to interact with both the MIMO and TV API's via the same test. In addition to this, you can make getting the webview context more deterministic by iterating through all available contexts and checking if the given context has MIMO or TV apis and returning the desired context. https://cs.corp.google.com/chromeos_public/src/third_party/autotest/files/client/common_lib/cros/kiosk_utils.py?l=15-44 I would also suggest you to go through the existing CFM tests as well as the lab setup (go/cfm-lab-setup) to get an idea of how the current setup works. Also, our long term plan should not be to have extensive number of end to end integration tests using these API's but rather to have few important such tests and split the rest into ChromeOS/Chrome specific, WebRtc specific, PA specific tests. We can talk about this more.
,
Aug 23 2017
Just for clarity, the approach I mentioned would allow us to make calls like cfmFacade.isInMeeting() and mimoFacade.isInMeeting() from within a test. So I am not clear about any added benefit for having multi level api delegation as you suggested but I am open to any changes you want to try out.
,
Aug 23 2017
I was just under the impression that we want to have the mimo and main_scree (tv Ui) properties under the cfm facade available which technically is not feasible as I found out yesterday - there is nothing blocking/speaking against adding a new mimo facade (and will not have to refactor existing tests). Doing so we can simply treat the existing cfm facade as the TV UI facade which should in any setup. Caveat: the OOB procedure will evetually be reediness so we might have to do some extra work when it comes to testing OOB w/ or wo/ mimo (minor though as it should just be test code). Thanks for the comments re xmlrpc_server, I was not aware that we use it for things besides the cfm facade so it makes sense to keep it where it is.
,
Aug 25 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/autotest/+/2ee011ca40f182acd7c85f3776138064678c67ed commit 2ee011ca40f182acd7c85f3776138064678c67ed Author: Denis Tosic <dtosic@chromium.org> Date: Fri Aug 25 19:09:02 2017 Pick webviews based on the 'screen' url param cfm_facade_native is a simple API wrapper that issues commands to a webview. The webview picking logic is not working properly if there are multiple webviews available (e.g. MIMO + main screen) and any one of them could be returned. This change adds the screen param to the constructor to be able to create cfm facades for specific webviews. It also updates the necessary logic in kiosk_utils.py, points the _cfm_proxy (in cfm_facade_adapter) to use the main screen and exposes a new mimo facade in the xmlproxy that will be used in future changes/tests. This change should not affect existing tests as all tests that use the cfm_facade_adapator.cfm since commands are now always sent to the main window. TEST=local setup BUG= chromium:756166 Change-Id: Idb8b7f490ed17c09dc6e01f0ff79a4bf17edff6c Reviewed-on: https://chromium-review.googlesource.com/628540 Commit-Ready: Claes Malmnäs <malmnas@google.com> Commit-Ready: Denis Tosic <dtosic@chromium.org> Tested-by: Claes Malmnäs <malmnas@google.com> Tested-by: Denis Tosic <dtosic@chromium.org> Reviewed-by: Claes Malmnäs <malmnas@google.com> Reviewed-by: Denis Tosic <dtosic@chromium.org> [modify] https://crrev.com/2ee011ca40f182acd7c85f3776138064678c67ed/server/cros/multimedia/cfm_facade_adapter.py [modify] https://crrev.com/2ee011ca40f182acd7c85f3776138064678c67ed/client/common_lib/cros/kiosk_utils.py [modify] https://crrev.com/2ee011ca40f182acd7c85f3776138064678c67ed/client/site_tests/enterprise_RemoraRequisition/enterprise_RemoraRequisition.py [modify] https://crrev.com/2ee011ca40f182acd7c85f3776138064678c67ed/client/cros/multimedia/cfm_facade_native.py [modify] https://crrev.com/2ee011ca40f182acd7c85f3776138064678c67ed/client/cros/multimedia/multimedia_xmlrpc_server.py
,
Sep 19 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/autotest/+/53a0d85dc911c6d9b852a421f9dcfe5e677b94cd commit 53a0d85dc911c6d9b852a421f9dcfe5e677b94cd Author: Denis Tosic <dtosic@chromium.org> Date: Tue Sep 19 12:25:10 2017 Expose the main and mimo screen properties This will be used in cfm autotests to interact with the corresponding screen. The API exposed on these properties is the native facade bound to them in /client/cros/multimedia/multimedia_xmlrpc_server.py. BUG= chromium:756166 TEST=none Change-Id: I6cbdd3af7b50d02f7f609fc1259048af4ed81fee Reviewed-on: https://chromium-review.googlesource.com/640950 Commit-Ready: Denis Tosic <dtosic@chromium.org> Tested-by: Denis Tosic <dtosic@chromium.org> Reviewed-by: Harpreet Grewal <harpreet@chromium.org> Reviewed-by: Min Zhuo <mzhuo@chromium.org> [modify] https://crrev.com/53a0d85dc911c6d9b852a421f9dcfe5e677b94cd/server/cros/multimedia/cfm_facade_adapter.py
,
Oct 18 2017
This has been resolved, please open new bugs for new issues.
,
Jan 22 2018
,
Jan 23 2018
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by dtosic@google.com
, Aug 17 2017Status: Assigned (was: Untriaged)