polymerfire: error on polymer build es6-bundled

hi, i have developed a site with polymer 2.0 (portfolio site) and i found the i have been running into a error showing
link of image

Uncaught TypeError: Cannot read property 'length' of undefined
    at Ss.o.dispatchEvent ((index):23)
    at _s ((index):23)
    at Ss.wf ((index):23)
    at Ss.ne ((index):23)

but when i run without build it works perfectly the reason of the cause produces from line return this.$.auth.signInWithPopup() i think that it is due to the "js": {"minify": true}, "html": {"minify": true} in polymer build.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 4
  • Comments: 17 (1 by maintainers)

Commits related to this issue

Most upvoted comments

Just open all files in the polymerfire folder with a -script ending… and replace the imports with the ref from the google cdn…

<script src="https://www.gstatic.com/firebasejs/4.1.3/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/4.1.3/firebase-auth.js"></script>
<script src="https://www.gstatic.com/firebasejs/4.1.3/firebase-database.js"></script>
<script src="https://www.gstatic.com/firebasejs/4.1.3/firebase-messaging.js"></script>

each line in there own file… now minify does not minify the already minified firebase-scripts… as an advantage you get faster page-load time because the scripts at cdn are g-zipped and pushed via http/2 I think.

Any fixes for this yet? This has been like this for a very long time now.

Using Polymer-CLI and choosing the starter kit with PRPL pattern, then just bower installing polymerfire and using the default example of “firebase-app” and “firebase-auth” does not work still, the most simplest of actions to get started.

Right now I have to do js: {minify:false} in polymer.json, and then add the line “navigateFallbackWhitelist: [/^(?!/__)/]” in sw-precache-config.js (to get serviceworker working with firebase auth) just to get a site running on firebase. Is this on the polymer-cli tool or on firebase to fix?

How are not more people getting stopped in the first step by this? Finding these threads and doing workarounds should not be a requirement just to get the first step of Polymer + Firebase +Polymerfire working.

Sorry for the tone, just a bit surprised that this is not fixed yet. I really want Polymer/Firebase/Polymerfire to grow so i can make my job move over to it 😄

I was able to work around this by reverting to version 2.0.0 of polymerfire.