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

Stencil Push isn't working

Open leonperez1870 opened this issue 7 years ago • 32 comments

I am trying to push some work that I did to a cornerstone theme. Everything works locally and bundles fine, but when I try to upload manually or through the terminal, it fails.

stencil push _http_outgoing.js:487 throw new Error('"value" required in setHeader("' + name + '", value)'); ^

Error: "value" required in setHeader("x-auth-client", value) at validateHeader (_http_outgoing.js:487:11) at ClientRequest.setHeader (_http_outgoing.js:496:3) at new ClientRequest (_http_client.js:171:14) at Object.request (http.js:39:10) at Object.request (https.js:239:15) at internals.Client.request (/usr/local/lib/node_modules/@bigcommerce/stencil-cli/node_modules/wreck/lib/index.js:178:24) at internals.Client._shortcut (/usr/local/lib/node_modules/@bigcommerce/stencil-cli/node_modules/wreck/lib/index.js:579:16) at internals.Client._shortcutWrap (/usr/local/lib/node_modules/@bigcommerce/stencil-cli/node_modules/wreck/lib/index.js:556:17) at internals.Client.get (/usr/local/lib/node_modules/@bigcommerce/stencil-cli/node_modules/wreck/lib/index.js:521:17) at Object.getThemes (/usr/local/lib/node_modules/@bigcommerce/stencil-cli/lib/theme-api-client.js:95:11)

I passed it on to another guy on my team and same issue. Everything ran fine locally but his error was as follows:

Processing [====== ] 12%; ETA: 9.6snot ok -- JobCompletionStatusCheckError: Job Failed Please try again. If this error persists, please visit https://github.com/bigcommerce/stencil-cli/issues and submit an issue.

So here I am...

leonperez1870 avatar Sep 21 '17 18:09 leonperez1870

Can you make sure that your clientId is set in .stencil file? if is not, re-run stencil init and enter your client id

mcampa avatar Sep 21 '17 18:09 mcampa

For some reason, it's only letting me use the Legacy API so I am using "usermame": and "token": in the .stencil file

leonperez1870 avatar Sep 21 '17 18:09 leonperez1870

stencil push only works with oauth tokens. You'll need to create oath credentials in your control panel.

mcampa avatar Sep 21 '17 18:09 mcampa

Even still. When I bundled and uploaded manually it didn't work...

leonperez1870 avatar Sep 21 '17 18:09 leonperez1870

There might be an issue in your bundle that is caught server side and not by stencil-cli. Do you see any errors after you upload it?

mcampa avatar Sep 21 '17 18:09 mcampa

Uploading the theme manually works, but when it is processing the theme I receive "There was a problem processing your theme"

leonperez1870 avatar Sep 21 '17 18:09 leonperez1870

screen shot 2017-09-21 at 2 39 49 pm

leonperez1870 avatar Sep 21 '17 19:09 leonperez1870

screen shot 2017-09-22 at 9 16 33 am

leonperez1870 avatar Sep 22 '17 13:09 leonperez1870

Can you try to push a clean copy of Cornerstone to see if this is an issue with the store or your theme?

mcampa avatar Sep 22 '17 19:09 mcampa

screen shot 2017-09-25 at 9 45 48 am

leonperez1870 avatar Sep 25 '17 13:09 leonperez1870

It works with a clean version. Is there a log I can look at to see where the issue is?

leonperez1870 avatar Sep 25 '17 13:09 leonperez1870

@mcampa I somehow managed to push the theme to the server.

The way it worked: I removed all the image files and did stencil push leaving all the html and css I edited intact. It uploaded with no problems. I dragged one picture to /img/ and it worked with no problems. I dragged two pictures to /img/ and it crashed. I had to add .png images one by one for it to work.

leonperez1870 avatar Sep 25 '17 16:09 leonperez1870

That is weird. How big are the images?

mcampa avatar Sep 25 '17 18:09 mcampa

The biggest one was 5.1mb

leonperez1870 avatar Sep 26 '17 18:09 leonperez1870

@leonperez1870 there's a 50mb limit that i'm guessing you reached with the images. there was a similar issue closed here: https://github.com/bigcommerce/stencil-cli/issues/344. we have an internal ticket to fix error message here: https://jira.bigcommerce.com/browse/STENCIL-3959

mjschock avatar Oct 12 '17 20:10 mjschock

3 images did not equate to 50mb. They are 9,5,3 respectively.

leonperez1870 avatar Oct 17 '17 20:10 leonperez1870

@leonperez1870 hmmm... if you run stencil bundle for the theme which doesn't upload successfully, how big is the zip? that is, the 50mb limit is not on the images alone but the theme in it's entirety.

mjschock avatar Oct 17 '17 22:10 mjschock

@mjschock Lol 24.4mb

leonperez1870 avatar Oct 19 '17 14:10 leonperez1870

Btw the theme uploads fine now somehow. After I managed to upload the theme by placing the images one by one in the img folder, I added 3 more images at the same time and everything seems to work dandy.

leonperez1870 avatar Oct 19 '17 14:10 leonperez1870

I guess the issue was weird image file name rather than file size.

jbruni avatar Nov 03 '17 09:11 jbruni

screen shot 2017-11-03 at 4 17 51 pm @jbruni What is wrong with using these file names?

leonperez1870 avatar Nov 03 '17 20:11 leonperez1870

Literally that's what I uploaded

leonperez1870 avatar Nov 03 '17 20:11 leonperez1870

➜  cornerstone git:(version-2.3.1) ✗ stencil push
Validating theme...
Running ESLint...
SCSS Parsing Started...
Template Parsing Started...
Language Files Parsing Started...
Building Theme Schema File...
Theme task Started...
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 -- Manifest Generation Finished
ok -- Zipping Files Finished
not ok -- ThemeUploadError: Server Error
Please try again. If this error persists, please visit https://github.com/bigcommerce/stencil-cli/issues and submit an issue.

abrambailey avatar Aug 15 '18 15:08 abrambailey

I get the same issue. Total theme size is 28.8 mb. We have 7 large international sites that deploy via a script and it's failing both using the script which does a stencil push and manually doing a stencil push It's putting a much bigger strain on our deployment process, especially approaching the holidays. Some times it works. For example it failed on US, CA, but worked for France.

jermartin77 avatar Nov 13 '18 05:11 jermartin77

As a follow up, we've build a custom theme based on Cornerstone to start. If the issue boils down to file size. The largest culprits in the Cornerstone theme are some default images in the Cornerstone theme. I think BigCommerce could knock 4mb of the base theme size by optimizing these.

image

jermartin77 avatar Nov 13 '18 18:11 jermartin77

Having this same issue.

stencil push gives this: PixelSnap 2019-10-29 at 11 04 15@2x

Manually uploading gives this: PixelSnap 2019-10-29 at 09 53 11@2x

I don't doubt that there might be an issue with my theme, but the only error info available implies it's a BigCommerce server issue: A server error occurred

brandonjp avatar Oct 29 '19 16:10 brandonjp

A year later I'm running into the same issue as well. Very frustrating that it isn't identifying the issue with the theme. Tried a couple different versions of CLI to see if it was something there and don't see any issues. Theme bundles fine, it dies halfway through the upload process. Uploading the zip manually fails and gives no reason as to why. Theme zip file is only 12.4Mb, so I don't think it's size related.

Screen Shot 2020-10-30 at 3 48 18 PM

creativereason avatar Oct 30 '20 20:10 creativereason

Having this same issue.

stencil push gives this: PixelSnap 2019-10-29 at 11 04 15@2x

Manually uploading gives this: PixelSnap 2019-10-29 at 09 53 11@2x

I don't doubt that there might be an issue with my theme, but the only error info available implies it's a BigCommerce server issue: A server error occurred

Was there ever a fix or response to this? We are getting the exact same undescriptive errors in both the Stencil CLI and manual upload in the admin of BigCommerce.

At a loss here trying to update our store to the newest release of Cornerstone (currently incrementally merging release commits - moving from 4.5.4 to 4.7.0).

asiejnapsc avatar Feb 18 '21 20:02 asiejnapsc

@creativereason @asiejnapsc Any chance you're trying to push a Stencil theme to a store that's currently running an old Blueprint theme?

brandonjp avatar Feb 18 '21 21:02 brandonjp

@creativereason @asiejnapsc Any chance you're trying to push a Stencil theme to a store that's currently running an old Blueprint theme?

Hmm... well we already were on Stencil with Cornerstone 4.5.4 (current live theme running on store for the better part of a year). But I do know our store - at least some of the admin panel - is running legacy elements. Essentially, we were on Blueprint before March of last year and made the switch around then and are finally getting around to fully updating to the newest Cornerstone release.

Sorry not sure if that's related or what you meant. I'll take any insight you have though.

asiejnapsc avatar Feb 18 '21 21:02 asiejnapsc