lycheeverse / lychee-action

Github action to check for broken links in Markdown, HTML, and text files using lychee, a fast link checker written in Rust.
https://lychee.cli.rs
Apache License 2.0
318 stars 44 forks source link

Stream did not contain valid UTF-8 #179

Closed vipulgupta2048 closed 1 year ago

vipulgupta2048 commented 1 year ago

Getting this error when running Lychee action with latest commit.

Run lycheeverse/lychee-action@0682ed617509a52424db04e7502c1dc3df28b469
Run curl -sLO 'https://github.com/lycheeverse/lychee/releases/download/v0.10.3/lychee-v0.10.3-x86_64-unknown-linux-gnu.tar.gz'
lychee
Run /home/runner/work/_actions/lycheeverse/lychee-action/0682ed617509a52424db04e7502c1dc3df28b469/entrypoint.sh
Error: Cannot read input content from file `build/dist/4692b9ec53fd5972caa2f[23](https://github.com/balena-io/docs/actions/runs/4017728572/jobs/6902452065#step:6:25)72ae20d16.ttf`

Caused by:
    stream did not contain valid UTF-8
No output. Check pipeline run to see if lychee panicked.

https://github.com/balena-io/docs/actions/runs/4017728572/jobs/6902452065

mre commented 1 year ago

It should not read image files. There's an open issue for that: https://github.com/lycheeverse/lychee/issues/410. For now the workaround is to exclude that file type from the run. 😕 You can use --exclude-path for that.

vipulgupta2048 commented 1 year ago

Thanks @mre Trying it out now. An update, I recently discovered the base URL feature and it turns out we were not scanning any of our relative links (About 50k 🥵 ) So with caching, duplicate reduction, excluding links and accepting status codes. We would be scanning about 70k links with this update.

Thanks for this amazing tool!

mre commented 1 year ago

That's quite impressive. Thanks for letting us know. 🚀

vipulgupta2048 commented 1 year ago

The workaround resolved this. Thanks @mre