stencil-cli
stencil-cli copied to clipboard
Stencil Push Fails With "Job Not Found" error.
Expected behavior
Using GitHub Actions to run stencil push
and it pushes and uploads the theme.
Actual behavior
stencil push
get's 80% of the way done then randomly fails after the Theme Upload finishes:
I re-run the command without changing anything and it works fine.
Steps to reproduce behavior
Hard to reproduce since it's so random. This issue happens across different stores with different themes.
Environment
Stencil-cli version stencil --version
: [email protected]
Node version node -v
: Node 14.20.1
OS: Ubuntu Runner on GitHub Actions
@harnerdesigns instead of the stencil push
command use the stencil push -a -d -c 1
command.
-a for variation
-d for deleting the old theme (if exceed the theme limit)
-c for the channel.
@codal-nilayp, we already do. stencil push -d -c 1
or stencil push -d -c 1 --activate
depending on if we want to auto-activate or not. It fails randomly, and then without changing anything in the theme or the workflow, just running it again, it'll work just fine.
+1 on this, we see this regularly too.
+1 We started to notice this also as the JavaScript got bigger and bigger.
Same here. We see this around 10% of the time, and unfortunately, the probability grows, when we deploy to more than one environment within one job.
package.json
uses
"@bigcommerce/stencil-cli": "^7.2.0",
"@bigcommerce/stencil-utils": "^6.15.1",
We can't see any error codes listed in https://developer.bigcommerce.com/stencil-docs/deploying-a-theme/troubleshooting-theme-uploads.
Here is the deployment part of the yml
script:
stencil init -u "${URL}" -t "${TOKEN}" -p 3000 -h https://api.bigcommerce.com
# Debug the configuration:
cat config.stencil.json
stencil debug
stencil push -a -d -c 1 -f bundled_theme/bundle.zip -vb
And here is the log:
Set API host to: https://api.bigcommerce.com
You are now ready to go! To start developing, run $ stencil start
{
"customLayouts": {
"brand": {},
"category": {
"whatever.html": "/whatever/"
},
"page": {
"whatever-else.html": "/whatever-else/"
},
"product": {}
},
"normalStoreUrl": "***",
"port": "3000",
"apiHost": "https://api.bigcommerce.com"
}
{"platform":{"type":"Linux","version":"#49-Ubuntu SMP Tue Jul 11 17:28:46 UTC 2023"},"version":"7.1.0","nodeVersion":"v16.20.1","stencil":{"apiHost":"https://api.bigcommerce.com","normalStoreUrl":"***","port":"3000"},"theme":{"name":"whatever","version":"0.2.0","template_engine":"handlebars_v4","css_compiler":"scss","author_name":"BigCommerce"}}
Upcoming request GET: ***admin/oauth/info
Upcoming request GET: https://api.bigcommerce.com/stores/xxx/v3/themes
Upcoming request POST: https://api.bigcommerce.com/stores/xxx/v3/themes
Upcoming request DELETE: https://api.bigcommerce.com/stores/xxx/v3/themes/bd534660-136e-013c-2351-4e0354df18c3
Upcoming request GET: https://api.bigcommerce.com/stores/xxx/v3/themes
Upcoming request POST: https://api.bigcommerce.com/stores/xxx/v3/themes
ok -- Theme Upload Finished
Upcoming request GET: https://api.bigcommerce.com/stores/xxx/v3/themes/jobs/undefined
not ok -- JobCompletionStatusCheckError: Job Failed
Job not found
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.
Error: Process completed with exit code 1.
***
is how GitHub protects the strings stored in the GitHub Secrets from being sniffed. We are confident the string is used properly, as 90% of the time deployments succeed.
bundle.zip
is created as a part of a previous job, as we are reusing it a few times in a GitHub matrix (a way GitHub allows looping through configuration). Before the matrix was introduced to support multiple environments, we also saw the described failures. The resulting bundle size is around 15MB.