chromatic-cli: Chromatic + Github Actions doesn't work. Logs say Sentinel file 'files-copied.txt' not OK.
Bug report
When I run chromatic build through github actions chromaui/action@v10, it returns the following error:
(...)
Publish your built Storybook
→ Validating Storybook files
Publishing your built Storybook
→ Calculating file hashes
Publishing your built Storybook
→ Starting publish
→ [====================] 100%
Publishing your built Storybook
→ Finalizing upload
→ Sentinel file 'files-copied.txt' not OK.
✖ Failed to publish your built Storybook
Sentinel file 'files-copied.txt' not OK.
→ 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": "2024-02-01T15:33:46.064Z",
"sessionId": "7e77c4f1-c57d-41b1-addb-2fdc6a498bf0",
"gitVersion": "2.43.0",
"nodePlatform": "linux",
"nodeVersion": "20.8.1",
"packageManager": "yarn",
"packageManagerVersion": "1.22.21",
"packageName": "chromatic",
"packageVersion": "10.6.1",
"storybook": {
"viewLayer": "react",
"version": "7.6.12"
},
"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--1938-9F4vSasTkbFa",
"exitCode": 0,
"exitCodeKey": "OK",
"errorType": "Error",
"errorMessage": "✖ Failed to publish your built Storybook",
"build": {
"id": "65bbb97db81ede0ebf445948",
"number": 1123
}
}
Error: ✖ Failed to publish your built Storybook
Sentinel file 'files-copied.txt' not OK.
at Kqt.retries (/home/runner/work/_actions/chromaui/action/v10/action/register.js:1363:59167)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Promise.all (index 0)
at async wyi (/home/runner/work/_actions/chromaui/action/v10/action/register.js:1371:1111)
at async KX.task (/home/runner/work/_actions/chromaui/action/v10/action/register.js:636:24188)
Error: non-zero exit code
When I run chromatic locally, it builds successfully.
✔ Storybook published
We found 89 components with 231 stories.
ℹ View your Storybook at https://[ommited].chromatic.com/
I can’t find this files-copied.txt that Sentinel says is not OK.
About this issue
- Original URL
- State: closed
- Created 5 months ago
- Reactions: 4
- Comments: 16 (4 by maintainers)
@angelod1as @dspachos @adamth @wherehows @henricook @moeyashi We’ve found and fixed a problem with the file copying. We weren’t properly URL-encoding filenames, which caused the copy to fail for files that contained “unsafe” characters such as
äor+. Now that this has been fixed, please give file hashing another try and let me know if the problem has been resolved for you. No CLI / GitHub Action update is necessary, just removefileHashing: false/--no-file-hashingfrom your config.Thanks all for chiming in. The
fileHashingoption was overlooked for the action, I’ll get that added ASAP (PR here). Once that’s in you’ll be able to setfileHashing: falseas an option.Meanwhile, if you chat with support, they can disable the feature for your account altogether. Not recommended though because hashing enables us to skip uploading files that have been uploaded before, which speeds up your CI job significantly (saving you money in the process).
The reason for the odd/even build failures is that the deduplication mechanism will delete file hash records if anything goes wrong, which means the next build will not dedupe anything because we won’t have any records. However, the next build then will attempt to dedupe again, which fails. I’m still looking into the reason for those failures.
Looks good to us so far, thanks @ghengeveld - we’ve re-enabled file hashing and haven’t seen the problem again.