New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 777808 link

Starred by 0 users

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Goofy: extension RPC calls returns incomplete results.

Project Member Reported by youcheng@chromium.org, Oct 24 2017

Issue description

Test Image: 9998.3.0
Factory Repo: a14210e323d8e575534c4e8d84771164e036cd85

What steps will reproduce the problem?
======================================
$ cd /usr/local/factory/py/
$ python
>>> import factory_common
>>> from cros.factory.test import state
>>> s = state.get_instance()
>>> d = s.DeviceGetDisplayInfo()

What is the expected result?
============================
Get the result of DeviceGetDisplayInfo.

What happens instead?
=====================
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/site-packages/jsonrpclib/jsonrpc.py", line 276, in __call__
    return self.__send(self.__name, kwargs)
  File "/usr/local/lib/python2.7/site-packages/jsonrpclib/jsonrpc.py", line 225, in _request
    check_for_errors(response)
  File "/usr/local/lib/python2.7/site-packages/jsonrpclib/jsonrpc.py", line 529, in check_for_errors
    raise ProtocolError((code, message))
jsonrpclib.jsonrpc.ProtocolError: (-32603, u'Server error:   File "/usr/local/factory/py_pkg/cros/factory/goofy/goofy_rpc.py", line 593, in CallExtension | AttributeError: \'Event\' object has no attribute \'args\'')


After tracing _process_event() in py/test/event.py, we found that it's possible to receive an event with is_response=true but without 'args'.

 
Cc: philipchen@chromium.org
Uploaded a CL for current running factory build: https://crosreview.com/735579

Comment 3 by hungte@chromium.org, Oct 24 2017

that link does not work
Sorry, the correct link is http://crosreview.com/735579
Project Member

Comment 5 by bugdroid1@chromium.org, Oct 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/e57c6337a6965e1dbe1a6738a937a27329997787

commit e57c6337a6965e1dbe1a6738a937a27329997787
Author: Peter Shih <pihsun@chromium.org>
Date: Thu Oct 26 07:19:47 2017

goofy.js: Fix undefined not included in sendEvent JSON.

There's subtle difference between JSON.stringify and
goog.json.serialize, that JSON.stringify would ignore value undefined,
but goog.json.serialize would transform undefined to null. Change the
sendEvent to also serialize undefined to null too, and revert fix in
CL:689354.

BUG= chromium:777808 
TEST=make test
TEST=manually on DUT.

Change-Id: I0ed0f9757c416fba6788d8a99354a1da734f5c82
Reviewed-on: https://chromium-review.googlesource.com/737491
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>

[modify] https://crrev.com/e57c6337a6965e1dbe1a6738a937a27329997787/py/test/pytests/camera_static/camera.js
[modify] https://crrev.com/e57c6337a6965e1dbe1a6738a937a27329997787/py/goofy/js/goofy.js

Status: Fixed (was: Assigned)
Status: WontFix (was: Fixed)
Unable to reproduce
Status: Assigned (was: WontFix)
See a similar issue again today.
This issue disappeared again...
(Neither test image nor toolkit is changed.)
Labels: -Pri-1 Pri-2
The key is that, if one connects to DUT 4012 port with browser, then they will encounter an issue that DeviceGetDisplayInfo() returns None.

Decrease the priority.
Project Member

Comment 11 by bugdroid1@chromium.org, Dec 4 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/factory/+/c60df2c12292b79b763726c39ea2dc1361bb80cf

commit c60df2c12292b79b763726c39ea2dc1361bb80cf
Author: You-Cheng Syu <youcheng@chromium.org>
Date: Mon Dec 04 15:28:27 2017

goofy_rpc: Ignore extension RPC call results when error occurs.

Sometimes we want to connect to Goofy via network. In this situation,
Goofy extension RPC calls often return None because external browsers
don't have the extension and will return via callback function without
result immediately. This causes some tests (e.g., external_display and
tablet_rotation) couldn't work.

In this case, we should just ignore those results on external browsers.

BUG= chromium:777808 
TEST=manually

Change-Id: I494f66c9f5c6b4177de332a04f0de9a0e00cf647
Reviewed-on: https://chromium-review.googlesource.com/805419
Commit-Ready: Youcheng Syu <youcheng@chromium.org>
Tested-by: Youcheng Syu <youcheng@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>

[modify] https://crrev.com/c60df2c12292b79b763726c39ea2dc1361bb80cf/py/goofy/js/goofy.js

Status: Verified (was: Assigned)

Sign in to add a comment