Home
Support Forums

Hugo site builds with no errors but deploy fails

Hi,

I’ve just started having issues deploying my site. It’s been working for a long time and I recently made some updates to the site - which have been building and deploying fine - until my most recent commit which basically just changed bootstrap versions (4 to 5). The site builds and runs locally just fine.

My site name: 1. festive-ramanujan-cc460e
I’ve turned on debug mode but it doesn’t help since the build appears to run fine. It looks like it’s just the deploy that fails (after 5 tries I guess) but there is no information in the build log.

I did read in the troubleshooting that if my CSS link is bad that could cause problems but I’ve copied it straight from get bootstrap so I wouldn’t think that would be the problem. I’m not doing any SASS processing or anything like that. Hugo version is the same locally and here and is the extended version.

Here’s the build log

11:27:48 PM: Build ready to start
11:27:50 PM: build-image version: 73def8bb10593b9b818f44989a75ea508018ccb7 (focal)
11:27:50 PM: build-image tag: v4.5.2
11:27:50 PM: buildbot version: e07f38cea73012d29c839c78dec87335277fe704
11:27:50 PM: Building without cache
11:27:50 PM: Starting to prepare the repo for build
11:27:50 PM: No cached dependencies found. Cloning fresh repo
11:27:50 PM: git clone https://github.com/tmhudg/cat-hospital-and-bird-clinic
11:27:51 PM: Preparing Git Reference refs/heads/master
11:27:52 PM: Parsing package.json dependencies
11:27:52 PM: ​❯ Initial build environmentbaseRelDir: truebranch: mastercontext: productioncwd: /opt/build/repofeatureFlags: []mode: buildbotrepositoryRoot: /opt/build/repositeId: a8393036-a454-4dc4-940a-72f912e732e8​❯ UI build settingsbaseRelDir: truebuild:  command: hugo  environment:    - NETLIFY_BUILD_DEBUG  publish: public​❯ Resolved build environmentbranch: masterbuildDir: /opt/build/repoconfigPath: /opt/build/repo/netlify.tomlcontext: productionenv: []​❯ Resolved configbuild:  command: hugo  commandOrigin: ui  environment:    - NETLIFY_BUILD_DEBUG    - HUGO_VERSION  publish: /opt/build/repo/public  publishOrigin: ui
11:27:53 PM: Starting build script
11:27:53 PM: Installing dependencies
11:27:53 PM: Python version set to 2.7
11:27:53 PM: Downloading and installing node v12.18.0...
11:27:54 PM: Downloading https://nodejs.org/dist/v12.18.0/node-v12.18.0-linux-x64.tar.xz...
11:27:54 PM: Computing checksum with sha256sum
11:27:54 PM: Checksums matched!
11:27:56 PM: Now using node v12.18.0 (npm v6.14.4)
11:27:56 PM: Started restoring cached build plugins
11:27:56 PM: Finished restoring cached build plugins
11:27:56 PM: Attempting ruby version 2.7.2, read from environment
11:27:58 PM: Using ruby version 2.7.2
11:27:58 PM: Using PHP version 8.0
11:27:58 PM: Installing Hugo 0.91.0
11:27:59 PM: hugo v0.91.0-D1DC0E9A+extended linux/amd64 BuildDate=2021-12-17T09:50:20Z VendorInfo=gohugoio
11:27:59 PM: Started restoring cached go cache
11:27:59 PM: Finished restoring cached go cache
11:27:59 PM: Installing Go version 1.14.4
11:28:04 PM: unset GOOS;
11:28:04 PM: unset GOARCH;
11:28:04 PM: export GOROOT='/opt/buildhome/.gimme_cache/versions/go1.14.4.linux.amd64';
11:28:04 PM: export PATH="/opt/buildhome/.gimme_cache/versions/go1.14.4.linux.amd64/bin:${PATH}";
11:28:04 PM: go version >&2;
11:28:04 PM: export GIMME_ENV="/opt/buildhome/.gimme_cache/env/go1.14.4.linux.amd64.env"
11:28:04 PM: go version go1.14.4 linux/amd64
11:28:04 PM: Installing missing commands
11:28:04 PM: Verify run directory
11:28:06 PM: ​
11:28:06 PM: ────────────────────────────────────────────────────────────────
11:28:06 PM:   Netlify Build                                                 
11:28:06 PM: ────────────────────────────────────────────────────────────────
11:28:06 PM: ​
11:28:06 PM: ❯ Version
11:28:06 PM:   @netlify/build 26.0.2
11:28:06 PM: ​
11:28:06 PM: ❯ Flags
11:28:06 PM:   apiHost: api.netlify.com
11:28:06 PM:   baseRelDir: true
11:28:06 PM:   branch: master
11:28:06 PM:   buildId: 61d27b441fd334ec13318865
11:28:06 PM:   buildbotServerSocket: /tmp/netlify-buildbot-socket
11:28:06 PM:   cacheDir: /opt/build/cache
11:28:06 PM:   cachedConfigPath: /tmp/netlify_config.json
11:28:06 PM:   context: production
11:28:06 PM:   cwd: /opt/build/repo
11:28:06 PM:   deployId: 61d27b441fd334ec13318867
11:28:06 PM:   featureFlags:
11:28:06 PM:     - buildbot_build_go_functions
11:28:06 PM:     - zisi_parse_isc
11:28:06 PM:   framework: hugo
11:28:06 PM:   functionsDistDir: /tmp/zisi-61d27b441fd334ec13318867
11:28:06 PM:   mode: buildbot
11:28:06 PM:   nodePath: /opt/buildhome/.nvm/versions/node/v12.18.0/bin/node
11:28:06 PM:   repositoryRoot: /opt/build/repo
11:28:06 PM:   saveConfig: true
11:28:06 PM:   sendStatus: true
11:28:06 PM:   siteId: a8393036-a454-4dc4-940a-72f912e732e8
11:28:06 PM:   statsd:
11:28:06 PM:     host: datadog-agent
11:28:06 PM:     port: 8125
11:28:06 PM:   testOpts:
11:28:06 PM:     silentLingeringProcesses: ''
11:28:06 PM: ​
11:28:06 PM: ❯ Current directory
11:28:06 PM:   /opt/build/repo
11:28:06 PM: ​
11:28:06 PM: ❯ Config file
11:28:06 PM:   /opt/build/repo/netlify.toml
11:28:06 PM: ​
11:28:06 PM: ❯ Resolved config
11:28:06 PM:   build:
11:28:06 PM:     command: hugo
11:28:06 PM:     commandOrigin: ui
11:28:06 PM:     environment:
11:28:06 PM:       - NETLIFY_BUILD_DEBUG
11:28:06 PM:       - HUGO_VERSION
11:28:06 PM:     publish: /opt/build/repo/public
11:28:06 PM:     publishOrigin: ui
11:28:06 PM: Creating deploy upload records
11:28:06 PM: ​
11:28:06 PM: ❯ Context
11:28:06 PM:   production
11:28:06 PM: ​
11:28:06 PM: ────────────────────────────────────────────────────────────────
11:28:06 PM:   1. Build command from Netlify app                             
11:28:06 PM: ────────────────────────────────────────────────────────────────
11:28:06 PM: ​
11:28:06 PM: $ hugo
11:28:06 PM: Start building sites …
11:28:06 PM: hugo v0.91.0-D1DC0E9A+extended linux/amd64 BuildDate=2021-12-17T09:50:20Z VendorInfo=gohugoio
11:28:06 PM:                    | EN
11:28:06 PM: Starting post processing
11:28:06 PM: -------------------+-----
11:28:06 PM:   Pages            | 46
11:28:06 PM:   Paginator pages  |  0
11:28:06 PM:   Non-page files   |  0
11:28:06 PM:   Static files     | 36
11:28:06 PM: Post processing - HTML
11:28:06 PM:   Processed images |  0
11:28:06 PM:   Aliases          | 12
11:28:06 PM:   Sitemaps         |  1
11:28:06 PM:   Cleaned          |  0
11:28:06 PM: Total in 128 ms
11:28:06 PM: ​
11:28:06 PM: (build.command completed in 176ms)
11:28:06 PM: ​
11:28:06 PM: ────────────────────────────────────────────────────────────────
11:28:06 PM:   2. Deploy site                                                
11:28:06 PM: ────────────────────────────────────────────────────────────────
11:28:06 PM: ​
11:28:06 PM: ​
11:28:06 PM: ❯ Uploaded config
11:28:06 PM:   [context.production.environment]
11:28:06 PM:     HUGO_VERSION = "0.91.0"
11:28:06 PM: ​
11:28:06 PM: ❯ Uploaded headers
11:28:06 PM:   No headers
11:28:06 PM: ​
11:28:06 PM: ❯ Uploaded redirects
11:28:06 PM:   No redirects
11:28:06 PM: ​
11:28:06 PM: Starting to deploy site from 'public'
11:28:06 PM: Creating deploy tree 
11:28:06 PM: 0 new files to upload
11:28:06 PM: 0 new functions to upload
11:28:06 PM: Site deploy was successfully initiated
11:28:06 PM: ​
11:28:06 PM: (Deploy site completed in 221ms)
11:28:06 PM: ​
11:28:06 PM: ────────────────────────────────────────────────────────────────
11:28:06 PM:   Netlify Build Complete                                        
11:28:06 PM: ────────────────────────────────────────────────────────────────
11:28:06 PM: ​
11:28:06 PM: (Netlify Build completed in 460ms)
11:28:06 PM: Caching artifacts
11:28:06 PM: Started saving build plugins
11:28:06 PM: Finished saving build plugins
11:28:06 PM: Started saving pip cache
11:28:06 PM: Starting post processing
11:28:06 PM: Post processing - HTML
11:28:07 PM: Finished saving pip cache
11:28:07 PM: Started saving emacs cask dependencies
11:28:07 PM: Finished saving emacs cask dependencies
11:28:07 PM: Started saving maven dependencies
11:28:07 PM: Finished saving maven dependencies
11:28:07 PM: Started saving boot dependencies
11:28:07 PM: Finished saving boot dependencies
11:28:07 PM: Started saving rust rustup cache
11:28:07 PM: Finished saving rust rustup cache
11:28:07 PM: Started saving go dependencies
11:28:07 PM: Starting post processing
11:28:07 PM: Post processing - HTML
11:28:07 PM: Starting post processing
11:28:07 PM: Post processing - HTML
11:28:08 PM: Finished saving go dependencies
11:28:08 PM: Starting post processing
11:28:10 PM: Post processing - HTML
11:28:11 PM: Build script success
11:28:50 PM: Finished processing build request in 1m0.350201265s

Not sure what else to look for. Any help would be appreciated.

Thanks

According to the log, there is nothing new in this build when compared to the previous build/deploy, therefore there is nothing to deploy that isn’t already deployed.

Thanks for the reply. It’s possible I copied the log from an attempt at a redeploy and maybe that is why that’s showing. Here’s another log from a build that I just ran after making a small change in my repos. Shows one file to upload but still doesn’t deploy.

8:47:21 AM: Build ready to start
8:47:24 AM: build-image version: 73def8bb10593b9b818f44989a75ea508018ccb7 (focal)
8:47:24 AM: build-image tag: v4.5.2
8:47:24 AM: buildbot version: e07f38cea73012d29c839c78dec87335277fe704
8:47:24 AM: Fetching cached dependencies
8:47:25 AM: Starting to download cache of 232.8MB
8:47:28 AM: Finished downloading cache in 3.574448761s
8:47:28 AM: Starting to extract cache
8:47:35 AM: Finished extracting cache in 7.093544505s
8:47:35 AM: Finished fetching cache in 10.714431949s
8:47:35 AM: Starting to prepare the repo for build
8:47:36 AM: Preparing Git Reference refs/heads/master
8:47:36 AM: Parsing package.json dependencies
8:47:37 AM: Starting build script
8:47:37 AM: Installing dependencies
8:47:37 AM: Python version set to 2.7
8:47:37 AM: Started restoring cached node version
8:47:40 AM: Finished restoring cached node version
8:47:40 AM: v12.18.0 is already installed.
8:47:41 AM: Now using node v12.18.0 (npm v6.14.4)
8:47:41 AM: Started restoring cached build plugins
8:47:41 AM: Finished restoring cached build plugins
8:47:41 AM: Attempting ruby version 2.7.2, read from environment
8:47:42 AM: Using ruby version 2.7.2
8:47:43 AM: Using PHP version 8.0
8:47:43 AM: Installing Hugo 0.91.0
8:47:43 AM: hugo v0.91.0-D1DC0E9A+extended linux/amd64 BuildDate=2021-12-17T09:50:20Z VendorInfo=gohugoio
8:47:43 AM: Started restoring cached go cache
8:47:44 AM: Finished restoring cached go cache
8:47:44 AM: Installing Go version 1.14.4
8:47:44 AM: unset GOOS;
8:47:44 AM: unset GOARCH;
8:47:44 AM: export GOROOT='/opt/buildhome/.gimme_cache/versions/go1.14.4.linux.amd64';
8:47:44 AM: export PATH="/opt/buildhome/.gimme_cache/versions/go1.14.4.linux.amd64/bin:${PATH}";
8:47:44 AM: go version >&2;
8:47:44 AM: export GIMME_ENV='/opt/buildhome/.gimme_cache/env/go1.14.4.linux.amd64.env';
8:47:44 AM: go version go1.14.4 linux/amd64
8:47:44 AM: Installing missing commands
8:47:44 AM: Verify run directory
8:47:46 AM: ​
8:47:46 AM: ────────────────────────────────────────────────────────────────
8:47:46 AM:   Netlify Build                                                 
8:47:46 AM: ────────────────────────────────────────────────────────────────
8:47:46 AM: ​
8:47:46 AM: ❯ Version
8:47:46 AM:   @netlify/build 26.0.2
8:47:46 AM: ​
8:47:46 AM: ❯ Flags
8:47:46 AM:   baseRelDir: true
8:47:46 AM:   buildId: 61d2fe698b8aeb00086a1c19
8:47:46 AM:   deployId: 61d2fe698b8aeb00086a1c1b
8:47:46 AM: ​
8:47:46 AM: ❯ Current directory
8:47:46 AM:   /opt/build/repo
8:47:46 AM: ​
8:47:46 AM: ❯ Config file
8:47:46 AM:   /opt/build/repo/netlify.toml
8:47:46 AM: ​
8:47:46 AM: ❯ Context
8:47:46 AM:   production
8:47:46 AM: ​
8:47:46 AM: ────────────────────────────────────────────────────────────────
8:47:46 AM:   1. Build command from Netlify app                             
8:47:46 AM: ────────────────────────────────────────────────────────────────
8:47:46 AM: ​
8:47:46 AM: $ hugo
8:47:46 AM: Start building sites …
8:47:46 AM: hugo v0.91.0-D1DC0E9A+extended linux/amd64 BuildDate=2021-12-17T09:50:20Z VendorInfo=gohugoio
8:47:46 AM:                    | EN
8:47:46 AM: -------------------+-----
8:47:46 AM:   Pages            | 46
8:47:46 AM:   Paginator pages  |  0
8:47:46 AM:   Non-page files   |  0
8:47:46 AM:   Static files     | 36
8:47:46 AM:   Processed images |  0
8:47:46 AM:   Aliases          | 12
8:47:46 AM:   Sitemaps         |  1
8:47:46 AM:   Cleaned          |  0
8:47:46 AM: Total in 108 ms
8:47:46 AM: ​
8:47:46 AM: (build.command completed in 175ms)
8:47:46 AM: ​
8:47:46 AM: ────────────────────────────────────────────────────────────────
8:47:46 AM:   2. Deploy site                                                
8:47:46 AM: ────────────────────────────────────────────────────────────────
8:47:46 AM: ​
8:47:46 AM: Starting to deploy site from 'public'
8:47:46 AM: Creating deploy tree 
8:47:47 AM: Creating deploy upload records
8:47:47 AM: 1 new files to upload
8:47:47 AM: 0 new functions to upload
8:47:47 AM: Site deploy was successfully initiated
8:47:47 AM: ​
8:47:47 AM: (Deploy site completed in 421ms)
8:47:47 AM: ​
8:47:47 AM: ────────────────────────────────────────────────────────────────
8:47:47 AM:   Netlify Build Complete                                        
8:47:47 AM: ────────────────────────────────────────────────────────────────
8:47:47 AM: ​
8:47:47 AM: (Netlify Build completed in 639ms)
8:47:47 AM: Starting post processing
8:47:47 AM: Caching artifacts
8:47:47 AM: Started saving build plugins
8:47:47 AM: Finished saving build plugins
8:47:47 AM: Started saving pip cache
8:47:47 AM: Post processing - HTML
8:47:47 AM: Finished saving pip cache
8:47:47 AM: Started saving emacs cask dependencies
8:47:47 AM: Finished saving emacs cask dependencies
8:47:47 AM: Started saving maven dependencies
8:47:47 AM: Finished saving maven dependencies
8:47:47 AM: Started saving boot dependencies
8:47:47 AM: Finished saving boot dependencies
8:47:47 AM: Started saving rust rustup cache
8:47:47 AM: Finished saving rust rustup cache
8:47:48 AM: Started saving go dependencies
8:47:48 AM: Starting post processing
8:47:48 AM: Post processing - HTML
8:47:48 AM: Starting post processing
8:47:48 AM: Post processing - HTML
8:47:48 AM: Starting post processing
8:47:48 AM: Post processing - HTML
8:47:49 AM: Starting post processing
8:47:49 AM: Post processing - HTML
8:47:49 AM: Finished saving go dependencies
8:47:49 AM: Build script success
8:48:31 AM: Finished processing build request in 1m7.103226045s

I’ve done several clear cache builds too and that doesn’t seem to help.

Also, here’s the deploy failure notice if that help.

image

howdy @tmhudg - can you try something for me? I’d like you to try turning off asset optimization in our UI settings and then redeploy - we have the hunch that there is maybe some kind of syntax or code error in your CSS or HTML files, which is why our build process stalls when we attempt to optimize these.

switching off asset optimization should give you a working deploy (please let me know if it does not) and then you can troubleshoot your code.

Hi @Perry ,

I saw that suggestion in the troubleshooting docs and checked. Asset optimization is already off.

I’m thinking this has something to do with forms processing (the other thing that I changed when I updated bootstrap). When I switched to bs5, my forms weren’t displaying properly (the inline radio buttons were overlaying each other) so I did a bit of fiddling with styles and structure inside the form element to get it to work.

Today I branched my code and backed out the commits to before the bs upgrade and created a new site based on that branch and it worked. Then I added my BS updates (without the form changes) and that worked too.

The only other changes are the form changes. I got rid of the label element that wrapped the input fields and I’m wondering if that is causing the problems. Also, I know that I had an extra .html file that had a duplicate form as another page. That was a Hugo partial though that doesn’t actually get built (nothing refers to it). Do you still parse the .html files in the repo to look for forms or just in the built files?

Anyway, I deleted that file in the main branch and it still doesn’t deploy… Argh.

Thanks for your help on this.

1 Like

Found it!

Stupid mistake of course.

So, when I was fixing my form elements for bs5 I happened to notice that, in looping over the radio button options, I was giving the same id value to each of the options. To quickly fix this, I just added the text value of the option to the id attribute - not realizing that some of the text values had spaces in them. I guess this doesn’t cause a problem on local build/runs but borks up the Netlify forms parsing process.

I see now that the build logs show the forms processing when things work and don’t show any forms processing when it is failing (but don’t indicate any problems - they just don’t appear). I vaguely recall wondering about this but I think I figured it wasn’t re-doing them because they were cached or whatever. Now I’ll know to look for them explicitly.

So, my fault (which it was always going to be of course) for messing up the html. Maybe there could be a bit more diagnostics on form parsing errors though to make finding things like this a little easier to find.

Thanks the help.

1 Like

glad you found the culprit, and great summary @tmhudg !