[Deploy failed] - The request failed with error code "CERT_HAS_EXPIRED"

Hi! please help me out guys. The error log:

12:27:26 PM: ┌─────────────────────────────┐
12:27:26 PM: │ Netlify Build │
12:27:26 PM: └─────────────────────────────┘
12:27:26 PM: ​
12:27:26 PM: ❯ Version
12:27:26 PM: @netlify/build 3.3.5
12:27:26 PM: ​
12:27:26 PM: ❯ Flags
12:27:26 PM: deployId: 5f55d27a080cf0924362f9eb
12:27:26 PM: mode: buildbot
12:27:26 PM: ​
12:27:26 PM: ❯ Current directory
12:27:26 PM: /opt/build/repo
12:27:26 PM: ​
12:27:26 PM: ❯ Config file
12:27:26 PM: No config file was defined: using default values.
12:27:26 PM: ​
12:27:26 PM: ❯ Context
12:27:26 PM: production
12:27:26 PM: ​
12:27:26 PM: ┌───────────────────────────────────┐
12:27:26 PM: │ 1. Build command from Netlify app │
12:27:26 PM: └───────────────────────────────────┘
12:27:26 PM: ​
12:27:26 PM: $ gatsby build
12:27:28 PM: warning
12:27:28 PM: Replace Autoprefixer browsers option to Browserslist config.
12:27:28 PM: Use browserslist key in package.json or .browserslistrc file.
12:27:28 PM:
12:27:28 PM: Using browsers option can cause errors. Browserslist config
12:27:28 PM: can be used for Babel, Autoprefixer, postcss-normalize and other tools.
12:27:28 PM:
12:27:28 PM: If you really need to use option, rename it to overrideBrowserslist.
12:27:28 PM:
12:27:28 PM: Learn more at:
12:27:28 PM: https://github.com/browserslist/browserslist#readme
12:27:28 PM: https://twitter.com/browserslist
12:27:28 PM:
12:27:28 PM:
12:27:28 PM: success open and validate gatsby-configs - 0.111s
12:27:29 PM: success load plugins - 1.033s
12:27:29 PM: success onPreInit - 0.003s
12:27:29 PM: success delete html and css files from previous builds - 0.014s
12:27:29 PM: success initialize cache - 0.008s
12:27:30 PM: success copy gatsby files - 0.026s
12:27:30 PM: success onPreBootstrap - 0.013s
12:27:30 PM: success createSchemaCustomization - 0.010s
12:27:30 PM:
12:27:30 PM: =START PLUGIN=====================================
12:27:30 PM: Site URL: https://esterad-wp.otakoyi.com.ua
12:27:30 PM: Site hosted on Wordpress.com: false
12:27:30 PM: Using ACF: true
12:27:30 PM: Auth: false
12:27:30 PM: Verbose output: true
12:27:30 PM: Mama Route URL: https://esterad-wp.otakoyi.com.ua/index.php/wp-json
12:27:30 PM:
12:27:30 PM: The request failed with error code “CERT_HAS_EXPIRED”
12:27:30 PM: error “gatsby-source-wordpress” threw an error while running the sourceNodes lifecycle:
12:27:30 PM: Cannot read property ‘data’ of undefined
12:27:30 PM:
12:27:30 PM:
12:27:30 PM: TypeError: Cannot read property ‘data’ of undefined
12:27:30 PM:
12:27:30 PM: - fetch.js:142 fetch
12:27:30 PM: [repo]/[gatsby-source-wordpress]/fetch.js:142:21
12:27:30 PM:
12:27:30 PM: - next_tick.js:68 process._tickCallback
12:27:30 PM: internal/process/next_tick.js:68:7
12:27:30 PM:
12:27:30 PM:
12:27:30 PM: not finished source and transform nodes - 0.895s
12:27:31 PM: ​
12:27:31 PM: ┌─────────────────────────────┐
12:27:31 PM: │ “build.command” failed │
12:27:31 PM: └─────────────────────────────┘
12:27:31 PM: ​
12:27:31 PM: Error message
12:27:31 PM: Command failed with exit code 1: gatsby build
12:27:31 PM: ​
12:27:31 PM: Error location
12:27:31 PM: In Build command from Netlify app:
12:27:31 PM: gatsby build
12:27:31 PM: ​
12:27:31 PM: Resolved config
12:27:31 PM: build:
12:27:31 PM: command: gatsby build
12:27:31 PM: commandOrigin: ui
12:27:31 PM: publish: /opt/build/repo/public
12:27:31 PM: Caching artifacts
12:27:31 PM: Started saving node modules
12:27:31 PM: Finished saving node modules
12:27:31 PM: Started saving build plugins
12:27:31 PM: Finished saving build plugins
12:27:31 PM: Started saving yarn cache
12:27:31 PM: Finished saving yarn cache
12:27:31 PM: Started saving pip cache
12:27:31 PM: Finished saving pip cache
12:27:31 PM: Started saving emacs cask dependencies
12:27:31 PM: Finished saving emacs cask dependencies
12:27:31 PM: Started saving maven dependencies
12:27:31 PM: Finished saving maven dependencies
12:27:31 PM: Started saving boot dependencies
12:27:31 PM: Finished saving boot dependencies
12:27:31 PM: Started saving go dependencies
12:27:33 PM: Finished saving go dependencies
12:27:37 PM: Error running command: Build script returned non-zero exit code: 1
12:27:37 PM: Failing build: Failed to build site
12:27:37 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 1
12:27:37 PM: Finished processing build request in 1m32.602504264s

HI, @faisal95bd. This is the certificate on the other service. Visit this URL (from the logs above):

https://esterad-wp.otakoyi.com.ua

If you visit that URL, you will see the same type of error - an SSL certificate error.

The SSL certificate on that system expired at Monday, August 10, 2020 at 11:26:55 AM Pacific time. That is the source of the error. That system isn’t hosted on Netlify and we don’t control that SSL certificate.

You’ll need to fix the other system to resolve this issue.

Thanks.

I will look into that.

Now, it’s giving that:

12:26:23 PM: ┌─────────────────────────────┐

12:26:23 PM: │ Netlify Build │

12:26:23 PM: └─────────────────────────────┘

12:26:23 PM: ​

12:26:23 PM: ❯ Version

12:26:23 PM: @netlify/build 4.0.4

12:26:23 PM: ​

12:26:23 PM: ❯ Flags

12:26:23 PM: deployId: 5f6847446d590f4911b7ff5b

12:26:23 PM: mode: buildbot

12:26:23 PM: ​

12:26:23 PM: ❯ Current directory

12:26:23 PM: /opt/build/repo

12:26:23 PM: ​

12:26:23 PM: ❯ Config file

12:26:23 PM: No config file was defined: using default values.

12:26:23 PM: ​

12:26:23 PM: ❯ Context

12:26:23 PM: production

12:26:23 PM: ​

12:26:23 PM: ┌───────────────────────────────────┐

12:26:23 PM: │ 1. Build command from Netlify app │

12:26:23 PM: └───────────────────────────────────┘

12:26:23 PM: ​

12:26:23 PM: $ gatsby build

12:26:25 PM: warning

12:26:25 PM: Replace Autoprefixer browsers option to Browserslist config.

12:26:25 PM: Use browserslist key in package.json or .browserslistrc file.

12:26:25 PM:

12:26:25 PM: Using browsers option can cause errors. Browserslist config

12:26:25 PM: can be used for Babel, Autoprefixer, postcss-normalize and other tools.

12:26:25 PM:

12:26:25 PM: If you really need to use option, rename it to overrideBrowserslist.

12:26:25 PM:

12:26:25 PM: Learn more at:

12:26:25 PM: https://github.com/browserslist/browserslist#readme

12:26:25 PM: https://twitter.com/browserslist

12:26:25 PM:

12:26:25 PM:

12:26:25 PM: success open and validate gatsby-configs - 0.061s

12:26:26 PM: success load plugins - 0.925s

12:26:26 PM: success onPreInit - 0.003s

12:26:26 PM: success delete html and css files from previous builds - 0.014s

12:26:26 PM: success initialize cache - 0.007s

12:26:26 PM: success copy gatsby files - 0.043s

12:26:26 PM: success onPreBootstrap - 0.017s

12:26:26 PM: success createSchemaCustomization - 0.008s

12:26:26 PM:

12:26:26 PM: =START PLUGIN=====================================

12:26:26 PM: Site URL: https://esterad-wp.otakoyi.com.ua

12:26:26 PM: Site hosted on Wordpress.com: false

12:26:26 PM: Using ACF: true

12:26:26 PM: Auth: false

12:26:26 PM: Verbose output: true

12:26:26 PM: Mama Route URL: https://esterad-wp.otakoyi.com.ua/index.php/wp-json

12:26:26 PM:

12:26:27 PM:

12:26:27 PM: Path: /index.php/wp-json

12:26:27 PM: The server response was “401 Unauthorized”

12:26:27 PM: error “gatsby-source-wordpress” threw an error while running the sourceNodes lifecycle:

12:26:27 PM: Cannot read property ‘data’ of undefined

12:26:27 PM:

12:26:27 PM:

12:26:27 PM: TypeError: Cannot read property ‘data’ of undefined

12:26:27 PM:

12:26:27 PM: - fetch.js:142 fetch

12:26:27 PM: [repo]/[gatsby-source-wordpress]/fetch.js:142:21

12:26:27 PM:

12:26:27 PM: - next_tick.js:68 process._tickCallback

12:26:27 PM: internal/process/next_tick.js:68:7

12:26:27 PM:

12:26:27 PM:

12:26:27 PM: not finished source and transform nodes - 0.894s

12:26:27 PM: ​

12:26:27 PM: ┌─────────────────────────────┐

12:26:27 PM: │ “build.command” failed │

12:26:27 PM: └─────────────────────────────┘

12:26:27 PM: ​

12:26:27 PM: Error message

12:26:27 PM: Command failed with exit code 1: gatsby build

12:26:27 PM: ​

12:26:27 PM: Error location

12:26:27 PM: In Build command from Netlify app:

12:26:27 PM: gatsby build

12:26:27 PM: ​

12:26:27 PM: Resolved config

12:26:27 PM: build:

12:26:27 PM: command: gatsby build

12:26:27 PM: commandOrigin: ui

12:26:27 PM: publish: /opt/build/repo/public

12:26:27 PM: Caching artifacts

12:26:27 PM: Started saving node modules

12:26:27 PM: Finished saving node modules

12:26:27 PM: Started saving build plugins

12:26:27 PM: Finished saving build plugins

12:26:27 PM: Started saving yarn cache

12:26:27 PM: Finished saving yarn cache

12:26:27 PM: Started saving pip cache

12:26:28 PM: Finished saving pip cache

12:26:28 PM: Started saving emacs cask dependencies

12:26:28 PM: Finished saving emacs cask dependencies

12:26:28 PM: Started saving maven dependencies

12:26:28 PM: Finished saving maven dependencies

12:26:28 PM: Started saving boot dependencies

12:26:28 PM: Finished saving boot dependencies

12:26:28 PM: Started saving go dependencies

12:26:29 PM: Finished saving go dependencies

12:26:33 PM: Error running command: Build script returned non-zero exit code: 2

12:26:33 PM: Failing build: Failed to build site

12:26:33 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2

12:26:33 PM: Finished processing build request in 1m18.837100384s

That is a new error. The 401 means the login to the site failed.

To resolve this, it will be required to debug the login process but that is controlled by your custom code and not Netlify.

I’ll try to assist troubleshooting this but I don’t have any information about the build itself beside the logs posted.

Answers to the following questions would be helpful:

  • How is the login being done locally?
  • Do you use environment variables to pass the login credentials to the build process?
  • If so, are you setting those same environment variables at Netlify also? (If not, try doing so.)
  • What is the link at Netlify to the deploy logs above?

Answers to those questions will help us progress this troubleshooting. If there are questions for us, please let us know.