Webpage using polymer library suddenly broken

44 Views Asked by At

At my workplace some web pages have suddenly started to malfunction a few days ago (lots of elements are not showing anymore in the pages.). I inspected the matter in firefox using the developer's tools (F12) and identified a problem with two polymer libraries (namely polymer-micro.html and paper-ripple-behavior.html in version 1.7.0.2).

According to the developer's console it has something to do with CORS, but I suspect the problem is rather connected to the displacement of resources from one url (https://cdn.rawgit.com/download/polymer-cdn/1.7.0.2/) to another (https://cdn.jsdelivr.net/gh/download/[email protected]/). Indeed, in the developer's network console I can see that all polymer resources go through an http code 301 with a redirection to the latter url, except for the two aforementioned libraries which end up with an http code of 200 although their content is strangely empty.

I am not a web developer and my analysis sadly ends here. Furthermore, our data being confidential I can't provide an access to our website.

Any help to understand the problem and fix it will be appreciated.

Thanks.

I don't know if this is relevant, but in case I also mention that :

  • The two problematic libraries that still exist -although empty- in the old location, seem to also exist in the new location
  • These two libraries are nowhere to be seen in the source code of my page, therefore I think they are "collateral imports" of other polymer libraries. The polymer libraries that can be seen in my page are :
<link href="qliksense-card.html" rel="import">
<link href="https://cdn.rawgit.com/download/polymer-cdn/1.7.0.2/lib/iron-flex-layout/iron-flex-layout-classes.html" rel="import">
<link href="https://cdn.rawgit.com/download/polymer-cdn/1.7.0.2/lib/paper-header-panel/paper-header-panel.html" rel="import">
<link href="https://cdn.rawgit.com/download/polymer-cdn/1.7.0.2/lib/paper-toolbar/paper-toolbar.html" rel="import">
<link href="https://cdn.rawgit.com/download/polymer-cdn/1.7.0.2/lib/paper-drawer-panel/paper-drawer-panel.html" rel="import">
<link href="https://cdn.rawgit.com/download/polymer-cdn/1.7.0.2/lib/paper-icon-button/paper-icon-button.html" rel="import">
<link href="https://cdn.rawgit.com/download/polymer-cdn/1.7.0.2/lib/paper-button/paper-button.html" rel="import">
<link href="https://cdn.rawgit.com/download/polymer-cdn/1.7.0.2/lib/iron-icons/iron-icons.html" rel="import">
<link href="https://cdn.rawgit.com/download/polymer-cdn/1.7.0.2/lib/iron-pages/iron-pages.html" rel="import">
<link href="https://cdn.rawgit.com/download/polymer-cdn/1.7.0.2/lib/paper-menu/paper-menu.html" rel="import">
<link href="https://cdn.rawgit.com/download/polymer-cdn/1.7.0.2/lib/paper-item/paper-item.html" rel="import">
<link href="polymer-mixins.html" rel="import">
<style include="iron-flex iron-positioning" is="custom-style"></style>
<style include="polymer-mixins" is="custom-style"></style>```
1

There are 1 best solutions below

0
Benjamin schwarz On

Just in case somebody else has the same problem : It was solved by replacing all urls by their new version. That is replacing https://cdn.rawgit.com/download/polymer-cdn/1.7.0.2/ with https://cdn.jsdelivr.net/gh/download/[email protected]/

As for the causes of the problem I am clueless.