Issue with firebase chat

Moderator: Support

Posts: 1
Joined: Sun Feb 07, 2021 7:07 pm

Issue with firebase chat

Post by chotchot »

Hi everyone,

I'm trying to build a chat app with firebase but I'm having issues with importing/using firebase, despite I did import the .js file as a Javascript file as pictured in this video ( This example works well...

The code below is launched when login button is pushed :

Code: Select all

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

this.window.firebase.auth().signInWithPopup(provider).then(function(result) {
    this.Apperyio.get("$rootScope").displayName = result.diplayName;
    alert("Error: " + JSON.stringify(error))

I get the error : "TypeError: this.window.firebase.auth is undefined"

The variable "window" is well defined btw.

Unfortuntately the video made by Appery to build a chat app with firebase, is too old so does not work anymore :

Thank you so much for your support

Serhii Kulibaba
Posts: 147
Joined: Tue Aug 27, 2013 1:47 pm

Re: Issue with firebase chat

Post by Serhii Kulibaba »


Do you run this code in the Ionic 4 application?

Could you please provide us more details on how you use it, where you see this error, etc?

Post Reply