SamKirkland / FTP-Deploy-Action

Deploys a GitHub project to a FTP server using GitHub actions
MIT License
3.77k stars 371 forks source link

FTPError: 451-Error during read from data connection error. #432

Closed Mrbeyond closed 8 months ago

Mrbeyond commented 8 months ago

Bug Description I keep getting FTPError: 451-Error during read from data connection error. Even though some files would be sent to the server already but not all the files.

My Action Config


name: Staging build
on: 
  push:
    branches:
      - 'main'
jobs:
  production:
    runs-on: ubuntu-latest
    steps:
      - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."

      - name: Check out repository code
        uses: actions/checkout@v3

      - name: add node and deploy
        uses: actions/setup-node@v3
        with:
          node-version: '18'
          cache: npm

      - name: Install Dependencies
        run: npm install  &&  npx playwright install 

      - name: Test App
        id: unit-test
        run: npm run test

      - name:  Build checker
        if: steps.unit-test.outputs.exit_status != 0
        run: exit 1

      - name: Check cache
        run: echo ${{ steps.cache-nodemodules.outputs.cache-hit }}

      - name: Build
        id: build-step
        run: |
          npm run build 

      - name:  Build checker
        if: steps.build-step.outputs.exit_status != 0
        run: exit 1

      - name: 📂 Sync  and deploy files
        id: ftp-step
        uses: SamKirkland/FTP-Deploy-Action@4.3.0
        with:
          server: ${{ secrets.FTP_SERVER }}
          username: ${{ secrets.FTP_USERNAME }}
          password: ${{ secrets.FTP_PASSWORD }}
          protocol: ftps
          port: ${{ secrets.FTP_PORT }}
          local-dir: ./build/

      - name:  Deploy checker
        if: steps.ftp-step.outputs.exit_status != 0
        run: exit 1

      - run: echo "🍏 This job's status is ${{ job.status }}."

My Action Log


FTPError: 451-Error during read from data connection
451-Transfer aborted
451 0.290 seconds (measured here), 110.23 Kbytes per second
    at FTPContext._onControlSocketData (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.3.0/dist/index.js:4774:39)
    at TLSSocket.<anonymous> (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.3.0/dist/index.js:4615:44)
    at TLSSocket.emit (node:events:513:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:285:11)
    at TLSSocket.Readable.push (node:internal/streams/readable:228:10)
    at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23) {
  code: 451
}
Error: FTPError: 451-Error during read from data connection
451-Transfer aborted
451 0.290 seconds (measured here), 110.23 Kbytes per second
Mrbeyond commented 8 months ago

I have nailed the issue down to error from protocol.

When I remove protocol ftps it works fine.