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

Issue 878972 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Sep 6
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

Settings: JS error when removing current host device

Project Member Reported by khorimoto@chromium.org, Aug 29

Issue description

(1) Set a host device, and make sure Instant Tethering is supported.
(2) Go to Settings --> Connected Devices --> Forget this device --> Confirm.

Expected: No error; device is forgotten

Actual: JS error in console caused by the <network-summary-item>:

Error handling response: TypeError: Cannot read property 'Type' of null
    at HTMLElement.getDetailsA11yString_ (chrome://settings/crisper.js:769:5059)
    at TemplateInstance._annotatedComputationEffect (chrome://resources/polymer/v1_0/polymer/polymer-extracted.js:1634:24)
    at TemplateInstance._effectEffects (chrome://resources/polymer/v1_0/polymer/polymer-extracted.js:1443:7)
    at TemplateInstance._propertySetter (chrome://resources/polymer/v1_0/polymer/polymer-extracted.js:1427:6)
    at TemplateInstance.__setProperty [as __setPropertyOrig] (chrome://resources/polymer/v1_0/polymer/polymer-extracted.js:1436:6)
    at TemplateInstance.__setPropertyImpl [as __setProperty] (chrome://resources/polymer/v1_0/polymer/polymer-extracted.js:4394:6)
    at HTMLTemplateElement._forwardParentProp (chrome://resources/polymer/v1_0/polymer/polymer-extracted.js:5426:16)
    at HTMLTemplateElement.<anonymous> (chrome://resources/polymer/v1_0/polymer/polymer-extracted.js:4476:6)
    at HTMLTemplateElement._functionEffect (chrome://resources/polymer/v1_0/polymer/polymer-extracted.js:1593:4)
    at HTMLTemplateElement._effectEffects (chrome://resources/polymer/v1_0/polymer/polymer-extracted.js:1443:7)

The error occurs on the this line because deviceState is null:
    return this.i18n('OncType' + deviceState.Type);

See https://cs.chromium.org/chromium/src/chrome/browser/resources/settings/internet_page/network_summary_item.js?l=322
 
Status: Started (was: Assigned)
Labels: Merge-Request-70
Project Member

Comment 3 by bugdroid1@chromium.org, Aug 31

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e48cac4a5614a4a179eb0f6d798d320d911f3a51

commit e48cac4a5614a4a179eb0f6d798d320d911f3a51
Author: Jordy Greenblatt <jordynass@chromium.org>
Date: Fri Aug 31 21:15:50 2018

[CrOS MultiDevice]: Block false error thrown after forget device request

For context, when a change occurs in the a phone to which the
Chromebook is tethered, the MultiDevice tethering item is alerted and
updates accordingly. The bug was caused by the fact that the default
value for the deviceState property was null when there is an update and
no phone is found. In particular, this is exactly the situation that
occurs immediately following a successful request to forget the
tethering phone. Because the network-summary-item (the element directly
responsible for deplaying the tethering data) has an A11y string that
depends on a property (i.e. deviceState.Type) of deviceState, this
triggers the error described in the bug when the binding is updated.

The solutions was simply to change the default value for deviceState on
updates where no device is found from null to
{Type: 'Tether', State: 'Disabled'}
(this is the minimal definition satisfying the TypeDef so that the
binding can update safely.

Bug:  878972 
Change-Id: I1850e5c613a935b2fade129a1466638756d4af13
Reviewed-on: https://chromium-review.googlesource.com/1197350
Reviewed-by: Tommy Li <tommycli@chromium.org>
Reviewed-by: Kyle Horimoto <khorimoto@chromium.org>
Commit-Queue: Jordy Greenblatt <jordynass@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588170}
[modify] https://crrev.com/e48cac4a5614a4a179eb0f6d798d320d911f3a51/chrome/browser/resources/settings/multidevice_page/multidevice_tether_item.js

Status: Fixed (was: Started)
Status: Started (was: Fixed)
Not fixed until the CL has been merged to the M-70 branch.
Project Member

Comment 6 by sheriffbot@chromium.org, Sep 1

Labels: -Merge-Request-70 Hotlist-Merge-Approved Merge-Approved-70
Your change meets the bar and is auto-approved for M70. Please go ahead and merge the CL to branch 3538 manually. Please contact milestone owner if you have questions.
Owners: benmason@(Android), kariahda@(iOS), geohsu@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 7 by sheriffbot@chromium.org, Sep 5

This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible!

If all merges have been completed, please remove any remaining Merge-Approved labels from this issue.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 8 by bugdroid1@chromium.org, Sep 6

Labels: -merge-approved-70 merge-merged-3538
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e555551c5afbc7c8dd111fd1dad61dba5bb84055

commit e555551c5afbc7c8dd111fd1dad61dba5bb84055
Author: Jordy Greenblatt <jordynass@chromium.org>
Date: Thu Sep 06 00:23:02 2018

[CrOS MultiDevice]: Block false error thrown after forget device request

For context, when a change occurs in the a phone to which the
Chromebook is tethered, the MultiDevice tethering item is alerted and
updates accordingly. The bug was caused by the fact that the default
value for the deviceState property was null when there is an update and
no phone is found. In particular, this is exactly the situation that
occurs immediately following a successful request to forget the
tethering phone. Because the network-summary-item (the element directly
responsible for deplaying the tethering data) has an A11y string that
depends on a property (i.e. deviceState.Type) of deviceState, this
triggers the error described in the bug when the binding is updated.

The solutions was simply to change the default value for deviceState on
updates where no device is found from null to
{Type: 'Tether', State: 'Disabled'}
(this is the minimal definition satisfying the TypeDef so that the
binding can update safely.

Bug:  878972 
Change-Id: I1850e5c613a935b2fade129a1466638756d4af13
Reviewed-on: https://chromium-review.googlesource.com/1197350
Reviewed-by: Tommy Li <tommycli@chromium.org>
Reviewed-by: Kyle Horimoto <khorimoto@chromium.org>
Commit-Queue: Jordy Greenblatt <jordynass@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#588170}(cherry picked from commit e48cac4a5614a4a179eb0f6d798d320d911f3a51)
Reviewed-on: https://chromium-review.googlesource.com/1208953
Reviewed-by: Jeremy Klein <jlklein@chromium.org>
Cr-Commit-Position: refs/branch-heads/3538@{#75}
Cr-Branched-From: 79f7c91a2b2a2932cd447fa6f865cb6662fa8fa6-refs/heads/master@{#587811}
[modify] https://crrev.com/e555551c5afbc7c8dd111fd1dad61dba5bb84055/chrome/browser/resources/settings/multidevice_page/multidevice_tether_item.js

Status: Fixed (was: Started)

Sign in to add a comment