[Bug]: Firestore connection configuration works wrong
Is there an existing issue for this?
- [X] I have searched the existing issues
Description
When i try to connect to firestore's non-default database, appsmith keep connecting to default database. because it seems not to use url options, I tested with wrong database url and appsmith success to connect to default firestore db.
I expect to connect to db which's database url pointing (https://DATABASE_NAME.firebaseio.com). https://firebase.google.com/docs/database/web/start
I think bug is in here. FirestorePlugin try to access to default firestore first. it should give using options priority
.map(options -> {
try {
return FirebaseApp.getInstance(projectId);
} catch (IllegalStateException e) {
return FirebaseApp.initializeApp(options, projectId);
}
})
https://github.com/appsmithorg/appsmith/blob/release/app/server/appsmith-plugins/firestorePlugin/src/main/java/com/external/plugins/FirestorePlugin.java
Steps To Reproduce
- Go to data.
- choose firestore
- try to connect to firestore with wrong database url.
- click test configuration
- successfully connects.
- put non default db url. in database url input.
- click test configuration
- still connects to default db
Public Sample App
No response
Environment
Production
Severity
High (Blocker to building or releasing)
Issue video log
No response
Version
self hosted - 1.5.2
is this issue open to contribution? I would like to take on this issue
Hi @HardikRathod123 yes this is open for contribution, you can check it out and let me know the approach for fixing this issue. During my research, I have found a couple of pointers that could be helpful for you:
- When we create firestore database, it creates a default database with free plan but for this issue, we would need upgraded plan in order to create non default database and test it
- This is the documentation for firestore java SDK https://firebaseopensource.com/projects/firebase/firebase-admin-java/
hello team , i would like to contribute to this ,is this issue still open for contribution ?
Hi @Nikhil-Nandagopal, @sneha122 , @carinanfonseca
I came across this issue and saw that it's labeled "Inviting Contribution". I'm a new contributor and excited to start contributing to Appsmith!
Could you please confirm if this issue is still open and if I can work on it?
Also, if you have any open backend/server-side issues that need contributions, I’d love to help! Please let me know if there’s anything suitable for me to work on. @contributor-support
Looking forward to your guidance. Thanks! 😊
Hi @AnweshPeddineni Thanks a lot for your interest in working on this! The issue is still open as per my knowledge, please check once on your end as well. If it still exists, you can go ahead and pick this up!
Hey @Nikhil-Nandagopal @sneha122 I want to work on this issue.
Please go ahead @YaxPrajapti
https://github.com/appsmithorg/appsmith/pull/41067 I made PR about This Issue.