-
Notifications
You must be signed in to change notification settings - Fork 200
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
Generated SW breaks on Firebase hosting #1194
Comments
@notwaldorf was this the issue you all mentioned yesterday with service workers and the 1 line fix? (crosses fingers...) |
indeed. The fix is to add |
ugh, that's rough. We should think about how we could catch issues like these, or at the very least document them somewhere in the README as they come up. |
yeah it took a decent afternoon of debugging and honestly we only arrived at this point by reverse engineering a SW one of the firebase folks had written and just deleting stuff till it worked :P Which readme do you think would be the best place for this? |
I'm not sure yet, the CLI README gets the most traffic but its an issue for polymer-build as well. For now I would quickly mention that this kind of thing might need to be configured somewhere in the polymer-build README, and then do a better job of linking into the polymer-build README in the @robdodson wdyt? Can you help describe the fix in the polymer-build README? |
sure i'll send a PR |
I just noticed the polymer-build readme doesn't mention |
Catching up -- yes, that's the one liner. The problem is that auth on accounts.google.com happens as a redirect from a private Firebase page at If there is a "How to add Firebase to your project" section, that's a good place for it since it's very Firebase specific |
Gotcha. In that case we should add a more specific "working with service workers" or "working with the polymer cli" section to the polymerfire README that calls out this problem & solution specifically. Then we could add the more general "hey you may need to whitelist some URLs for third-parties" to the polymer-build README. @robdodson you're right, it takes the config as a property in its |
@FredKSchott ok so sw-precache-config.js is for CLI builds, and an options object is used for polymer-build builds... yeah? |
you got it. And both take the exact same data / format. |
I sent a PR for the firebase-auth docs. |
So should sw-precache-config.js
|
yep |
I use this to work:
|
Fixed via 6d17551 & FirebaseExtended/polymerfire#113 |
Thanks for sharing @rof20004! |
Running locally with
polymer serve
works fine. But if I deploy and check out the version on firebase hosting, when I click sign in, it opens the OAuth window (which is blank), sits there for a little while, then closes the OAuth window and logs:Only way to fix it is to go into the Applications panel in DevTools and set
Bypass for network
to tell the SW to not intercept requests on the page.My suspicion is when the OAuth window opens, the SW is jumping in and trying to handle things. I've actually randomly seen the site get served into the window that was spawned to display the OAuth sign in
The text was updated successfully, but these errors were encountered: