stencil-cli icon indicating copy to clipboard operation
stencil-cli copied to clipboard

stencil push error "cannot fetch a list of store channels"

Open steppinonland opened this issue 4 years ago • 1 comments

Expected behavior

stencil push to push changes

Actual behavior

error code 403

Steps to reproduce behavior

??

PS C:\Users\slandgraf\Documents\Webstores\stickershop-VANAACP> stencil push
Validating theme...
SCSS Parsing Started...
Template Parsing Started...
Language Files Parsing Started...
Building Theme Schema File...
Schema Translations Parsing Started...
Theme task Started...
ok -- Schema Translations Parsing Finished
ok -- Language Files Parsing Finished
ok -- Theme Schema Building Finished
ok -- SCSS Parsing Finished
ok -- Template Parsing Finished
ok -- Theme task Finished
Generating Manifest Started...
ok -- Zipping Files Finished
ok -- Theme Upload Finished
Processing [====================================================================================================] 100%; ETA: 0.0s    
ok -- Theme Processing Finished
? Would you like to apply your theme to your store? Yes


not ok -- Error: Could not fetch a list of the store channels: Request failed with status code 403

Please visit the troubleshooting page https://developer.bigcommerce.com/stencil-docs/deploying-a-theme/troubleshooting-theme-uploads.If this error persists, please visit https://github.com/bigcommerce/stencil-cli/issues and submit an issue.```

steppinonland avatar Apr 10 '21 00:04 steppinonland

Hey @steppinonland, try these steps:

  1. Make sure you're on the latest version of CLI (make sure stencil --version returns 3.2.0, or simply run npm i -g @bigcommerce/stencil-cli to upgrade to latest)
  2. Generate a new API key from the control panel, making sure to select "Stencil-CLI token" and "publish theme" as the permission level
  3. Re-run stencil init with your new key
  4. Try to upload again!

For context, this error may be related to using an old token that doesn't have access to a particular API (hence the 403 error), or it may relate to you not having some code in our latest update. It's possible simply doing step 1 will be enough.

bookernath avatar Apr 10 '21 02:04 bookernath