user2689782
user2689782

Reputation: 767

Latest Canary, Angular/Webcomponents/Polymer/Polyfill is broken

This is an error I am seeing only in Canary v80. I have an Angular 1.3/Webcomponents 0.7 application, and several of the UI elements are not rendering correctly. It is very hard to track down which element of the application is throwing the error.

E.g., I have a page with text fields, dropdowns, and buttons. In the dev tools, I see an error as

exception: TypeError: Cannot read property 'childNodes' of undefined at nodeLinkFn
at compositeLinkFn ..at compositeLinkFn.. at nodeLinkFn.. at compositeLinkFn ...

In another page, I have

 el.getPropertyInfo is not a function 
{exception: TypeError: el.getPropertyInfo is not a function..

cause: "<paper-menu class="dropdown-content ng-pristine ng-untouched ng-valid ng-isolate-scope" selected="{{xxx.yyy}}" data-ng-model="xxx" attr-for-selected="name" gi-polymer-event-bind="iron-select:aaa(xxx)" role="menu" tabindex="0">"

All of these work perfectly in Chrome.

Upvotes: 0

Views: 114

Answers (1)

Suresh Sennakesavan
Suresh Sennakesavan

Reputation: 11

Quick workaround: Adding the origin-trails token to the index.html

Please follow the steps to generate the token:

You can opt any page on your origin into the trial of an experimental feature by requesting a token for your origin(https://developers.chrome.com/origintrials/). After signing up for a trial, we will generate a token for your origin.

There are two ways to provide this token on any pages in your origin:

  • Add an origin-trial tag to the head of any page. For example, this may look something like:

    <meta http-equiv="origin-trial" content="**insert your token as provided in the developer console**">

  • If you can configure your server, you can also provide the token on pages using an Origin-Trial HTTP header. The resulting response header should look something like:

    Origin-Trial: **token as provided in the developer console**

NOTE: You can provide multiple tokens for a given page. Only one valid token is required to enable a trial, any other invalid tokens or non-matching tokens are ignored. You may want to provide multiple tokens if the same page is served to different origins (e.g. example.com, example.ca, etc.). You can add multiple tags to the page, include multiple Origin-Trial response headers, or a single Origin-Trial response header, with comma-separated tokens.

Reference: https://github.com/GoogleChrome/OriginTrials/blob/gh-pages/developer-guide.md

Upvotes: 1

Related Questions