gatsbyjs / gatsby

The best React-based framework with performance, scalability and security built in.
https://www.gatsbyjs.com
MIT License
55.28k stars 10.31k forks source link

gatsby-source-wordpress: PNG images with enabled alpha channel are marked as missing on deploy #30315

Closed cosmicespresso closed 2 years ago

cosmicespresso commented 4 years ago

I noticed this error on some builds (Vercel) and managed to fix it by just uploading the same image without alpha transparency, so I thought I should post it here.

10:34:06.162 | The icons we generate will be square and for the best results we recommend you provide a square icon.
-- | --
10:34:06.414 | success Build manifest and related icons - 0.253s
10:34:06.414 | success onPostBootstrap - 0.254s
10:34:06.414 | info bootstrap finished - 11.252s
10:34:06.443 | error Failed to retrieve metadata from image /vercel/322444e0/.cache/caches/gatsby-source-wordpress-experimental/3eb494c413b60003c49d99805ed8f04d/snake-e1599153020973.png Input file is missing
10:34:06.449 | 
10:34:06.449 |   Error: Input file is missing
10:34:06.449 | 
10:34:07.842 | not finished run static queries - 1.425s
10:34:08.343 | error Command failed with exit code 1.
10:34:08.344 | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
10:34:08.351 | Error: Command "yarn run build" exited with 1
10:34:10.455 | Done with "package.json"
github-actions[bot] commented 3 years ago

Hiya!

This issue has gone quiet. Spooky quiet. πŸ‘»

We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! πŸ’ͺπŸ’œ

rforster-dev commented 3 years ago

I think I might have the same issue. My builds are failing because of some .png's.

ERROR #gatsby-source-wordpress_gatsby-plugin-sharp-20000 Failed to retrieve metadata from image Error: Input file is missing

or I get

Error: Input file contains unsupported image format

The above message is not particularly helpful in identifying what is wrong with the image, but maybe it's related? It almost always seems to be on .pngs.

I've attached the npm gatsby info --clipboard as well below.

System: OS: Windows 10 10.0.18363 CPU: (8) x64 Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz Binaries: Node: 12.16.1 - C:\Program Files\nodejs\node.EXE npm: 7.6.3 - C:\Program Files\nodejs\npm.CMD Browsers: Chrome: 91.0.4472.124 Edge: Spartan (44.18362.1593.0) npmPackages: gatsby: ^3.8.1 => 3.8.1 gatsby-cli: ^3.8.0 => 3.8.0 gatsby-image: ^3.8.0 => 3.8.0 gatsby-plugin-manifest: ^3.8.0 => 3.8.0 gatsby-plugin-no-index: ^1.0.2 => 1.0.2 gatsby-plugin-react-helmet: ^4.8.0 => 4.8.0 gatsby-plugin-remove-fingerprints: 0.0.2 => 0.0.2 gatsby-plugin-remove-trailing-slashes: ^3.8.0 => 3.8.0 gatsby-plugin-sharp: ^3.8.0 => 3.8.0 gatsby-plugin-sitemap: ^3.3.0 => 3.3.0 gatsby-source-filesystem: ^3.8.0 => 3.8.0 gatsby-source-wordpress: ^5.8.0 => 5.8.0 gatsby-source-wordpress-experimental: ^7.0.6 => 7.0.6 gatsby-transformer-remote-filesystem: ^1.0.0 => 1.0.0 gatsby-transformer-sharp: ^3.8.0 => 3.8.0 gatsby-wpgraphql-inline-images: ^0.2.5 => 0.2.5 npmGlobalPackages: gatsby-cli: 3.1.0

LekoArts commented 2 years ago

Hi!

I'm closing this as a stale issue as in the meantime Gatsby 4 and related packages were released. You can check our Framework Version Support Page to see which versions currently receive active support.

Please try the mentioned issue on the latest version (using the next tag) and if you still see this problem, open a new bug report. It must include a minimal reproduction.

Thanks!