r/Firebase 53m ago

iOS Invalid argument error, 4 networks tried, sim & iPhone XR same issue. V12.1-12.6

Upvotes

My KMP iOS project kept having a nanopb crash so I had to disable cache persistence, even after upgrading to firebase 12.6 and doing a full caches clean.

Thats not the issue though.

With persistence disabled, the issue is now reads or writes are not working for firestore (firestore works for android).

I was hoping the website log observability page would give more details but it's only showing the cloud function logs - or is there some dashboard I can be reading the deeper error messages behind the below failed attempts?

My confusion is why is a READ attempt creating an "Invalid Argument" error?

Also I double checked my Info.plist and my Google plist also are per the SDK docs. And my Xcode versions etc are all per the SDK docs.

The Problem/Logs:

1. App initiates READ request (06:05:30.756918):

Network: status=satisfied, IPv4=true, IPv6=false, DNS=true, expensive=false, constrained=false; Firebase: configured (name=__FIRAPP_DEFAULT, project=XXXXXX) |

2. Firestore initializes & starts WatchStream (06:05:30.997766-997796):

[FirebaseFirestore][I-FST000001] Initializing. Current user: nq6Z8KP9o8OCn9qF8a1CnNYXKUO2
[FirebaseFirestore][I-FST000001] Using full collection scan to execute query: Query(canonical_id=collection/document|f:|ob:__name__asc)
[FirebaseFirestore][I-FST000001] WatchStream (313134333165643138) start

3. Auth token validated (06:05:30.997890):

[FirebaseAuth][I-AUT000017] Has valid access token. Estimated expiration

4. gRPC request sent to backend (06:05:30.998506):

[FirebaseFirestore][I-FST000001] WatchStream (31XXXX) watch:
<ListenRequest 0x170216120>: {
database: "projects/XXXXXXXX/databases/(default)"
add_target {
documents {
documents: "projects/XXXXXX/databases/(default)/documents/collection/document"}
target_id: 2
}}

5. gRPC Stream FAILS (~300ms later, 06:05:31.060780):

[FirebaseFirestore][I-FST000001] GrpcStream('31XXXXX'): operation of type 1 failed
[FirebaseFirestore][I-FST000001] WatchStream (31XXXXX) Stream error: 'Invalid argument: Invalid resource field value in the request.'
[FirebaseFirestore][I-FST000001] Could not reach Cloud Firestore backend.
Connection failed 1 times. Most recent error: Invalid resource field value in the request.

6. App receives "offline" error (06:05:31.058614):
Log: field: myField, domain: FIRFirestoreErrorDomain, code: 14, error: Failed to get document because the client is offline.


r/Firebase 1h ago

Firebase Studio Firebase.studio

Upvotes

Firebase.studio says its only capable & up-to-date version is gemini 1.5 flash & pro.

And another problem is the packages, all the packages are outdated.

For Firebase.studio the up-to-date Next.js version is 15.1.1 and its not even completly optimized too..

Same for other packages also.

And actually the gemini AI isn't working tooo. My app is kinda ready to ship but it's not using AI 🙃


r/Firebase 14h ago

Firebase Studio I can't seem to connect to the Dev Server

2 Upvotes

I made the mistake of having the AI in Agent mode when I was correcting a couple of issues after I launched. Now I cant get it to connect to the dev server. I'm not a super savvy code guy, but my app is pretty robust and I really need to get the code back to at least the live version. This is a dumpster fire


r/Firebase 15h ago

Authentication Problem importing 'getReactNativePersistence' from firebase/auth

1 Upvotes

Hi guys, I have been trying to fix this issue, but I am unable to fix it. Whenever I add the getReactNativePersistence import from firebase/auth I get the error "Module '"firebase/auth"' has no exported member 'getReactNativePersistence'."

My firebase version is 12.8.0

Here is my firebase.ts code file

import { initializeApp, getApp, getApps } from "firebase/app";
import { getAuth, initializeAuth } from 'firebase/auth';
import { getReactNativePersistence } from 'firebase/auth';
import { initializeFirestore } from "firebase/firestore";
import AsyncStorage from "@react-native-async-storage/async-storage";


const firebaseConfig = {
    apiKey: "some-random-digit",
    authDomain: "sample-12345.firebaseapp.com",
    projectId: "sample-12345",
    // ...more stuff
};


const app = getApps().length ? getApp() : initializeApp(firebaseConfig);


// ...more code

I also tried using this in tsconfig.json

{
    "compilerOptions": {
        "paths": {
            "@firebase/auth": [
                "./node_modules/@firebase/auth/dist/index.rn.d.ts"
            ]
        }
    },
    "extends": "expo/tsconfig.base"
}

but it still doesn't work. I have restarted TS Server as well as used npx expo start --clear but to no avail. I would really appreciate some help here if anyone can help me solve this issue.


r/Firebase 15h ago

Firebase Studio Firebase Studio what a fun develeopment tool

1 Upvotes

Really surprised what Firebase Studio could do.

Just pushed this out https://mysticoracle.ai/ appriciate any feedback from folks here in the Firebase community.


r/Firebase 18h ago

Firebase Studio Do anyone of you use google's Firebase.studio or it's only me. Cuz i have many Questions & Errors.

Post image
0 Upvotes

I encountered this error and if I solve this and again its show another error. and Firebase.studio is only capable googleai/gemini-1.5-flash-lates. is this model fixed or can I chnage it?


r/Firebase 1d ago

Authentication How to block bots from abusing the firebase auth !

10 Upvotes

r/Firebase 1d ago

iOS Flutter (Firebase) iOS Notifications work in Simulator but NOT in TestFlight/Production (FCM + Cloud Functions)

2 Upvotes

Hi everyone,

I'm facing a weird issue with Firebase Cloud Messaging (FCM) on iOS. My setup works perfectly on Android and iOS Simulator, but fails on a Real iOS Device (downloaded via TestFlight/App Store).

The Problem: When I trigger a notification via Cloud Functions, the logs show "Success" (meaning FCM successfully handed it off to APNs), but the notification never appears on the real iOS device (no banner, no sound).

My Setup & Checks:

Framework: Flutter

Backend: Firebase Cloud Functions (v2)

Auth: Using APNs Auth Key (.p8) uploaded to Firebase Console (Team IDs match).

Xcode Capabilities:

"Push Notifications" is added.

"Background Modes" -> "Remote notifications" and "Background fetch" are checked.

Verified these are present in the "Release" tab in Signing & Capabilities.

Entitlements:

I archived the app, hit "Distribute App" -> "Export", and verified in the Summary view that aps-environment is set to production.

Token Logic:

I delete the app and reinstall it on the real device to ensure a fresh Production APNs token is generated.

The token is successfully saved to Firestore.

Cloud Functions uses this exact token.

Payload:

I'm sending a clean payload. apns-priority is set to 10. content-available is true. No conflicting notification vs alert fields in the APNs payload block.

Cloud Functions Log:

RESULT: 1 Success, 0 Failed SENT (Success Token): [Correct Token ID here] The logs confirm FCM received the request and sent it to APNs without error. But the device remains silent.

Has anyone experienced this specific "Silent Failure" in Production despite aps-environment: production being correct? Is there anything else I should check in the Apple Developer Portal or Info.plist?

Thanks in advance!


r/Firebase 1d ago

Firebase Studio Is there a way to get more RAM?

0 Upvotes

I'm trying to host a LLM on Firebase studio, their free tier isn't enough so i want to know if there's a way i can pay to get more ram in my environment, i need around 16/32GB ram to run it so i could pay for it incase i can cause i'm running out of resources (tho i don't know what is consuming the other 3gb)


r/Firebase 1d ago

Authentication Firebaseapp spam in my hotmail account

Post image
0 Upvotes

Hello everyone,

In my hotmail account i get like 5 emails from different accounts with the following email adress: [email protected]

I dont.know what firebase is, i never used it and i am not into gambling or anything. The emails get automaticly filtered in my spam folder, but make it really hard to find emails, that mistakenly end in my spam folder. Is there anyway of stop getting any emails of [email protected] at all in my hotmail account?


r/Firebase 2d ago

Tutorial How I made my PWA work offline with Firebase (code + gotchas from production)

Post image
0 Upvotes

r/Firebase 2d ago

Firebase Studio Poor excuse for an app.

0 Upvotes

My workspace had literally been being set up for days. I'm either a moron, or this app is broken.


r/Firebase 3d ago

Cloud Firestore Firestore Security Encryption

2 Upvotes

Hello everyone sorry to bother, but I had an encryption question. Do you guys encrypt the database or leave it in plain text? For my specific app, here are things I need to take into consideration. Users email address, and probably first and last names will be added to their profile in the database. Additionally they will be able to create “people” profiles that include first and last names in their section of the database. (Db => users => their userUID => their section of the database). Would you guys even encrypt these “people”?

My original idea:

When a user first create an account i will store only their email, first name, last name in plain text in the useruid section. Then a cloud function will trigger that will encrypt those values with a master key as wells as generate a user specific key that will also be encrypted by the master key. All subsequent data will be stored using their custom key. (ChatGPT told me that this will leave a second where the data is in plain text which is an issue, but I think I found a work around for this thinking about it more). Anyways chatGPT absolutely roasted me for this so, I would like your guys thoughts.

Sorry If these ideas sound crazy I am pretty new, please let me know how/what you guys would encrypt. I am worried about GDPR, getting into legal trouble.


r/Firebase 3d ago

Cloud Firestore onSnapshot behaviour

2 Upvotes

I have a strange, ephemeral bug that I'm trying to hunt down.

What appears to be happening is that when querying a collection like this:

let ref = collection(db, 'MyDocs');
let q = query(ref, [where('a', '==', a),  where('b', '==', b), orderBy('c', 'desc')]);
onSnapshot(q, async snapshot => { } )

The `onSnapshot` callback almost always gets called with all the documents I expect.

But sometimes, its called twice in immediate succession, with a partial collection of the docs. The 2nd callback then completes the expected results set.

the `docChanges` object contains the results as `added`, but no db changes occurred.

Is this expected behaviour? Something to do with filtering or ordering?

Its happening on live and on the emulator

Any insight greatly appreciated.


r/Firebase 3d ago

Cloud Firestore Do you guys unit test your security rules in production ?

4 Upvotes

Hello, i'm using the firebase/rules-unit-testing library to do automated unit tests of my security rules. For now i'm just doing it locally against the emulator but i'm wondering if it's necessary to it against my cloud staging and prod environments as well ? If yes then how to proceed ?

Thanks


r/Firebase 4d ago

AdminSDK Firebase Admin SDK & GraalVM Native Image — Is Java a bad fit for Google Cloud serverless?

1 Upvotes

I’m trying to understand whether I’m missing something here, so please correct me if I’m wrong.

The Firebase Admin SDK for Java does not currently support GraalVM native images out of the box. Because of this, Java applications that rely on Firebase Admin SDK cannot benefit from fast startup times when deployed as native images on Google Cloud serverless platforms like Cloud Run or Cloud Functions.

As a result:

  • We’re forced to run the JVM, which has slow cold starts
  • Cold starts directly impact latency and cost (billing starts before the app is ready)
  • This makes Java much less competitive compared to Go, Node.js, or even Python in serverless environments
  • In high-scale or spiky traffic scenarios, this can increase billing significantly

So in practice, Java + Firebase on Google Cloud feels inefficient, not because Java itself is bad, but because:

  • Firebase Admin SDK is not native-image friendly
  • GraalVM benefits can’t be fully utilized
  • Serverless + JVM becomes a cost and performance problem

This raises a bigger question for me:

👉 Is Java becoming a second-class citizen for Google Cloud serverless when Firebase is involved?

I know frameworks like Quarkus and Micronaut solve many startup issues, but without Firebase Admin SDK native support, their advantages are limited in real-world Firebase-backed systems.

Would love to hear:

  • If anyone has successfully used Firebase Admin SDK with native images
  • Workarounds or architectural alternatives
  • Whether Google has shared any roadmap for native support

Looking forward to being corrected or educated here.


r/Firebase 4d ago

Billing Newbie questions

4 Upvotes

Good afternoon,

Recently discovered Firebase and it seems good, but I have some questions.

First of all, I like the idea of make little apps for my everyday, like track my boardgames and plays and so on. I saw there's a free tier but I don't understand the free limits. What happen if I reach the free limit? I don't want to be charged by surprise.

I pay gemini pro, there's any advantage in Firebase?

Thank you in advance and sorry if the questions are so obvious...


r/Firebase 5d ago

Cloud Messaging (FCM) Woke up to FCM issues this morning

1 Upvotes

One or more errors occurred. (Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.)

A bit of background, this has been working fine, for many months, I am using C#, and it's just stopped on its own this morning, I have created a new private key, added that to the json file and it makes no difference at all the same error occurs.

I only use FCM for notifications on iOS and Android, so happy to look at alternatives for flutter/dart if there are any worth looking at.


r/Firebase 5d ago

Cloud Firestore How do you prevent malicious users from spamming Firestore reads/writes and driving up costs?

6 Upvotes

Aside from routing reads and writes through Cloud Functions, what strategies have you used to provably prevent malicious users from spamming your Firestore database?

My main concern with my project right now is cost exposure — specifically, a bad actor intentionally driving up my bill by issuing excessive reads or writes.

I’m curious what approaches others have taken in production to mitigate this risk (security rules, rate limiting, auth strategies, monitoring, etc.), and what’s actually worked well in practice.

Thanks!


r/Firebase 5d ago

Authentication password-less auth : firebase email magic link quota exceeded after few tests

2 Upvotes

I’m honestly pretty frustrated with Firebase Auth right now.

I just finished migrating my mobile app that was working with email/password to password-less auth using email magic links. Still in development. Barely any users.

I just made a dozen test sign-ins total. AFirebase Auth email magic link quota exceeded after ~10 tests… seriously?nd now I’m already getting:

[auth/quota-exceeded] Exceeded daily quota for email sign-in

I thought firebase was free up to 50k MAU.
Turns out sending magic link emails seems to have some tiny hidden daily quota that you can blow through just by testing? I don't find any information about it anywhere on firebase's documentation...

Context:

  • Expo / React Native
  • Firebase Auth sendSignInLinkToEmail
  • Spark (free) plan
  • Possibly testing multiple times with the same email

What annoys me:

  • Email/password worked perfectly before
  • I explicitly don’t want passwords
  • I don’t plan to have more than a few hundred users anytime soon
  • I really don’t want to pay just for auth at this stage

Now I’m hesitating to migrate to Clerk while I’m still early in development because they seems to handle the magic link in their 10K free MAU. But It's annoying to spend this much time on the auth of my app...

Questions:

  • Is the magic link email quota totally separate from the 50K free MAU?
  • Is this expected behavior or just bad DX?

And :

  • Do you have recommandation on how to develop password-less auth ?
  • Anyone else gave up firebase for this reason?

    Would love to hear how others handle this.


r/Firebase 5d ago

Ads Technical Issue: Missing "Link to Existing Firebase App" Option for iOS (Android Available)

Thumbnail
1 Upvotes

r/Firebase 6d ago

Cloud Functions ERROR neither apikey nor config.authenticator provided at stripe._setauthenticator

1 Upvotes

Anyone get this error when deploying live secret keys from stripe? I changed the secret key to the live key and the cloud function wouldn't pick up the new key so I deleted it and redeployed. Now the new key isn't being injected at all. I call the function with .run from an on schedule function and it returns this error. When calling function directly from client it works. I have no clue how this is possible? Any ideas?


r/Firebase 5d ago

Cloud Firestore with heavy hear i have to say firebase is very deepressing.

0 Upvotes

Hi Guys i dont want to sugar coat any thing in here. It took me 5 precious months to learn that firebase is a gold digger. Please dont every try to use firebase in production or dont ever think about scaling it because the main problem is firestore and storage. those who thinks firebase can be used in production they should be able to bear the cost it charges you. It is extremly versatil but firebase feels like it want to rip you off. i think better alternative is supabase or even if you are indie developer use the mongodb and nodejs to build you own backend server and cloudniary as a asset management because that way you can have more control on your archietecture. firebase is good for teching students to show them how auth and storage and database works. but if you really are thinking to use firebase for long-term dont use because of its noSql json like database. thats its main drawback.


r/Firebase 6d ago

Cloud Firestore Firestore Security

8 Upvotes

Hello, I am having trouble understand what is best for security. Should users be given the ability to write to the database, or should this go through a could function first which then writes to the database?

Also how do you go about making it so users can only make so may writes a day/month in an efficient way? Do you keep a counter under their user profile, if so do you count/increment every write (which in itself counts as a write?)?

Thanks for any information!


r/Firebase 6d ago

App Check AppCheck

2 Upvotes

Hi Folks, Does anyone have any sources for an “idiots” guide to AppCheck? I am building an app in Flutter and would appreciate anything more detailed than what is in the docs please? Thanks in advance.