bigcommerce / stencil-cli

BigCommerce Stencil emulator for local theme development
https://developer.bigcommerce.com/stencil-docs
BSD 4-Clause "Original" or "Old" License
103 stars 142 forks source link

Stencil Push isn't working #342

Open leonperez1870 opened 6 years ago

leonperez1870 commented 6 years ago

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...

mcampa commented 6 years ago

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

leonperez1870 commented 6 years ago

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

mcampa commented 6 years ago

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

leonperez1870 commented 6 years ago

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

mcampa commented 6 years ago

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?

leonperez1870 commented 6 years ago

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

leonperez1870 commented 6 years ago

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

leonperez1870 commented 6 years ago

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

mcampa commented 6 years ago

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

leonperez1870 commented 6 years ago

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

leonperez1870 commented 6 years ago

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

leonperez1870 commented 6 years ago

@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.

mcampa commented 6 years ago

That is weird. How big are the images?

leonperez1870 commented 6 years ago

The biggest one was 5.1mb

mjschock commented 6 years ago

@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

leonperez1870 commented 6 years ago

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

mjschock commented 6 years ago

@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.

leonperez1870 commented 6 years ago

@mjschock Lol 24.4mb

leonperez1870 commented 6 years ago

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.

jbruni commented 6 years ago

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

leonperez1870 commented 6 years ago

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

leonperez1870 commented 6 years ago

Literally that's what I uploaded

abrambailey commented 6 years ago
➜  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.
jermartin77 commented 5 years ago

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 commented 5 years ago

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

brandonjp commented 4 years ago

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

creativereason commented 3 years ago

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
asiejnapsc commented 3 years ago

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).

brandonjp commented 3 years ago

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

asiejnapsc commented 3 years ago

@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.

brandonjp commented 3 years ago

@asiejnapsc Just curious & hoping it would help. That wasn't our issue either, but BigC tried to blame it on that when we were dealing with it.

Despite spending waaayyy toooo looooong troubleshooting this... There's not much advice I have that helps. My best advice would be to start now your theme on the latest Cornerstone version. I'd be happy to talk further about it (username @ gmail). But I'm not sure how much it will help. Eventually, I just recreated our theme again on the latest Cornerstone and pushed it live to a test site nearly everyday to ensure it was working. We had no problems going live with the new version. It's just that we spent twice the amount of time for a site that is much simpler than planned. (But now we're in the process of upgrading/rebasing as well! So who knows what's in store!)

I am soooooo sorry you're having this problem. I don't mean to be overly dramatic here but... this issue literally ruined 6 months of my life and finances. My client would've fired me if he hadn't actually been on the phone with me when BigC finally admitted that they knew about the issue but wouldn't help. We spent hours on the phone with BigC (90% was spent re-explaining the issue to someone with no dev knowledge until they would finally transfer us). We finally worked directly with two of their engineers and sent them zip files of our theme. They checked them and confirmed that they run fine locally and even tried manually to apply it to our store... all to no avail. They essentially informed us that they don't have good enough logging on their end to troubleshoot the problem and the issue does not affect enough users for them to address it. Understandable, but infuriating and exhausting. This issue (along with a couple others!) has lead me to passionately steer all my clients since away from BigCommerce. After you get past this, things are mostly fine (mostly!) - we just simply lost confidence in BigC.

keobrien commented 1 year ago

In my case, stencil push reporting "A server error occurred" was an issue with the schema.json.

Found the answer here for anyone curious. The docs do say that schema.json has a limit of 64 KB and there is no limit on the number of keys. In our case however, it looks like it’s allowing it up to 111 KB. Not sure if it’s the file size or the keys but removing 4 new keys I added in the update made it go through.