Cloudflare pages build suddenly failed

Hi all,

My pages just stopped builiding last night and fails with the error: ERROR Unable to get remote resource. I have put the full log below.

I have tried re-deploying as well as setting the hugo variable to use a newer version of hugo, however unsure why it’s stopped.

08:03:43.006	Cloning repository...
08:03:46.147	From https://github.com/bloodstiller/bloodstiller.com
08:03:46.150	 * branch            2d5ce52ec03db30b04a31aa921adac4506312149 -> FETCH_HEAD
08:03:46.151	
08:03:46.835	HEAD is now at 2d5ce52 automation update
08:03:46.836	
08:03:48.169	Submodule 'themes/dark-theme-editor' (https://github.com/JingWangTW/dark-theme-editor.git) registered for path 'themes/dark-theme-editor'
08:03:48.169	Cloning into '/opt/buildhome/clone/themes/dark-theme-editor'...
08:03:48.169	From https://github.com/JingWangTW/dark-theme-editor
08:03:48.169	 * branch            7a65fb42fcc1b648c1fe2c839c7c819604392ec1 -> FETCH_HEAD
08:03:48.169	Submodule path 'themes/dark-theme-editor': checked out '7a65fb42fcc1b648c1fe2c839c7c819604392ec1'
08:03:48.170	
08:03:48.170	Using v2 root directory strategy
08:03:48.200	Success: Finished cloning repository files
08:03:49.864	Checking for configuration in a wrangler.toml configuration file (BETA)
08:03:49.865	
08:03:49.962	No wrangler.toml file found. Continuing.
08:03:50.480	Detected the following tools from environment: hugo@extended_0.136.4
08:03:50.481	Installing hugo extended_0.136.4
08:03:50.626	* Downloading hugo release extended_0.136.4...
08:03:52.572	hugo extended_0.136.4 installation was successful!
08:03:52.942	Executing user command: hugo
08:03:53.212	Start building sites … 
08:03:53.213	hugo v0.136.4-099b05a63c5f66d433f679299aed48f2080d677b+extended linux/amd64 BuildDate=2024-10-22T08:35:58Z VendorInfo=gohugoio
08:03:53.213	
08:03:53.693	ERROR Unable to get remote resource.
08:03:53.893	Total in 685 ms
08:03:53.894	Error: error building site: logged 1 error(s)
08:03:53.901	Failed: Error while executing user command. Exited with error code: 1
08:03:53.912	Failed: build command exited with code: 1
08:03:54.702	Failed: error occurred while running build command

Just to add I can see that it says ERROR Unable to get remote resource. however when I build locally everything passes?

Have a look at content/Tools/ldapire.md in your repo, line 46:

{{< ghcode "https://raw.githubusercontent.com/bloodstiller/ldapire/refs/heads/main/ldapChecker.py" >}}

The file ldapChecker.py passed as unnamed parameter to shortcode ghcode does not exist in your repo (any more!?).

That’s why you are seeing the error message thrown from the shortcode:

ERROR Unable to get remote resource.

If you run hugo server --logLevel info, the error message is more verbose (but not really clear either):

Error: error building site: process: readAndProcessContent: "/home/xxx/bloodstiller.com/content/Tools/AutomatingQemuKaliVM.md:40:1": failed to extract shortcode: template for shortcode "ghcode" not found

Hope that helps!

1 Like

Thank you for this & taking the time to make the pull request. I’m really grateful.

It would help if you ran hugo with --logLevel debug to get more information about where the failure occurs. It will probably show @deining’s find. For CI and deployment scripts adding some debugging is always good.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.