Skip to content

[Bug]: Firestore connection configuration works wrong #38121

@gring2

Description

@gring2

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

Metadata

Metadata

Assignees

Labels

BugSomething isn't workingCommunity Reportedissues reported by community membersFirestoreIssues related to the firestore IntegrationHighThis issue blocks a user from building or impacts a lot of usersIntegrations ProductIssues related to a specific integrationInviting ContributionIssues that we would like contributions toNeeds TriagingNeeds attention from maintainers to triageProductionQuery & JS PodIssues related to the query & JS PodQuery Widgets & IDE PodAll issues related to Query, JS, Eval, Widgets & IDEWidgets & Accelerators PodIssues related to widgets & AcceleratorsWidgets ProductThis label groups issues related to widgets

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions