Failed during stage 'deploying site'

Briefly summarize the issues you have been experiencing.

Hi~

I created a function and it built failed while uploading the function file.

failed during stage 'deploying site': Failed to execute deploy: [PUT /deploys/{deploy_id}/functions/{name}][422] uploadDeployFunction default  &{Code:0 Message:}
Failed to upload file: &{Name:submission-created Sum:939533772b5542591d10c3667130496f92deeba4e48f0310e7c5912503660371 Runtime:js Size:<nil> Path: Buffer:0xc0004a0000}

Here is the entire log:

4:08:00 PM: Build ready to start
4:08:07 PM: build-image version: 9e0f207a27642d0115b1ca97cd5e8cebbe492f63
4:08:07 PM: build-image tag: v3.3.2
4:08:07 PM: buildbot version: 75cd99f62ada9e21edea53208e8baf0eab85a045
4:08:07 PM: Fetching cached dependencies
4:08:07 PM: Starting to download cache of 224.8MB
4:08:09 PM: Finished downloading cache in 1.592147393s
4:08:09 PM: Starting to extract cache
4:08:14 PM: Finished extracting cache in 4.878284024s
4:08:14 PM: Finished fetching cache in 6.546646856s
4:08:14 PM: Starting to prepare the repo for build
4:08:14 PM: Preparing Git Reference refs/heads/master
4:08:15 PM: Creating functions prep folder
4:08:15 PM: Starting build script
4:08:15 PM: Installing dependencies
4:08:16 PM: Started restoring cached node version
4:08:18 PM: Finished restoring cached node version
4:08:19 PM: v10.16.0 is already installed.
4:08:20 PM: Now using node v10.16.0 (npm v6.9.0)
4:08:21 PM: Attempting ruby version 2.6.2, read from environment
4:08:22 PM: Using ruby version 2.6.2
4:08:22 PM: Using PHP version 5.6
4:08:22 PM: Started restoring cached ruby gems
4:08:22 PM: Finished restoring cached ruby gems
4:08:22 PM: Started restoring cached node modules
4:08:22 PM: Finished restoring cached node modules
4:08:22 PM: Installing NPM modules using NPM version 6.9.0
4:08:28 PM: npm
4:08:28 PM:  notice created a lockfile as package-lock.json. You should commit this file.
4:08:28 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
4:08:28 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
4:08:28 PM: added 1 package from 1 contributor and audited 11232 packages in 4.445s
4:08:28 PM: found 0 vulnerabilities
4:08:28 PM: NPM modules installed
4:08:29 PM: Started restoring cached go cache
4:08:29 PM: Finished restoring cached go cache
4:08:29 PM: unset GOOS;
4:08:29 PM: unset GOARCH;
4:08:29 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
4:08:29 PM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
4:08:29 PM: go version >&2;
4:08:29 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';
4:08:29 PM: go version go1.12 linux/amd64
4:08:29 PM: Installing missing commands
4:08:29 PM: Verify run directory
4:08:29 PM: Executing user command: jekyll build
4:08:29 PM: Configuration file: /opt/build/repo/_config.yml
4:08:29 PM:             Source: /opt/build/repo
4:08:29 PM:        Destination: /opt/build/repo/_site
4:08:29 PM:  Incremental build: disabled. Enable with --incremental
4:08:29 PM:       Generating...
4:08:34 PM:                     done in 4.67 seconds.
4:08:34 PM:  Auto-regeneration: disabled. Use --watch to enable.
4:08:34 PM: Function Dir: /opt/build/repo/functions
4:08:34 PM: TempDir: /tmp/zisi-283404172
4:08:35 PM: Prepping functions with zip-it-and-ship-it 0.3.1
4:08:36 PM: [ { path: '/tmp/zisi-283404172/submission-created.zip',
4:08:36 PM:     runtime: 'js' } ]
4:08:36 PM: Prepping functions complete
4:08:36 PM: Caching artifacts
4:08:36 PM: Started saving ruby gems
4:08:36 PM: Finished saving ruby gems
4:08:36 PM: Started saving node modules
4:08:36 PM: Finished saving node modules
4:08:36 PM: Started saving pip cache
4:08:36 PM: Finished saving pip cache
4:08:36 PM: Started saving emacs cask dependencies
4:08:36 PM: Finished saving emacs cask dependencies
4:08:36 PM: Started saving maven dependencies
4:08:36 PM: Finished saving maven dependencies
4:08:36 PM: Started saving boot dependencies
4:08:36 PM: Finished saving boot dependencies
4:08:36 PM: Started saving go dependencies
4:08:36 PM: Finished saving go dependencies
4:08:36 PM: Build script success
4:08:36 PM: Starting to deploy site from '_site/'
4:08:36 PM: Creating deploy tree 
4:08:37 PM: 34 new files to upload
4:08:37 PM: 1 new functions to upload
4:11:57 PM: failed during stage 'deploying site': Failed to execute deploy: [PUT /deploys/{deploy_id}/functions/{name}][422] uploadDeployFunction default  &{Code:0 Message:}
4:11:57 PM: Failed to upload file: &{Name:submission-created Sum:939533772b5542591d10c3667130496f92deeba4e48f0310e7c5912503660371 Runtime:js Size:<nil> Path: Buffer:0xc0004a0000}
4:11:57 PM: Shutting down logging, 2 messages pending

Please provide a link to your live site hosted on Netlify

Site: http://erl.im/

Repo: https://github.com/erlzhang/persephone

What have you tried as far as troubleshooting goes? Do you have an idea what is causing the problem?

Maybe the function file is over-sized(215kb)?

I tried a new simple function and it still failed. It’s not the problem with the file size.

Hi @erlzhang,

Sorry to hear about the trouble you’re having! I tried repeating your last failed build but it said there was no directory called functions, do you have a branch that still has your function in it? if so, can you please share it? Also, did you previously have environment variables that you’ve since removed?

Thank you for replying.

After failing so many times, I decided to stop and remove the functions yesterday. However, I tried again today and it works! Maybe there was something wrong with the configs before.

Anyway, thank your. And sorry for my poor English.

1 Like

glad you got it figured out! If you have any more issues, come on back and start a new topic :slight_smile: