[SOLVED] Setting up Moralis Stream firebase extension

Hi,

When following the steps from this page https://docs.moralis.io/docs/web3-firebase-streams, the CLI will ask for the API Key:

Moralis API Key: The API key that is retrievable from the Moralis Admin Panel.

If I copy the App Key from the stream admin dashboard, I rececive the following error:

✖ Installing your extension instance. This usually takes 3 to 5 minutes...

Error: HTTP Error: 400, Secret ID `[REDACTED]` is invalid, must be of form `projects/*/secrets/*/versions/*`

So I assumed it wanted a Google secret manager resource ID, so I’ve created on but when I do so, I then get the following:

? Enter a value for Moralis API Key: projects/[redacted]/secrets/moralis-stream-indexer/versions/1
⚠  The app ID must be retrieved from the Moralis Admin Panel.

Any ideas on how to solve this issue ?

Have you followed the prerequisite tutorial for setting up your Firebase project? Are you using the same Moralis API key you configured previously?

Yes I did all the steps, the 400 error seems to be coming from a backend endpoint. Any Moralis dev could confirm that this is something on their end ?

Can you visit this link to verify if correct secret is stored on the firebase secrets. There should not be any spaces in the secret. If there is something wrong with the secret, you can delete and try installing the extension again.
https://console.cloud.google.com/security/secret-manager

1 Like

So there was a secret there, which I created after seeing the following CLI error:

? Enter a value for Moralis API Key: 4324

✖ Installing your extension instance. This usually takes 3 to 5 minutes...

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

The issue is, the CLI is asking for Moralis secret and does not accept anything else (there is a regex that check for the proper format), when I pass in a Moralis secret then I get the above error

Then I tried to create a secret and passing the ressource ID to the CLI, but it doesn’t accept it (because of the regex validation)

I tried reinstalling the extension now as per this tutorial and I am able to install and deploy it without any errors.

Maybe try creating a new local project directory and install using it.

I did numerous tries and alway get the same error.

Do you know what version of the extension you are using ? The prompts for me are different that the one showed in the video. For instance there isn’t the step to select the secret manager, It directly asks for the Moralis API key.

I tried with the initial version 0.1.10. I did not run any extension update.

You mean you don’t see this step?

Yes, here is the whole output

(Using a dummy key here)

I’ve updated firebase-tool to a more recent version and now the prompt matches the one from the tutorials.

Thanks for the help

1 Like

Did it work after updating ?

I have not yet finalised the installation. I’ll complete it shortly and update this thread. Thanks John

It’s now working. Thanks for the support

1 Like