firestore-typesense-search: Getting HTTP 400 error when trying to enable the Firebase extension through CLI

Description

I am using the Firebase CLI to try to enable the extension for a Firebase project. Major note is that the last few times I did this it worked fine, so this seems to be a new issue. I think it may be related to this change: https://github.com/typesense/firestore-typesense-search/commit/44c5b37ce84ea2573cc40419f0e414865bbc4544

The TYPESENSE_API_KEY parameter appears to be the issue. Previously I had this set as the admin API key, which used to work. Now, when I try to enable the extension, I get an error related to secrets manager, which seems to be saying I have formatted it wrong. Specifically it says it should be formatted like projects/*/secrets/*/versions/* instead of just the API key, but I am not sure exactly how to format my API key like that (I am not sure which each of the asterisks in this case should be)

Steps to reproduce

Set up parameters file Run Firebase command to enable extension

firebase ext:install typesense/firestore-typesense-search --project=projectId --params=params.env --force

Expected Behavior

The extension will enabled for my Firebase project

Actual Behavior

I receive a HTTP 400 error:

Error: HTTP Error: 400, Secret ID 123.... is invalid, must be of form projects/*/secrets/*/versions/*

Metadata

Typesense Version: v0.23.0.rc27

OS: MacOS

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 18 (4 by maintainers)

Most upvoted comments

@PMLS3 This issue is referencing an HTTP 400 error, when installing this extension via the Firebase CLI.

Your HTTP 404 error is one that comes from Typesense and is unrelated to this issue. You’re seeing that error most likely because you need to setup a collection in Typesense first - the extension does not create the Typesense collection for you. See Step 3 here. If that’s not the issue, and you do have a collection setup in Typesense, could you open a separate issue?

@jon-flowers Could you try installing via the Firebase web console? It did ask me to provision a new secret during installation and I just had to paste the Typesense API key and click on “Create Secret” in the UI.

@dackers86 Any thoughts on how to do this via the CLI?