Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transferring an empty file may close the connection prematurely #412

Open
chsxf opened this issue Aug 6, 2023 · 1 comment
Open

Transferring an empty file may close the connection prematurely #412

chsxf opened this issue Aug 6, 2023 · 1 comment

Comments

@chsxf
Copy link

chsxf commented Aug 6, 2023

Bug Description
The transfer of an empty file closes the connection prematurely.
The file Empty.twig was previously empty. By adding a commented content, the action went through. This has been reproduced many times.

My Action Config

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]
  workflow_dispatch:
    inputs:
      logLevel:
        description: ''

permissions:
  contents: read

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - name: Checkout
      uses: actions/checkout@v3

    - name: Install dependencies
      run: composer install --prefer-dist --no-progress

    - name: Deploy via FTP
      uses: SamKirkland/[email protected]
      with:
        server: ftp.webmo.fr
        username: ${{ secrets.ftp_username }}
        password: ${{ secrets.ftp_password }}
        protocol: ftps
        server-dir: analytics/
        exclude: |
          **/.git*
          **/.git*/**
          **/secrets.php

My Action Log

Many other files before that that were uploaded successfully
...
 uploading "vendor/chsxf/mfx/src/templates/Empty.twig"

----------------------------------------------------------------
--------------  🔥🔥🔥 an error occurred  🔥🔥🔥  --------------
----------------------------------------------------------------

----------------------------------------------------------------
----------------------  full error below  ----------------------
----------------------------------------------------------------

Error: Server sent FIN packet unexpectedly, closing connection.
    at TLSSocket.<anonymous> (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/v4.3.4/dist/index.js:5098:56)
    at TLSSocket.emit (node:events:539:35)
    at endReadableNT (node:internal/streams/readable:1345:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
Error: Error: Server sent FIN packet unexpectedly, closing connection.
@petres
Copy link

petres commented Apr 30, 2024

I also get an error when I try uploading empty files,
most probably that's because of an integrity check after uploading files, which fails because the file is empty.

Error:

400 level error from server when performing action - retrying...
FTPError: 425 Unable to build data connection: Operation not permitted
    at FTPContext._onControlSocketData (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/v4.3.5/dist/index.js:5263:39)
    at TLSSocket.<anonymous> (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/v4.3.5/dist/index.js:5107:44)
    at TLSSocket.emit (node:events:514:28)
    at addChunk (node:internal/streams/readable:376:12)
    at readableAddChunk (node:internal/streams/readable:345:11)
    at Readable.push (node:internal/streams/readable:286:10)
    at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23) {
  code: 425
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants