Tools: Error when Deploying to Firebase with Polymer Bundles

Created on 18 Sep 2017  路  6Comments  路  Source: Polymer/tools

Versions & Environment

  • polymer-build: 2.0
  • node:
  • Operating System: macOSX

Description

Hi! I have errors showing up when I deployed my polymer-starter-kit to Firebase.

screen shot 2017-09-17 at 9 11 31 am

In my local polymer serve command no errors could be seen. And even when I do firebase serve no errors could be seen.

When I do polymer build it produces 3 bundles:

  • es5-bundled/
  • es6-bundled/
  • es6-unbundled/

And here's my firebase.json

{ "database": { "rules": "database.rules.json" }, "hosting": { "public": "build/es6-unbundled", "rewrites": [ { "source": "!/__/**", "destination": "/index.html" }, { "source": "**/!(*.js|*.html|*.css|*.json|*.svg|*.png|*.jpg|*.jpeg)", "destination": "/index.html" } ] } }

This is affecting my firebase-documents query. When deployed, my app loads at it should but the data from the firebase is not showing. But in my local everything loads...the app and the data.

build Medium Available Bug

Most helpful comment

I just followed the steps from the tutorial (https://www.polymer-project.org/3.0/start/toolbox/deploy) and I got a lot of errors. Different from the one in the screenshot, but I guess related.
screen shot 2018-08-14 at 15 34 02

All 6 comments

I believe that issue is that you have a circular redirect which is attempting to load my-app.html twice.

I'm not entirely sure how Firebase's rewrite system works, but could it be that your first rule ("source": "!/__/**", "destination": "/index.html") is acting as a catch-all and preventing the proper page or 404 from being displayed, and instead loading index.html again?

@jsilvermist I'll try looking if I tried to load my my-app.html twice. But according to the docs in polymer-project.org, that's how I should format my firebase.json.

EDIT:
I didn't load my-app.html twice. I checked both in my local src and my builds src.

I just followed the steps from the tutorial (https://www.polymer-project.org/3.0/start/toolbox/deploy) and I got a lot of errors. Different from the one in the screenshot, but I guess related.
screen shot 2018-08-14 at 15 34 02

Same issue here.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Any update of this?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dilansankalpa picture dilansankalpa  路  3Comments

Westbrook picture Westbrook  路  4Comments

justinfagnani picture justinfagnani  路  4Comments

MaKleSoft picture MaKleSoft  路  3Comments

rasto68 picture rasto68  路  4Comments