Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
    Juan Manuel Romero Martin
    I am totally a newbie on firebase, and I am trying to create a simple apps where my data is organized in this way Companies/Users/Tasks. what is the right way to associate the FireAuthentication and the the User associated to the company? also only one user within the company is the one able to admin the company. Could anyone point me to the right way of doing it? THANKS in advance

    Yes. I am using a single trigger to fire multiple Node.js functions against Firebase Databse but also applies to Firestore. Quote=>

    Limitations and guarantees
    While developing your applications, keep in mind that Cloud Firestore triggers are currently in beta which may result in unexpected behavior.

    A few known limitations include:

    It may take up to 10 seconds for a function to be triggered after a change to Cloud Firestore data.
    As with all background functions, event ordering is not guaranteed. In addition, a single event may result in multiple Cloud Functions invocations, so for the highest quality ensure your functions are written to be idempotent.

    Kiran Mathew Mohan
    @GrahamDi Thanks a lot for the help. Another user helped me out with this query earlier.
    Edwin Rifa
    Hi. I´m having issues with login via firebase CLI on a windows pc.
    every time I type in the command firebase login --no-localhost I get and error.
    anyone with the same issue ?
    Aditya Dehal
    @EdwinSilvaDK Can you post the screenshot of the error?
    Edwin Rifa
    I don´t know how to post image here.
    but the issues was fixed
    Aditya Dehal
    glad it's fixed :)
    Steven Parker
    Ionic Firebase Chat is a sample chat widget powered by Firebase.
    Nicholas Vella
    Hello I have a question please, for http triggerred functions (functions.https.onRequest) is it a good practice to wrap everything in try/catch block? To make sure that a response is always returned no matter what?
    Edwin Rifa
    What is the best way to implement a pyramide date structure in firestore ?
    I trying to create aa pyramide structure, where I keep track of who inviterd who in my application.
    An example :
    If user1, invite two users, and these two users invite 5 other users, then user1 should know about these 5 new users + the ones user1 invited.

    Guideline for NoSQL database is to keep it as flat as possible ie. don't build deep tree / hierarchy data structures. Use data duplication if necessary to achieve this. Otherwise you will have to read in and traverse large data sets to find / process what you want.
    So I would suggest a data structure (in Firebase in my case but the concept is the same) such as below where the invitedUsers node contains a list of users who have invited other users. It is then simply a case of reading the node based on the specific user id that you are interested in and referencing the users that they have invited (if any). Then querying those users to see who they have invited (if any). This infers multiple database reads. The alternative is to read in the whole invitedUsers node and then process the retrieved data set in memory. You need to decide which is the most efficient way depending on the potential size of the invitedUsersnode.
    BTW: The bool true is there so as to allow a userId to be the key of a key/value pair ie. it is the minimal amount of data needed to create these pairs, it has no other meaning. Also, please ignore the fact that the same user appears to be invited by more than one person in the data below. This is real data from a chat app of mine. In your case a user would only ever be invited by one person.

    Hope this helps.

      "invitedUsers ": {       =>  (the main node)
        "0cSLt3Sa0FS26QIvOLbin6MFsL43": {
          "GUPYmmAg9UUlRLnW97jpMCAkEHE3": true,
          "GsyZxJ9MKNSN6UWxmkVLVa416df2": true,
          "J11342YmF2gFsfPKmdZbDUaYuNf2": true,
          "iSAwyU7bwKO8OBvFDr1DKYZjc5q1": true,
        "75eupSCFklYSk71FBFUfYoRuGgB2": {
          "BMxLHNemJXbmecHxWNRROhm4ou93": true,
          "xlKPdJKUAFTIrOHBTP5l9ZDz0CT2": true
        "BMxLHNemJXbmecHxWNRROhm4ou93": {
          "kblbVzEtkRZ9QREJdSKOqxVJCYg1": true
        "Dvbz8nEtALYJFd8J86vpnGq3p833": {
          "h28SbGLCjRWs1akl5WANXaBytut1": true,
          "kblbVzEtkRZ9QREJdSKOqxVJCYg1": true
        "E3l40SS20beqeIHouB0PtWjtlef1": {
          "kblbVzEtkRZ9QREJdSKOqxVJCYg1": true
        "GUPYmmAg9UUlRLnW97jpMCAkEHE3": {
          "kblbVzEtkRZ9QREJdSKOqxVJCYg1": true,
          "mB8z77RdAHepHp0LSsQzVxEWZlD3": true
    Hashara Kumarasinghe
    Can someone please tell me why this is paused on exception?
    And when its run snapshot hasnot data
    I am coding with flutter
    Thanks you
    Steve Caponigri
    Hi all, Firebase hosting question. When deploying, you get two different domains - and My current deploy shows those two sites differently, like the (Which is what I would prefer to give out) doesn't access some of the CSS flie, but the site is fine. Has anyone seen this before?
    For reference:
    Noah B Johnson
    I don't see a difference on my end
    Only visible issue is the google drive embed not being public, but that may be intentional...
    Steve Caponigri
    Yes, that is, hmm, I wonder why it shows up weird on my computer. Thanks!
    Kapil Ramkhiladi Singh
    hi i am using firebase for fcm message
    but when i send notification from web it give me error of mismatchsenderid can you give me any solution
    Charles N. John
    I am making an app, so I have a question. I have a CNN model for image classification. Is there a way where I can send the audio and do some processing (convert into an image) on firebase and then send that image to a CNN model (is it possible to store a model?) and get the prediction results on my app?
    Edwin Rifa
    @GrahamDi thansk for the replay! A very nice structure and a cleaver way to use key-value pair
    Lee Johnson
    I am working on an app whereby a user will create a record and attach an image to that record. My plan is to store the image in Firebase Storage and store the image URL with the associated record in Firestore. Occasionally the record and associated image will be created on the device without an internet connection. Although Firestore handles offline persistence well, I won't have the image URL to insert into the Firestore record until after it gets uploaded to Storage. What's the best way to handle this?
    Iago Barboza
    Hello, folks.
    Does anyone know how to use puppeteer on cloud functions ?
    @EdwinSilvaDK Np.
    I'm trying to run a firestore transaction from flutter when there is no internet access. The transaction just runs until it timesout and then my error handler kicks in. This could be maybe 5 mins or so (whatever the retry period is). My question - I thought Firestore transactions are suppose to FAIL immediately there is no internet access or the device is offline ? How can the retry period be set or how does everyone else handle this situation with firestore transactions so that the client is not left with what appears to be an infinite progress indicator ?

    Hello, everybody.
    I am doing firebase sample app at :
    and I tried auth.
    The problem is I can't login in firebase cli.
    This is my work flow:
    cd auth
    npm install -g firebase-tools
    firebase login(It didn't work, so I tried firebase login --no-localhost --debug because I am using vpn)
    the error is:
    ? Paste authorization code here: 4/rQEAGbXLOqv2J-_ra-vCWYM2tMMchdrZhuwbn-r9AYeDWltQTtP11Po
    [2019-09-23T17:08:26.072Z] >>> HTTP REQUEST POST
    code=4/rQEAGbXLOqv2J-_ra-vCWYM2tMMchdrZhuwbn-r9AYeDWltQTtP11Po,, client_secret=j9iVZfS8kkCEFUPaAeJ
    V0sAi, redirect_uri=urn:ietf:wg:oauth:2.0:oob, grant_type=authorization_code
    [2019-09-23T17:08:47.083Z] Token Fetch Error: FirebaseError: Server Error. connect ETIMEDOUT
    at Request._callback (C:\Users\admin\AppData\Roaming\npm\node_modules\firebase-tools\lib\api.js:30:31)
    at self.callback (C:\Users\admin\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\request\request.js:185:22)
    at Request.emit (events.js:198:13)
    at Request.EventEmitter.emit (domain.js:448:20)
    at Request.onRequestError (C:\Users\admin\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\request\request.js:881:8)
    at ClientRequest.emit (events.js:198:13)
    at ClientRequest.EventEmitter.emit (domain.js:448:20)
    at TLSSocket.socketErrorListener (_http_client.js:392:9)
    at TLSSocket.emit (events.js:198:13)
    at TLSSocket.EventEmitter.emit (domain.js:448:20)

    Error: Authentication Error: Your credentials are no longer valid. Please run firebase login --reauth

    For CI servers and headless environments, generate a new token with firebase login:ci

    Can anyone explain me why this happens and how to fix it?
    Thanks forward.

    Aubrey Quinn
    Hi all, I'm a complete noob can someone help me out? I don't know how push notification services work.
    @therealjohnsummer You probably need to look at using something like connectivity: ^0.4.4 package and managing internet access specifically within the app. That is next on my agenda for my app.
    @aubrey-fowler Push notifications come from the backend services. So if you have decided on Delphi then you need to work out what push notifications Delphi can provide. I don't know Delphi so can't help you there. I am happily using Firebase push notifications (FCM - Firebase Cloud Messaging) from a Firebase RTDB backend and using Node.js Firebase Cloud functions to send the push notifications to my Flutter app based on certain triggers. You want to use a React Native app, again I don't know React Native so can't help you. You could be in the wrong forum as there is not much traffic here. Anyway, hope this gives you a bit of insight.
    how to check if user has signed in before or it is the first time by the user ?
    please help...

    Hello Everyone,

    I am trying access DICOMweb Healthcare API, for that I have created one cloud function and in that I am trying to write response which is coming from API into the specified file by using fs.writeFile method.
    Here I am not able to find where file is getting created in Firebase or which is the default directory for Firebase? or do such operations are supported by Firebase?

    When I am trying to run same API via client-server approach in my local system, it is working fine.

    Anyone know the solution for the above. Your help will be greatly appreciated.


    Hey all, Can we use Phone number authentication without using Recaptcha ?
    hello, please is firebase good for really big webapps
    Im actually making an app in swift and i using firebase... yesterday i submitted to flightest and i recently downloaded the app in my iPhone, but i have a problem with firebase service, somebody know if i had to do something with permission o something else before i submitted in flightest???
    Hello guys, i use Custom Authentication System to logged in my user, is there a method to get the user is online or not ?
    Hi all, I am trying to develop a video sharing website for a project. The video sharing website doesn't need to host videos, I just need the ability to embed videos onto the website from youtube. I will also be integrating youtube api into the website for authentication purposes and there will be a variety of other features such as account profiles and filter features etc. If I wanted to develop this site, would the use of firebase for back end and flutter for front end be sufficient? Or would I need to use a framework like node in order to develop this type of site?
    Hey is it safe to use firebase for my website?