Serve The demo pages
Uncaught TypeError: Cannot read property 'localName' of undefined
Can you provide more description about how to reproduce this issue?
I got this error too....
polymer initpolymer serve when I opened the browser (http://localhost:8081)Show the index page
After I fixed this errors, just wrong linking, I got Cannot read property 'localName' of undefined in my developer tools. Maybe this can help how to solve this bug...
I get this error following the steps above. The issue is with https://github.com/PolymerLabs/polydev in polydev/src/document-context/measure-custom-element.js on line 29 (see cb() below) the callback references ShadyCSS (see second snippet) and this is undefined.
The site works in Firefox and Safari just fine; it's a bug with Chrome 56 (and others?).
function makeMeasurement(operation, tagName, counter, cb) {
const counterSuffix = counter == null ? '' : ` ${counter}`;
const startMark = `${prefix}start ${operation} ${tagName}${counterSuffix}`;
const endMark = `${prefix}end ${operation} ${tagName}${counterSuffix}`;
const measure = `${prefix}${operation} ${tagName}${counterSuffix}`;
window.performance.mark(startMark);
try {
// ERROR #1 - calls connectedCallback() below
return cb();
}
finally {
window.performance.mark(endMark);
window.performance.measure(measure, startMark, endMark);
}
}
The cb() function actually calls
connectedCallback() {
if (window.ShadyCSS) {
// ERROR #2 - this is undefined, naturally
window.ShadyCSS.styleElement(this);
}
this._flushProperties();
}
Polymer: v2.0.0.0rc.3
webcomponents: v1.0.0 rc.6
Chrome: 56
Same error occurs when running PSK3 latest RC. Only on chrome (tested on chrome 57)
Remove the "Polymer DevTools Extension" if you had installed such an extension in your Chrome :D
This is now fixed at master in polydev. It looks like the only developer with the credentials to publish the fix is on vacation though. Will update the bug once it's deployed.
Was touched by this issue too, ThX for the fix and following now!
v0.0.8 is published with the fix!
Most helpful comment
v0.0.8 is published with the fix!