Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

common-worker.html#L23 uses incorrect BASE_URI breaks indexeddb SW on Firebase #78

Open
n1ywb opened this issue Nov 30, 2016 · 2 comments

Comments

@n1ywb
Copy link

n1ywb commented Nov 30, 2016

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:

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

  1. open https://mojibrag.firebaseapp.com on android device
  2. Start chrome remote debugging
  3. reload page
  4. 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
@n1ywb
Copy link
Author

n1ywb commented Nov 30, 2016

I think this is related to https://github.com/Polymer/polymer-build/issues/22 and notwaldorf/mojibrag#49

@n1ywb
Copy link
Author

n1ywb commented Nov 30, 2016

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);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant