With Packer, received 400 bad request while uploading box to Vagrant Cloud

Hi.

I tried to upload vagrant box which generated with Packer to Vagrant Cloud.
But it was failed with an error being responded with a status code 400 bad request by Vagrant Cloud.

I reproduced again with taking a log, I couldn’t figure out the cause.

Could you help me to research the cause and resolve this issue?

I will show a part of the log of around the error.


2021/01/23 15:15:16 packer.exe plugin: Post-Processor Vagrant Cloud API Response:
2021/01/23 15:15:16 packer.exe plugin:
2021/01/23 15:15:16 packer.exe plugin: &{Status:200 OK StatusCode:200 Proto:HTTP/1.1 ProtoMajor:1 ProtoMinor:1 Header:map[Cache-Control:[max-age=0, private, must-revalidate] Connection:[keep-alive] Content-Type:[application/json; charset=utf-8] Date:[Sat, 23 Jan 2021 06:15:14 GMT] Etag:[W/“e83a6c51673e25edfaa24ba1177eea6b”] Referrer-Policy:[strict-origin-when-cross-origin] Server:[Cowboy] Set-Cookie:[_atlas_session_data=SmZ1ZlZZcjlsVjk0UUNDZDhUZksrdlg2eDg3Sy9ycWw4WEptZkZYRit0Tm5QTjFkcEZuZVFtdVdYK2tLQ3E3R01BbC8yM1BRVkhCazNBL3VBdXROd0E9PS0tSCs3OEhNU3B1V20wOExCQU14eUU2QT09–dc49d27499771011e5b1f46d32076793c519d286; path=/; expires=Mon, 22 Feb 2021 06:15:15 GMT; secure; HttpOnly] Strict-Transport-Security:[max-age=31536000; includeSubDomains; preload] Via:[1.1 vegur] X-Content-Type-Options:[nosniff] X-Download-Options:[noopen] X-Frame-Options:[SAMEORIGIN] X-Permitted-Cross-Domain-Policies:[none] X-Request-Id:[d67ca8a3-4b54-4836-aca3-2731a8e69ddf] X-Runtime:[0.359545] X-Vagrantcloud-Rate-Limit:[96/100] X-Xss-Protection:[1; mode=block]] Body:0xc000952140 ContentLength:-1 TransferEncoding:[chunked] Close:false Uncompressed:false Trailer:map Request:0xc0000e9000 TLS:0xc000900580}
2021/01/23 15:15:16 ui: ==> hyperv-vmcx (vagrant-cloud): Uploading box: windows10_vs2017_hyperv.box
2021/01/23 15:15:16 ui: hyperv-vmcx (vagrant-cloud): Depending on your internet connection and the size of the box,
hyperv-vmcx (vagrant-cloud): this may take some time
2021/01/23 15:15:16 ui: hyperv-vmcx (vagrant-cloud): Uploading box
2021/01/23 15:15:16 packer.exe plugin: Post-Processor Vagrant Cloud API Direct Upload: windows10_vs2017_hyperv.box https://vagrantcloud-files-production.s3.amazonaws.com/archivist/boxes/4ee60d2d-3f3e-4a6d-9e1a-6849093dfb0a?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIAIA4WZ7ZDX3WM4HDQ%2F20210123%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210123T061515Z&X-Amz-Expires=60&X-Amz-SignedHeaders=host&X-Amz-Signature=cf0840239415ed5ef651c96031031482c9c185cb43805dbb07763a87476f9b45
2021/01/23 15:15:21 packer.exe plugin: Post-Processor Vagrant Cloud Direct Upload Response:
2021/01/23 15:15:21 packer.exe plugin:
2021/01/23 15:15:21 packer.exe plugin: &{Status:400 Bad Request StatusCode:400 Proto:HTTP/1.1 ProtoMajor:1 ProtoMinor:1 Header:map[Content-Type:[application/xml] Date:[Sat, 23 Jan 2021 06:15:18 GMT] Server:[AmazonS3] X-Amz-Id-2:[ZU/9OKSf+6jvBUPxqUBxYT71aocuuaR8Q/RO3cgMwBgKp7RqFOQFcd21eYQzvgbUCHICdDBdprg=] X-Amz-Request-Id:[25997106A8EEF02F]] Body:0xc00065c5c0 ContentLength:-1 TransferEncoding:[chunked] Close:true Uncompressed:false Trailer:map Request:0xc000a7e300 TLS:0xc0007980b0}
2021/01/23 15:15:21 packer.exe plugin: bad HTTP status: 400
2021/01/23 15:15:21 ui: hyperv-vmcx (vagrant-cloud): Error uploading box! Will retry in 10 seconds. Status: 400
2021/01/23 15:15:21 packer.exe plugin: Retryable error: bad HTTP status: 400
2021/01/23 15:15:31 ui: hyperv-vmcx (vagrant-cloud): Uploading box
2021/01/23 15:15:31 packer.exe plugin: Post-Processor Vagrant Cloud API Direct Upload: windows10_vs2017_hyperv.box https://vagrantcloud-files-production.s3.amazonaws.com/archivist/boxes/4ee60d2d-3f3e-4a6d-9e1a-6849093dfb0a?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIAIA4WZ7ZDX3WM4HDQ%2F20210123%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210123T061515Z&X-Amz-Expires=60&X-Amz-SignedHeaders=host&X-Amz-Signature=cf0840239415ed5ef651c96031031482c9c185cb43805dbb07763a87476f9b45
2021/01/23 15:15:37 packer.exe plugin: Post-Processor Vagrant Cloud Direct Upload Response:
2021/01/23 15:15:37 packer.exe plugin:
2021/01/23 15:15:37 packer.exe plugin: &{Status:400 Bad Request StatusCode:400 Proto:HTTP/1.1 ProtoMajor:1 ProtoMinor:1 Header:map[Content-Type:[application/xml] Date:[Sat, 23 Jan 2021 06:15:34 GMT] Server:[AmazonS3] X-Amz-Id-2:[IWKZL4Tkx/4hyF3xzYJA5zlhHTLakznkiUJ58RBZkhk8tzb/SpK5/n7vFVEyyP9859WEeNOOZeE=] X-Amz-Request-Id:[EE21937723E1FA06]] Body:0xc00065c480 ContentLength:-1 TransferEncoding:[chunked] Close:true Uncompressed:false Trailer:map Request:0xc000394200 TLS:0xc000798210}
2021/01/23 15:15:37 packer.exe plugin: bad HTTP status: 400
2021/01/23 15:15:37 ui: hyperv-vmcx (vagrant-cloud): Error uploading box! Will retry in 10 seconds. Status: 400
2021/01/23 15:15:37 packer.exe plugin: Retryable error: bad HTTP status: 400
2021/01/23 15:15:47 ui: hyperv-vmcx (vagrant-cloud): Uploading box
2021/01/23 15:15:47 packer.exe plugin: Post-Processor Vagrant Cloud API Direct Upload: windows10_vs2017_hyperv.box https://vagrantcloud-files-production.s3.amazonaws.com/archivist/boxes/4ee60d2d-3f3e-4a6d-9e1a-6849093dfb0a?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIAIA4WZ7ZDX3WM4HDQ%2F20210123%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210123T061515Z&X-Amz-Expires=60&X-Amz-SignedHeaders=host&X-Amz-Signature=cf0840239415ed5ef651c96031031482c9c185cb43805dbb07763a87476f9b45
2021/01/23 15:15:52 packer.exe plugin: Post-Processor Vagrant Cloud Direct Upload Response:
2021/01/23 15:15:52 packer.exe plugin:
2021/01/23 15:15:52 packer.exe plugin: &{Status:400 Bad Request StatusCode:400 Proto:HTTP/1.1 ProtoMajor:1 ProtoMinor:1 Header:map[Content-Type:[application/xml] Date:[Sat, 23 Jan 2021 06:15:49 GMT] Server:[AmazonS3] X-Amz-Id-2:[cnhrFv62A/a+jKWL840REsnVt3MWJWX+XJohfffURtikLRJlWMeTNYsUw3cRcb42SQKYlt6/6XA=] X-Amz-Request-Id:[ASBMEP6RCR1YCG0P]] Body:0xc00065c900 ContentLength:-1 TransferEncoding:[chunked] Close:true Uncompressed:false Trailer:map Request:0xc000394d00 TLS:0xc000798420}
2021/01/23 15:15:52 packer.exe plugin: bad HTTP status: 400
2021/01/23 15:15:52 ui: hyperv-vmcx (vagrant-cloud): Error uploading box! Will retry in 10 seconds. Status: 400
2021/01/23 15:15:52 packer.exe plugin: Retryable error: bad HTTP status: 400
2021/01/23 15:16:02 ui: ==> hyperv-vmcx (vagrant-cloud): Cleaning up provider
2021/01/23 15:16:02 ui: hyperv-vmcx (vagrant-cloud): Deleting provider: hyperv
2021/01/23 15:16:02 packer.exe plugin: Post-Processor Vagrant Cloud API DELETE: https://vagrantcloud.com/api/v1/box/ymasuda/windows10_eclipse/version/20210123.0.0/provider/hyperv
2021/01/23 15:16:03 packer.exe plugin: Post-Processor Vagrant Cloud API Response:
2021/01/23 15:16:03 packer.exe plugin:
2021/01/23 15:16:03 packer.exe plugin: &{Status:200 OK StatusCode:200 Proto:HTTP/1.1 ProtoMajor:1 ProtoMinor:1 Header:map[Cache-Control:[max-age=0, private, must-revalidate] Connection:[keep-alive] Content-Type:[application/json; charset=utf-8] Date:[Sat, 23 Jan 2021 06:16:01 GMT] Etag:[W/“c7f2477ce9ed69852b8bd2d4262f8c5a”] Referrer-Policy:[strict-origin-when-cross-origin] Server:[Cowboy] Set-Cookie:[_atlas_session_data=QkVlUTZtUk9JOEt2MWM4dFljd3BHNFpJUGpOaitiazBJcnk1emZFeDNLUllIb2JyYlhYK2w2bDlKeGFSTzQ5ek9pRmRFMzdzR2tsYmUxWEs2M2trRnc9PS0tTzgwck5OdHQvMWJIN1laMU5Yekg4UT09–b0ed7dbd9ad1752e4b6a99f35d2c7154a0e002ad; path=/; expires=Mon, 22 Feb 2021 06:16:01 GMT; secure; HttpOnly] Strict-Transport-Security:[max-age=31536000; includeSubDomains; preload] Via:[1.1 vegur] X-Content-Type-Options:[nosniff] X-Download-Options:[noopen] X-Frame-Options:[SAMEORIGIN] X-Permitted-Cross-Domain-Policies:[none] X-Request-Id:[86fabb9c-dc03-40e0-a0ac-d39254713f29] X-Runtime:[0.189193] X-Vagrantcloud-Rate-Limit:[99/100] X-Xss-Protection:[1; mode=block]] Body:0xc0003104c0 ContentLength:-1 TransferEncoding:[chunked] Close:false Uncompressed:false Trailer:map Request:0xc000a7e000 TLS:0xc00051db80}
2021/01/23 15:16:03 packer.exe plugin: error: retry count exhausted. Last err: bad HTTP status: 400
2021/01/23 15:16:03 [INFO] (telemetry) ending vagrant-cloud
2021/01/23 15:16:03 Deleting original artifact for build ‘hyperv-vmcx’
2021/01/23 15:16:03 ui error: Build ‘hyperv-vmcx’ errored after 46 minutes 39 seconds: 1 error(s) occurred:

The packer version and platform:
Packer: 1.6.6
Vagrant: 2.2.14
Windows10 Professional (20H2)

I will be grateful for any help you can provide.

Best regards,

Yusuke