Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Firestore connection configuration works wrong #38121

Open
1 task done
gring2 opened this issue Dec 12, 2024 · 2 comments
Open
1 task done

[Bug]: Firestore connection configuration works wrong #38121

gring2 opened this issue Dec 12, 2024 · 2 comments
Assignees
Labels
Bug Something isn't working Community Reported issues reported by community members Firestore Issues related to the firestore Integration High This issue blocks a user from building or impacts a lot of users Integrations Product Issues related to a specific integration Inviting Contribution Issues that we would like contributions to Needs Triaging Needs attention from maintainers to triage Production Query & JS Pod Issues related to the query & JS Pod

Comments

@gring2
Copy link

gring2 commented Dec 12, 2024

Is there an existing issue for this?

  • 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

스크린샷 2024-12-12 오후 3 19 32

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

  1. Go to data.
  2. choose firestore
  3. try to connect to firestore with wrong database url.
  4. click test configuration
  5. successfully connects.
  6. put non default db url. in database url input.
  7. click test configuration
  8. 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

@gring2 gring2 added Bug Something isn't working Needs Triaging Needs attention from maintainers to triage labels Dec 12, 2024
@Nikhil-Nandagopal Nikhil-Nandagopal added Community Reported issues reported by community members High This issue blocks a user from building or impacts a lot of users Production Firestore Issues related to the firestore Integration Inviting Contribution Issues that we would like contributions to labels Dec 12, 2024
@github-actions github-actions bot added Integrations Product Issues related to a specific integration Query & JS Pod Issues related to the query & JS Pod labels Dec 12, 2024
@HardikRathod123
Copy link

is this issue open to contribution? I would like to take on this issue

@sneha122
Copy link
Contributor

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:

  1. 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
  2. This is the documentation for firestore java SDK https://firebaseopensource.com/projects/firebase/firebase-admin-java/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Community Reported issues reported by community members Firestore Issues related to the firestore Integration High This issue blocks a user from building or impacts a lot of users Integrations Product Issues related to a specific integration Inviting Contribution Issues that we would like contributions to Needs Triaging Needs attention from maintainers to triage Production Query & JS Pod Issues related to the query & JS Pod
Projects
None yet
Development

No branches or pull requests

7 participants