Firebase身份验证 - 登录错误

时间:2016-09-09 06:25:55

标签: javascript firebase firebase-authentication

我正在尝试使用Firebase身份验证使用以下代码登录:

 _signInWithPopup: function() {
     var auth = this.$.auth;
     var that = this;

     var provider = new firebase.auth.GoogleAuthProvider();

     app.auth().signInWithPopup(provider).then(function(result) {
         console.log(result);
         console.log("User has signed in");
     }).catch(function(error) {
         console.log(error);
     })
 },

它重定向到一个空白屏幕,然后我会看到所有这些错误。 谁看过这个吗?这里发生了什么事?该代码实际上是从文档中复制和粘贴的。

polymer-micro.html:1 Uncaught NotSupportedError: Failed to execute 'registerElement' on 'Document': Registration failed for type 'dom-module'. A type with that name is already registered.(anonymous function) @ polymer-micro.html:1(anonymous function) @ polymer-micro.html:1
polymer-micro.html:1 Uncaught TypeError: Polymer.Base._getExtendedPrototype is not a functiont @ polymer-micro.html:1window.Polymer @ polymer-micro.html:1(anonymous function) @ polymer.html:7(anonymous function) @ polymer.html:7
polymer-micro.html:1 Uncaught TypeError: this._desugarBehaviors is not a functionregisterCallback @ polymer-micro.html:1t @ polymer-micro.html:1window.Polymer @ polymer-micro.html:1(anonymous function) @ user-manager.html:5(anonymous function) @ user-manager.html:5
polymer-micro.html:1 Uncaught TypeError: this._desugarBehaviors is not a functionregisterCallback @ polymer-micro.html:1t @ polymer-micro.html:1window.Polymer @ polymer-micro.html:1(anonymous function) @ user-manager.html:9
polymer-micro.html:1 Uncaught TypeError: this._desugarBehaviors is not a functionregisterCallback @ polymer-micro.html:1t @ polymer-micro.html:1window.Polymer @ polymer-micro.html:1(anonymous function) @ user-manager.html:30
polymer.html:5 Uncaught TypeError: Cannot read property 'dashToCamelCase' of undefined_parseNodeAttributeAnnotation @ polymer.html:5_parseNodeAttributeAnnotations @ polymer.html:5_parseElementAnnotations @ polymer.html:5_parseNodeAnnotations @ polymer.html:5_parseChildNodesAnnotations @ polymer.html:5_parseElementAnnotations @ polymer.html:5_parseNodeAnnotations @ polymer.html:5parseAnnotations @ polymer.html:5_prepAnnotations @ my-app.html:45_finishRegisterFeatures @ my-app.html:47_ensureRegisterFinished @ my-app.html:15createdCallback @ my-app.html:15
polymer-micro.html:1 Uncaught TypeError: this._desugarBehaviors is not a functionregisterCallback @ polymer-micro.html:1t @ polymer-micro.html:1window.Polymer @ polymer-micro.html:1(anonymous function) @ polymerfire.html:59(anonymous function) @ polymerfire.html:59
polymer-micro.html:1 Uncaught TypeError: this._desugarBehaviors is not a functionregisterCallback @ polymer-micro.html:1t @ polymer-micro.html:1window.Polymer @ polymer-micro.html:1(anonymous function) @ polymerfire.html:80
polymerfire.html:84 Uncaught ReferenceError: UserManager is not defined(anonymous function) @ polymerfire.html:84
polymer.html:5 Uncaught TypeError: Cannot read property 'dashToCamelCase' of undefined_parseNodeAttributeAnnotation @ polymer.html:5_parseNodeAttributeAnnotations @ polymer.html:5_parseElementAnnotations @ polymer.html:5_parseNodeAnnotations @ polymer.html:5_parseChildNodesAnnotations @ polymer.html:5_parseElementAnnotations @ polymer.html:5_parseNodeAnnotations @ polymer.html:5parseAnnotations @ polymer.html:5_prepAnnotations @ my-app.html:45_finishRegisterFeatures @ my-app.html:47_ensureRegisterFinished @ my-app.html:15createdCallback @ my-app.html:15instanceTemplate @ my-app.html:29_stampTemplate @ my-app.html:29_initFeatures @ my-app.html:47createdCallback @ my-app.html:15
my-app.html:45 Uncaught TypeError: Cannot read property 'camelToDashCase' of undefined_addPropertyEffects @ my-app.html:45_prepBehavior @ my-app.html:47_prepFlattenedBehaviors @ my-app.html:15_prepBehaviors @ my-app.html:15_finishRegisterFeatures @ my-app.html:47_ensureRegisterFinished @ my-app.html:15createdCallback @ my-app.html:15instanceTemplate @ my-app.html:29_stampTemplate @ my-app.html:29_initFeatures @ my-app.html:47createdCallback @ my-app.html:15
polymer.html:5 Uncaught TypeError: Cannot read property 'dashToCamelCase' of undefined_parseNodeAttributeAnnotation @ polymer.html:5_parseNodeAttributeAnnotations @ polymer.html:5_parseElementAnnotations @ polymer.html:5_parseNodeAnnotations @ polymer.html:5_parseChildNodesAnnotations @ polymer.html:5_parseElementAnnotations @ polymer.html:5_parseNodeAnnotations @ polymer.html:5parseAnnotations @ polymer.html:5_prepAnnotations @ my-app.html:45_finishRegisterFeatures @ my-app.html:47_ensureRegisterFinished @ my-app.html:15createdCallback @ my-app.html:15instanceTemplate @ my-app.html:29_stampTemplate @ my-app.html:29_initFeatures @ my-app.html:47createdCallback @ my-app.html:15
my-app.html:45 Uncaught TypeError: Cannot read property 'camelToDashCase' of undefined_addPropertyEffects @ my-app.html:45_prepBehavior @ my-app.html:47_prepFlattenedBehaviors @ my-app.html:15_prepBehaviors @ my-app.html:15_finishRegisterFeatures @ my-app.html:47_ensureRegisterFinished @ my-app.html:15createdCallback @ my-app.html:15instanceTemplate @ my-app.html:29_stampTemplate @ my-app.html:29_initFeatures @ my-app.html:47createdCallback @ my-app.html:15
my-app.html:45 Uncaught TypeError: Cannot read property 'camelToDashCase' of undefined_addPropertyEffects @ my-app.html:45_prepBehavior @ my-app.html:47_prepFlattenedBehaviors @ my-app.html:15_prepBehaviors @ my-app.html:15_finishRegisterFeatures @ my-app.html:47_ensureRegisterFinished @ my-app.html:15createdCallback @ my-app.html:15instanceTemplate @ my-app.html:29_stampTemplate @ my-app.html:29_initFeatures @ my-app.html:47createdCallback @ my-app.html:15
my-app.html:45 Uncaught TypeError: Cannot read property 'camelToDashCase' of undefined_addPropertyEffects @ my-app.html:45_prepBehavior @ my-app.html:47_prepFlattenedBehaviors @ my-app.html:15_prepBehaviors @ my-app.html:15_finishRegisterFeatures @ my-app.html:47_ensureRegisterFinished @ my-app.html:15createdCallback @ my-app.html:15instanceTemplate @ my-app.html:29_stampTemplate @ my-app.html:29_initFeatures @ my-app.html:47createdCallback @ my-app.html:15
my-app.html:45 Uncaught TypeError: Cannot read property 'camelToDashCase' of undefined_addPropertyEffects @ my-app.html:45_prepBehavior @ my-app.html:47_prepFlattenedBehaviors @ my-app.html:15_prepBehaviors @ my-app.html:15_finishRegisterFeatures @ my-app.html:47_ensureRegisterFinished @ my-app.html:15createdCallback @ my-app.html:15instanceTemplate @ my-app.html:29_stampTemplate @ my-app.html:29_initFeatures @ my-app.html:47createdCallback @ my-app.html:15
polymer.html:5 Uncaught TypeError: Cannot read property 'dashToCamelCase' of undefined_parseNodeAttributeAnnotation @ polymer.html:5_parseNodeAttributeAnnotations @ polymer.html:5_parseElementAnnotations @ polymer.html:5_parseNodeAnnotations @ polymer.html:5_parseChildNodesAnnotations @ polymer.html:5_parseElementAnnotations @ polymer.html:5_parseNodeAnnotations @ polymer.html:5parseAnnotations @ polymer.html:5_prepAnnotations @ my-app.html:45_finishRegisterFeatures @ my-app.html:47_ensureRegisterFinished @ my-app.html:15createdCallback @ my-app.html:15instanceTemplate @ my-app.html:29_stampTemplate @ my-app.html:29_initFeatures @ my-app.html:47createdCallback @ my-app.html:15
my-app.html:45 Uncaught TypeError: Cannot read property 'camelToDashCase' of undefined_addPropertyEffects @ my-app.html:45_prepBehavior @ my-app.html:47_prepFlattenedBehaviors @ my-app.html:15_prepBehaviors @ my-app.html:15_finishRegisterFeatures @ my-app.html:47_ensureRegisterFinished @ my-app.html:15createdCallback @ my-app.html:15instanceTemplate @ my-app.html:29_stampTemplate @ my-app.html:29_initFeatures @ my-app.html:47createdCallback @ my-app.html:15
my-app.html:45 Uncaught TypeError: Cannot read property 'length' of undefined_marshalIdNodes @ my-app.html:45_marshalAnnotationReferences @ my-app.html:45_initFeatures @ my-app.html:47createdCallback @ my-app.html:15
polymer-micro.html:1 Uncaught TypeError: this._desugarBehaviors is not a functionregisterCallback @ polymer-micro.html:1t @ polymer-micro.html:1window.Polymer @ polymer-micro.html:1(anonymous function) @ iframe?apiKey=AIzaSyBPlIeqSbYiQ5cp1dV89OoDKrns605WyPI&appName=test&v=3.3.1&usegapi=1&jsh=m%3B%2F_%2…:59(anonymous function) @ iframe?apiKey=AIzaSyBPlIeqSbYiQ5cp1dV89OoDKrns605WyPI&appName=test&v=3.3.1&usegapi=1&jsh=m%3B%2F_%2…:59
polymer-micro.html:1 Uncaught TypeError: this._desugarBehaviors is not a functionregisterCallback @ polymer-micro.html:1t @ polymer-micro.html:1window.Polymer @ polymer-micro.html:1(anonymous function) @ iframe?apiKey=AIzaSyBPlIeqSbYiQ5cp1dV89OoDKrns605WyPI&appName=test&v=3.3.1&usegapi=1&jsh=m%3B%2F_%2…:80
iframe?apiKey=AIzaSyBPlIeqSbYiQ5cp1dV89OoDKrns605WyPI&appName=test&v=3.3.1&usegapi=1&jsh=m%3B%2F_%2…:84 Uncaught ReferenceError: UserManager is not defined(anonymous function) @ iframe?apiKey=AIzaSyBPlIeqSbYiQ5cp1dV89OoDKrns605WyPI&appName=test&v=3.3.1&usegapi=1&jsh=m%3B%2F_%2…:84
user-manager.html:259 R {code: "auth/network-request-failed", message: "A network error (such as timeout, interrupted connection or unreachable host) has occurred."}
firebase.js:167 Uncaught Error: Network Error(anonymous function) @ firebase.js:167

0 个答案:

没有答案