Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webp conversion is causing static build to fail #1759

Closed
russss opened this issue Jul 24, 2024 · 4 comments
Closed

Webp conversion is causing static build to fail #1759

russss opened this issue Jul 24, 2024 · 4 comments
Labels

Comments

@russss
Copy link
Member

russss commented Jul 24, 2024

The static build is now failing

0.527 Error! Could not process file /usr/share/nginx/emf-static/static/images/2018_post-d4ab795330bb9644b142d13273fec618.jpg
0.527 Error! Cannot read input picture file '/usr/share/nginx/emf-static/static/images/2018_post-d4ab795330bb9644b142d13273fec618.jpg'

This has presumably been caused by an upstream Alpine update.

This error is being reported by cwebp and isn't related to that specific jpeg. I don't know if it's happening with all jpegs but it's certainly more than one of them (and not all of them are progressive jpegs like 2018_post.jpg).

The cwebp commandline still reports that it's capable of handling JPEGs.

You can reproduce by doing a docker build . in docker/static.

@russss russss added the bug label Jul 24, 2024
@marksteward
Copy link
Member

marksteward commented Jul 25, 2024

I don't think this caused by cwebp. 2018_post.jpg in the latest website image is full of Unicode replacement characters (ef bf bd):

$ xxd 2018_post.ce4fa.jpg |head
00000000: ffd8 ffe0 0010 4a46 4946 0001 0100 0001  ......JFIF......
00000010: 0001 0000 ffe2 0c58 4943 435f 5052 4f46  .......XICC_PROF
00000020: 494c 4500 0101 0000 0c48 4c69 6e6f 0210  ILE......HLino..
00000030: 0000 6d6e 7472 5247 4220 5859 5a20 07ce  ..mntrRGB XYZ ..
00000040: 0002 0009 0006 0031 0000 6163 7370 4d53  .......1..acspMS
00000050: 4654 0000 0000 4945 4320 7352 4742 0000  FT....IEC sRGB..
00000060: 0000 0000 0000 0000 0000 0000 f6d6 0001  ................
00000070: 0000 0000 d32d 4850 2020 0000 0000 0000  .....-HP  ......
00000080: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000090: 0000 0000 0000 0000 0000 0000 0000 0000  ................

$ xxd 2018_post.f0f58.jpg |head
00000000: efbf bdef bfbd efbf bdef bfbd 0010 4a46  ..............JF
00000010: 4946 0001 0100 0001 0001 0000 efbf bdef  IF..............
00000020: bfbd 0c58 4943 435f 5052 4f46 494c 4500  ...XICC_PROFILE.
00000030: 0101 0000 0c48 4c69 6e6f 0210 0000 6d6e  .....HLino....mn
00000040: 7472 5247 4220 5859 5a20 07ef bfbd 0002  trRGB XYZ ......
00000050: 0009 0006 0031 0000 6163 7370 4d53 4654  .....1..acspMSFT
00000060: 0000 0000 4945 4320 7352 4742 0000 0000  ....IEC sRGB....
00000070: 0000 0000 0000 0000 0000 efbf bdef bfbd  ................
00000080: 0001 0000 0000 efbf bd2d 4850 2020 0000  .........-HP  ..
00000090: 0000 0000 0000 0000 0000 0000 0000 0000  ................

Seems to apply to all images.

@marksteward
Copy link
Member

marksteward commented Jul 25, 2024

Also bad:

i=ghcr.io/emfcamp/website@sha256:853eeb6d9050cd2b772bff61617f10531cf5d496d68251422228cd3f2a9a9fc2
docker pull $i && docker run --rm --entrypoint=bash $i -c 'cat /app/static/images/2018_post.jpg'|xxd|head

Bad i=ghcr.io/emfcamp/website@sha256:9598465ee8a9b74302eb54b98914fb4c23f7a6e70d81341ad51efa99837cf2de
Good i=ghcr.io/emfcamp/website@sha256:da707501a4bc7c03c537040ccf979dd6e72eed2fc10241b5801440ad0c73e1a3
Good i=ghcr.io/emfcamp/website@sha256:de8dc823e49a2eb9d12d2d0739d70458debc9d8dda12ff592aaee5ffe109dbf8

So it broke with https://github.com/emfcamp/Website/actions/runs/9863319190/job/27235909312, which was the first since adding pump and also this base image build https://github.com/emfcamp/Website/actions/runs/9738746855.

Maybe a change between pump 2.0 and 3.0? Unlikely are there are basically no changes.

@marksteward
Copy link
Member

Caused by Default stream encoding to UTF-8, included in #1735. I can't work out why bumping braces required bumping gulp in the first place but it is the first gulp release in 5 years and included a list of breaking changes so we probably can't grumble.

@marksteward
Copy link
Member

Fixed by 7e91dda

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants