common-worker.html#L23 uses incorrect BASE_URI breaks indexeddb SW on Firebase
Description
common-worker-scope.js fails to load with 404 when using polymer cli starter kit and firebase hosting because BASE_URI at https://github.com/PolymerElements/app-storage/blob/master/app-indexeddb-mirror/common-worker.html#L23 is wrong
see also:
- https://github.com/notwaldorf/mojibrag/issues/49
- https://github.com/Polymer/polymer-build/issues/22
Expected outcome
URI should be https://mojibrag.firebaseapp.com/bower_components/app-storage/app-indexeddb-mirror/common-worker-scope.js
Actual outcome
URI generated is
https://mojibrag.firebaseapp.com/src/common-worker-scope.js
service worker fails to load
Live Demo
https://mojibrag.firebaseapp.com
Steps to reproduce
- open https://mojibrag.firebaseapp.com on android device
- Start chrome remote debugging
- reload page
- note service worker fails to load
I was able to work around this issue by hacking the currect BASE_URI into common-worker.html but I don't think this is the correct solution
var BASE_URI = "/bower_components/app-storage/app-indexeddb-mirror";
Browsers Affected
- [X ] Chrome Android
I think this is related to https://github.com/Polymer/polymer-build/issues/22 and https://github.com/notwaldorf/mojibrag/issues/49
I kludgily hacked around this in https://github.com/PolymerElements/app-storage/blob/master/app-indexeddb-mirror/common-worker.html#L23
var BASE_URI = "";
var WORKER_SCOPE_URL =
Polymer.ResolveUrl.resolveUrl('/bower_components/app-storage/app-indexeddb-mirror/common-worker-scope.js', BASE_URI);