shallwefootball / upload-s3-action

github action for upload to S3 ☁️
https://github.com/marketplace/actions/upload-s3
166 stars 158 forks source link

Error for a an upload with many files #19

Open kvz opened 4 years ago

kvz commented 4 years ago

image

kittaakos commented 4 years ago

I do not know if my error is related or not, but I cannot upload artifacts from a directory:

##[error]AccessDenied: Access Denied
/home/runner/work/_actions/shallwefootball/upload-s3-action/v1.1.2/dist/index.js:6786
            throw err;
            ^

Error [TypeError]: Cannot read property 'Key' of undefined
    at ManagedUpload.callback (/home/runner/work/_actions/shallwefootball/upload-s3-action/v1.1.2/dist/index.js:2459:36)
    at Response.finishSinglePart (/home/runner/work/_actions/shallwefootball/upload-s3-action/v1.1.2/dist/index.js:20929:28)
    at Request.<anonymous> (/home/runner/work/_actions/shallwefootball/upload-s3-action/v1.1.2/dist/index.js:7124:18)
    at Request.callListeners (/home/runner/work/_actions/shallwefootball/upload-s3-action/v1.1.2/dist/index.js:11458:20)
    at Request.emit (/home/runner/work/_actions/shallwefootball/upload-s3-action/v1.1.2/dist/index.js:11430:10)
    at Request.emit (/home/runner/work/_actions/shallwefootball/upload-s3-action/v1.1.2/dist/index.js:7443:14)
    at Request.transition (/home/runner/work/_actions/shallwefootball/upload-s3-action/v1.1.2/dist/index.js:6777:10)
    at AcceptorStateMachine.runTo (/home/runner/work/_actions/shallwefootball/upload-s3-action/v1.1.2/dist/index.js:14564:12)
    at /home/runner/work/_actions/shallwefootball/upload-s3-action/v1.1.2/dist/index.js:14576:10
    at Request.<anonymous> (/home/runner/work/_actions/shallwefootball/upload-s3-action/v1.1.2/dist/index.js:6793:9) {
  message: "Cannot read property 'Key' of undefined",
  code: 'TypeError',
  time: 2020-08-24T13:08:10.240Z

Version: v1.1.2

kvz commented 4 years ago

Was able to workaround this via:

      - name: Upload to S3
        run: |
          aws s3 sync --region us-east-1 --acl public-read ./_site/ s3://mybucket.example.com
        env:
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}        
macobo commented 4 years ago

Can confirm, same issue occurred for me for uploading a directory with a single file.

chenghuang-mdsol commented 3 years ago

same error, was uploading 12 files in a folder. Can't use this action anymore