React-snap: A lot of `Failed to load resource: net::ERR_FAILED` if you use `skipThirdPartyRequests: true`

Created on 14 Aug 2018  Â·  2Comments  Â·  Source: stereobooster/react-snap

Those messages create a lot of noise and doesn't bring much value. We can silent those

enhancement

Most helpful comment

@gianpaj this is different error

console.log at /: TypeError: Network request failed !== Failed to load resource: net::ERR_FAILED

your error comes from your application code (console.log).

Adding || true will hide the error, your final html can have some gibberish. Those errors are there for reason

All 2 comments

FYI because of the exit code is 1, it fails to build in CI environments like Netlify

1:14:21 AM: 💬  console.log at /: TypeError: Network request failed
1:14:22 AM: ✅  crawled 1 out of 1 (/)
1:14:22 AM: error Command failed with exit code 1.
1:14:22 AM: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
1:14:22 AM: Error running command: Build script returned non-zero exit code: 1
1:14:22 AM: Failing build: Failed to build site
1:14:22 AM: failed during stage 'building site': Build script returned non-zero exit code: 1
1:14:22 AM: Finished processing build request in 2m41.942663432s
1:14:22 AM: Shutting down logging, 0 messages pending

Adding || true will do the trick as now it always returns exit code 0:

package.json

{
  "scripts": {
    "postbuild": "react-snap || true",
  },
}

@gianpaj this is different error

console.log at /: TypeError: Network request failed !== Failed to load resource: net::ERR_FAILED

your error comes from your application code (console.log).

Adding || true will hide the error, your final html can have some gibberish. Those errors are there for reason

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stereobooster picture stereobooster  Â·  6Comments

rohan-deshpande picture rohan-deshpande  Â·  5Comments

stereobooster picture stereobooster  Â·  6Comments

philipeatela picture philipeatela  Â·  3Comments

raRaRa picture raRaRa  Â·  8Comments