Manifest.json 404 error on Netlify Build using gatsby-plugin-manifest

After deploying my site to netlify I continuously get a 404 error for manifest.json.
I have installed and configured the gatsby-plugin-manifest just like the docs say however I can not get rid of this 404 error. After reviewing other issues and questions I still haven’t found a fix. I deleted modules, lock files, and caches to no avail. I also built the site locally then deployed it to Netlify to see if It still needed to be built prior to Netlify building it, however that still didn’t fix anything. Really need to pass the PWA validation and this is holding me back. Does anyone know any solutions?

I installed gatsby-plugin-manifest to my application and deployed it from this
Repo. Once you open up the console in the browser this error persists:

GET https://federalrecoveryoperations.netlify.com/manifest.json 404
Manifest: Line: 1, column: 1, Syntax error.

Here is the live site that STILL throws the error. Site

Environment

System:
OS: macOS 10.14.6
CPU: (4) x64 Intel(R) Core™ i5-4570R CPU @ 2.70GHz
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.16.3 - /usr/local/bin/node
Yarn: 1.18.0 - /usr/local/bin/yarn
npm: 6.12.0 - /usr/local/bin/npm
Languages:
Python: 2.7.10 - /usr/bin/python
Browsers:
Chrome: 77.0.3865.120
Safari: 13.0.2
npmPackages:
gatsby: ^2.3.26 => 2.16.5
gatsby-image: ^2.0.39 => 2.2.29
gatsby-plugin-eslint: ^2.0.3 => 2.0.5
gatsby-plugin-manifest: ^2.2.23 => 2.2.23
gatsby-plugin-offline: ^2.0.25 => 2.2.10
gatsby-plugin-react-helmet: ^3.0.12 => 3.1.13
gatsby-plugin-react-svg: ^2.0.0 => 2.1.2
gatsby-plugin-sharp: ^2.0.35 => 2.2.32
gatsby-plugin-sitemap: ^2.0.12 => 2.2.19
gatsby-plugin-styled-components: ^3.0.7 => 3.1.11
gatsby-plugin-webpack-size: ^0.0.3 => 0.0.3
gatsby-source-filesystem: ^2.0.30 => 2.1.33
gatsby-transformer-json: ^2.1.11 => 2.2.15
gatsby-transformer-remark: ^2.3.9 => 2.6.30
gatsby-transformer-sharp: ^2.1.18 => 2.2.23
npmGlobalPackages:
gatsby-cli: 2.8.3

It seems to me that you didn’t specify the start_url, i’m referrring to this line in your gatsby-config.js
Have you tried setting it specifically? i beleive it should be something like this:
gatsby-config.js

...
resolve: `gatsby-plugin-manifest`,
options: {
....
start_url: siteConfig.siteUrl
....
}

You can read more about this plugin in the Gatsby repo
If you still having no luck with this you can ask this question on Gatsby’s Discord: Gatsby

well I tried to follow the docs because i couldn’t get it to work, But I will go ahead and set ip up the way you stated above using start_url: siteConfig.siteUrl

Hopefully this works, if not, I will let you know on this topic and I will ack on the discord.
I Appreciate your help @zltnvrs !!!

So It still did not work for me. I tried it with the start_url: siteConfig.siteUrl and with start_url: '/'

and neither worked for me, still getting the manifest.json error.

Your site is not serving the manifest.json file, (and also nothing under the /icons folder) it serves the 404.js page, which means the file is missing from Netlify.
You have to run yarn build on your local machine and ensure that the /public/manifest.json file is created.
Since you are using circle ci and not the netlify CI you have to make sure that on the files are copied to Netlify. (I’m assuming this because no netlify.toml is found in the repo linked above)
One other thing i noticed, that before the gatsby build you also run the build:dir command which manipulates the icons folder. Those files are also giving 404 on your netlify site.

1 Like