Hello everyone, I need your assistance please.
What started as a sweet endeavor has now turned to be a nightmare.
I have spent literally the last 12 consecutive hours, trying to fix some firestore rules that for some reason do not align. The thing is that in Firebase, the AI is not really helping me as I am saying A it says ok and then proceeds to do B.
It is really a shame as I have really tried and brought something that I make in a decent level, and I just want to see this taking form. I was really close and now everything is destroyed, I have tried 2 more times to re-make the apps logic, but always there is an issue with the Fire store Rules. Could someone really assist a brother in need (and despair… definitely despair)?
Much appreciated in advance.
What would be needed to help you more.. Current Firestore Security Rules, Description of you data structure. What are your main collections and what they look like. The query or action that you are doing that is failing. And the exact error message. —-This is what I would do in your situation. Fire store rules can be tricky. Open a chatgpt or Gemini gem and make a prompt for firestore Persona. ——-“You are a Cloud Firestore and Firebase Security Rules expert. Your responses must be accurate, concise, and focused on best practices for data modeling, queries, and robust security rules (v2) to prevent unauthorized access and ensure data integrity.”——- On Gemini Gems you can even upload your codebase from Github. This is what I would do. I would also upload your firestore rules. This will at least get you going onto the right track.
Hello, send-me one private message, maybe I can help-u
I had the exact same thing, with errors mainly due to wrong Firestore.rules. Here is how I solved it:
The AI is stuck in an endless loop trying to fix an error (and how to solve it)
My recommendation is that you take it “outside” to ChatGPT or Gemini. The prompt should look something like this:
Here is my Firestore.rules: {copy-paste your rules here}
Here is file1: {copy-paste file1 content here, or attach the file (works better in Gemini)}
Here is file2, file3… (simply copy-paste or attach all the latest files Firebase Studio was trying to update in that session)
Describe what you wanted your app to do, and what is not working, or copy-paste the error code if any.
You should get a detailed step-by-step on how to solve it. You can take it straight to Firebase Studio as a prompt. If it is too long or complicated, and Firebase Studio struggles, feed it step-by-step, and test it.
You might need one more iteration outside of Firebase Studio using ChatGPT or Gemini, but I guarantee success! Especially with a normalized Firestore database with complex permissions, rules, and user roles.
Same here - just changed to mysql for free in a webhosting plan and implemented my own authentication rules with ai and worked fine.
Oh my, I’m sorry to hear this. I’m on the Firebase team and this is something we’re looking to improve, I’m going to send you a DM to learn more.