Help

`block release`CLI command fails with `The block could not be found` error

418 1
cancel
Showing results for 
Search instead for 
Did you mean: 
BillAyers
4 - Data Explorer
4 - Data Explorer

I have a custom block running locally and wanted to share it with someone else on the team.  Based on the docs, it sounds like running `block release` would be the next step.  Doing so produces this output:

 

Bundling... done
Uploading... Incomplete
Error: ❌ The block could not be found. Make sure your API key is correct and that you have access to the block.
Code: airtableApiBlockNotFound


I have some personal access tokens created with the `block:manage` scope, but it's not clear from the docs how or where the token would be used in a block extension.  The docs sort of hint at it being asked for during the init process, but `block init` doesn't seem to do that.  I also tried creating a new block from the Hello World example and then releasing it, and it had exactly the same error.

I know there's an almost identically-titled post from last year, but it doesn't help, as the blocks CLI command is up-to-date, and I have created a token with the right scope.  And the last bit about calling block set-api-key [APIKEY] wouldn't apply, since API keys are being phased out tomorrow.

...

Hmm.  Well, in desperation, and despite it making no sense (given the name of the CLI command), I tried running set-api-key with a PAT.  And that output something about saving it to a `.airtableblocksrc.json` file, which I've never seen mentioned anywhere in the docs.  Then I tried running `block release` again... and it worked, finally.

Airtable, fix your docs!  And your error messages!

1 Reply 1
Okeowo_Aderemi
4 - Data Explorer
4 - Data Explorer

I think i had something related to this, can you confirm that your base has been added to the token generated ?