Chromatic fails with "403" error after upgrading to 10.3.0
Closed this issue · 2 comments
Bug report
Builds keep failing with the error https://chromatic-builds.s3.us-west-2.amazonaws.com/, got 403/Forbidden
after upgrading to version 10.3.0
and above using the chromaui
Github action. Downgrading and pinning version 10.2.2
seems to fix the issue, for now.
Chromatic CLI v10.3.0
https://www.chromatic.com/docs/cli
Authenticating with Chromatic
→ Connecting to https://index.chromatic.com
Authenticated with Chromatic
→ Using project token '*******v5e8'
Retrieving git information
Retrieved git information
→ Commit '[17](https://github.com/*****************************#step:20:18)b2138' on branch 'renovate/prettier-3.x-lockfile'; found 3 parent builds
Collecting Storybook metadata
Collected Storybook metadata
→ Storybook 7.6.7 for React; using the @storybook/react-vite builder (7.6.7); no supported addons found
Initializing build
Initialized build
→ Build 25940 initialized
Building your Storybook
→ Running command: yarn run build-storybook --output-dir /tmp/chromatic--5292-m39sBup717S4
→ [* ]
→ [ * ]
→ [ * ]
→ [ * ]
→ [ * ]
→ [ * ]
→ [ * ]
→ [ * ]
→ [ * ]
→ [ * ]
Storybook built in 1 minute 33 seconds
→ View build log at /home/runner/work/**************************************/build-storybook.log
Publish your built Storybook
→ Validating Storybook files
Publishing your built Storybook
→ Calculating file hashes
Publishing your built Storybook
→ Starting publish
⚠ Not uploading empty files
Found 10 empty files in your built Storybook:
→ favicon.ico
→ sb-addons/a11y-1/manager-bundle.js.LEGAL.txt
→ sb-addons/essentials-actions-3/manager-bundle.js.LEGAL.txt
→ sb-addons/essentials-backgrounds-4/manager-bundle.js.LEGAL.txt
→ sb-addons/essentials-measure-7/manager-bundle.js.LEGAL.txt
→ sb-addons/essentials-outline-8/manager-bundle.js.LEGAL.txt
→ sb-addons/essentials-toolbars-6/manager-bundle.js.LEGAL.txt
→ sb-addons/essentials-viewport-5/manager-bundle.js.LEGAL.txt
→ sb-addons/links-0/manager-bundle.js.LEGAL.txt
→ sb-addons/storybook-9/manager-bundle.js.LEGAL.txt
Uploading empty files is not supported except when using a zip file.
You can ignore this warning if your Storybook doesn't need these files.
Otherwise, configure Chromatic with the zip option.
→ [ ] 0%
→ [========= ] 47%
→ [=========== ] 55%
→ [=============== ] 75%
→ [================ ] 81%
→ [================== ] 92%
→ [=================== ] 97%
→ [====================] 98%
→ HTTPClient failed to fetch https://chromatic-builds.s3.us-west-2.amazonaws.com/, got 403/Forbidden
✖ Failed to publish your built Storybook
HTTPClient failed to fetch https://chromatic-builds.s3.us-west-2.amazonaws.com/, got 403/Forbidden
→ View the full stacktrace below
If you need help, please chat with us at https://www.chromatic.com/docs/cli for the fastest response.
You can also email the team at support@chromatic.com if chat is not an option.
Please provide us with the above CLI output and the following info:
{
"timestamp": "[20](**************************************)",
"sessionId": "736697cc-e38d-4e10-8768-2bc082b424fd",
"gitVersion": "2.43.0",
"nodePlatform": "linux",
"nodeVersion": "20.8.1",
"packageManager": "yarn",
"packageManagerVersion": "4.0.2",
"packageName": "chromatic",
"packageVersion": "10.3.0",
"storybook": {
"viewLayer": "react",
"version": "7.6.7",
"builder": {
"name": "@storybook/react-vite",
"packageVersion": "7.6.7"
}
},
"flags": {
"allowConsoleErrors": false,
"exitOnceUploaded": false,
"exitZeroOnChanges": true,
"interactive": false,
"uploadMetadata": false,
"zip": false
},
"configuration": {},
"buildScript": "storybook build",
"buildCommand": "yarn run build-storybook --output-dir /tmp/chromatic--5292-m39sBup717S4",
"exitCode": 0,
"exitCodeKey": "OK",
"errorType": "Error",
"errorMessage": "✖ Failed to publish your built Storybook",
"build": {
"id": "65a78acd014aa694e7b1b407",
"number": [25](https://github.com/*********************#step:20:26)940
}
}
Error: ✖ Failed to publish your built Storybook
HTTPClient failed to fetch https://chromatic-builds.s3.us-west-2.amazonaws.com/, got 403/Forbidden
at retries (/home/runner/work/_actions/chromaui/action/v1/action/register.js:1[32]
Error: non-zero exit code
``
Hi Kervin, thanks for the extensive report. I was able to reproduce the problem. The issue occurs due to a certain image file that contains the $
sign in its name. We recently switched over to a new S3 upload mechanism, and it appears S3 doesn't like object keys with $
signs in them. This was previously not a problem but now it seems we'll have to encode such characters. This is a backend change that I'll be addressing today, and once resolved I expect that 10.3.0 will work properly for you.
Hey @kervin5, sorry for the delay here. The issue should be resolved now, so you can safely upgrade the CLI. Let me know if you still run into issues.