tools: polymer-build breaks the app-storage/app-indexeddb-mirror element
Description
polymer-build breaks the app-storage/app-indexeddb-mirror element.
Versions & Environment
- polymer-build: v0.13.0
- node: v6.3.0
- Operating System: OS X
Steps to Reproduce
git clone https://github.com/GDGSpain/gdg.es.git
npm install && bower install
gulp polymer-build
polymer serve build/bundled
Open the localhost:8080/groups page.
Expected Results
Achieved with the polymer serve.
Actual Results
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 33 (24 by maintainers)
I got this problem because of my service worker. I’m pretty sure you also have one and it also is the cause for you. I solved this problem by adding this to
sw-precache-config.js:So for example for @abdonrd it would be:
Of course, as you already found out, it’s also required to add this to
polymer.json:Explanation
As it’s written here
So
https://gdg-es-develop.firebaseapp.com/bower_components/app-storage/app-indexeddb-mirror/common-worker-scope.js?https://gdg-es-develop.firebaseapp.com/bower_components/app-storage/app-indexeddb-mirror/app-indexeddb-mirror-worker.jsbecause of this crazy parameter it couln’t find this URL among the precached and so it returned 404.For me it should be at least noted in the
app-storagedocumentation like it’s noted aboutextraDependencieslinkOr it should be redesigned to avoid problems like this at all.
@FredKSchott have you been able to review the https://github.com/Polymer/polymer-build/issues/22#issuecomment-260749112?
@kownacki your solution works for me! Thanks a lot!
@abdonrd It is enough to make it working in desktop browsers where Shared Workers are available. But
app-storageon android switches to Web Workers which causes more problems which can be solved withignoreUrlParametersMatching.I hope it helps 😃
@abdonrd @FredKSchott @midesweb This is how I resolve this issue - to include the
.jsfiles insideapp-storage/app-indexeddb-mirrorfor bothbundledandunbundled.You are seeing that output on my #34 branch? Hmm… That’s strange because that’s exactly what that branch is supposed to fix.
Will take a look first thing tomorrow morning On Tue, Nov 1, 2016 at 6:21 PM Abdón Rodríguez Davila < notifications@github.com> wrote:
Otherwise, please update your steps to reproduce (currently getting
Error: File not found with singular glob: /Users/fschott/Code/gdges/app.yaml) and I’ll take a look.@abdonrd the new analyzer was added in v0.5.0, can you download the latest version from npm and see if that fixes it? Fingers crossed for you…
@abdonrd sorry I still haven’t been fix the problem you’re seeing with that element. I’ll try to find some time next week but I can’t promise I’ll be able get to it 😦
Have you tried digging into the build command yourself? Try using the
--verboseflag & maybe adding some logging of your own, you might be able to spot something that I missed when I first looked into this.