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

Errors running with minified js under es5 or es6 in Chrome 61 #280

Open
1 of 8 tasks
vivetech opened this issue Oct 10, 2017 · 2 comments
Open
1 of 8 tasks

Errors running with minified js under es5 or es6 in Chrome 61 #280

vivetech opened this issue Oct 10, 2017 · 2 comments

Comments

@vivetech
Copy link

Description

The firebase-auth element fails to initialize when running under es5 or es6 with js minified.

Expected outcome

The page should load with no errors written to the console. Calling the signInWithPopup method on the firebase-auth element should initiate the Google sign-in with popup as expected.

Actual outcome

An error is written to the console and calling signInWithPopup method on the firebase-auth element fails.

firebase-auth.js:1 Uncaught TypeError: Cannot read property 'length' of undefined
at Ee.e.dispatchEvent (firebase-auth.js:1)
at Me (firebase-auth.js:1)
at Ee.Pe (firebase-auth.js:1)
at Ee.send (firebase-auth.js:1)
at Ed.sg (firebase-auth.js:1)
at Cd (firebase-auth.js:1)
at firebase-auth.js:1
at new ta (firebase-auth.js:1)
at Ld (firebase-auth.js:1)
at firebase-auth.js:1

Live Demo

https://test-b2837.firebaseapp.com

Steps to reproduce

  1. Create a test project in Firebase and enable Google authentication.
  2. Put a firebase-app element and a firebase-auth element in the page.
  3. Create/edit firebase.json and polymer.json (see https://github.com/vivetech/polymer-firebase-test).
  4. Run polymer build.
  5. Run firebase serve.
  6. Open the local page (localhost:5000) in Chrome.

Browsers Affected

  • Chrome
  • Firefox
  • Safari 9
  • Safari 8
  • Safari 7
  • Edge
  • IE 11
  • IE 10
@tjmonsi
Copy link
Collaborator

tjmonsi commented Oct 11, 2017

@vivetech this is connected to #197 and #236

It is a polymer-cli problem.

It might get solved by Polymer/polymer-cli#878 if it gets pulled in polymer-cli

A work around is to load the firebase sdk itself in your index.html and remove the scripts from the polymerfire or create a gulp that builds the polymer but doesn't compile the firebase scripts in babel

I'll let this open until 878 is merged though

@Joel-hanson
Copy link

Joel-hanson commented Oct 20, 2017

related issue #236

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

3 participants