FTP-Deploy-Action icon indicating copy to clipboard operation
FTP-Deploy-Action copied to clipboard

550 assets: No such file or directory

Open biel-correa opened this issue 1 year ago • 10 comments

Bug Description I can't understand this error, I don't know what folder it's talking about. I'm using to deploy Angular. Note: My current ftp deploy folder is not empty

My Action Config

name: Deploy Front-end

on:
  push:
    branches:
      - main

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Setup Node.js
        uses: actions/setup-node@v2
        with:
          node-version: 16

      - name: Install dependencies
        run: npm install
        working-directory: ./web

      - name: Run tests
        run: npm run test:headless
        working-directory: ./web

      - name: Build
        run: npm run build:prod
        working-directory: ./web

      - name: Deploy
        if: success()
        uses: SamKirkland/[email protected]
        with:
          local-dir: ./web/dist/web/
          server-dir: /home/website-name/www/
          server: ftp.my-website.net
          username: user
          password: ${{ secrets.FTP_FRONTEND_PASSWORD }}

My Action Log

Run SamKirkland/[email protected]
  
----------------------------------------------------------------
🚀 Thanks for using ftp-deploy. Let's deploy some stuff!   
----------------------------------------------------------------
If you found this project helpful, please support it
by giving it a ⭐ on Github --> https://github.com/SamKirkland/FTP-Deploy-Action
or add a badge 🏷️ to your projects readme --> https://github.com/SamKirkland/FTP-Deploy-Action#badge
----------------------------------------------------------------
No file exists on the server "/home/curriculos/www/.ftp-deploy-sync-state.json" - this must be your first publish! 🎉
The first publish will take a while... but once the initial sync is done only differences are published!
If you get this message and its NOT your first publish, something is wrong.
----------------------------------------------------------------
Local Files:	14
Server Files:	0
----------------------------------------------------------------
Calculating differences between client & server
----------------------------------------------------------------
📁 Create: assets
📁 Create: assets/img
📁 Create: assets/styles
📄 Upload: 3rdpartylicenses.txt
📄 Upload: assets/img/logo.svg
📄 Upload: assets/styles/mixins.scss
📄 Upload: assets/styles/theme.scss
📄 Upload: favicon.ico
📄 Upload: index.html
📄 Upload: main.99ae500d4d3fed9f.js
📄 Upload: polyfills.7c01011[8](https://github.com/biel-correa/meucv/runs/7933357591?check_suite_focus=true#step:7:8)a34363[8](https://github.com/biel-correa/meucv/runs/7933357591?check_suite_focus=true#step:7:9)e.js
📄 Upload: runtime.557def03c21605fb.js
📄 Upload: scripts.013b4bc5d63100ec.js
📄 Upload: styles.c07e23c6744a6[9](https://github.com/biel-correa/meucv/runs/7933357591?check_suite_focus=true#step:7:10)ac.css
----------------------------------------------------------------
Making changes to 14 files/folders to sync server state
Uploading: 1.03 MB -- Deleting: 0 B -- Replacing: 0 B
----------------------------------------------------------------
creating folder "assets/"

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

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

FTPError: 550 assets: No such file or directory
    at FTPContext._onControlSocketData (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.3.0/dist/index.js:4774:39)
    at Socket.<anonymous> (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.3.0/dist/index.js:4615:44)
    at Socket.emit (events.js:314:20)
    at addChunk (_stream_readable.js:297:12)
    at readableAddChunk (_stream_readable.js:268:11)
    at Socket.Readable.push (_stream_readable.js:213:[10](https://github.com/biel-correa/meucv/runs/7933357591?check_suite_focus=true#step:7:11))
    at TCP.onStreamRead (internal/stream_base_commons.js:[18](https://github.com/biel-correa/meucv/runs/7933357591?check_suite_focus=true#step:7:19)8:[23](https://github.com/biel-correa/meucv/runs/7933357591?check_suite_focus=true#step:7:24)) {
  code: 5[50](https://github.com/biel-correa/meucv/runs/7933357591?check_suite_focus=true#step:7:51)
}
Error: FTPError: [55](https://github.com/biel-correa/meucv/runs/7933357591?check_suite_focus=true#step:7:56)0 assets: No such file or directory

biel-correa avatar Aug 20 '22 18:08 biel-correa

Today I tested with your npm package and it worked, the command I used was. ftp-deploy --server ftp.my-website.net --username user --password mypass --local-dir ./dist/web/ I ran it inside the web folder described in My Action Config's local-dir and worked just fine, after that I tryed running workflow without server-dir since the package worked but got the same error. One thing that I noticed is that the package created the file .ftp-deploy-sync-state.json but the workflow error still shows this message:

----------------------------------------------------------------
No file exists on the server "/home/curriculos/www/.ftp-deploy-sync-state.json" - this must be your first publish! 🎉
The first publish will take a while... but once the initial sync is done only differences are published!
If you get this message and its NOT your first publish, something is wrong.
----------------------------------------------------------------

biel-correa avatar Aug 21 '22 21:08 biel-correa

@biel-correa can you view the server and tell me where your .ftp-deploy-sync-state.json file is located on the server?

SamKirkland avatar Aug 21 '22 21:08 SamKirkland

@biel-correa can you view the server and tell me where your .ftp-deploy-sync-state.json file is located on the server?

it is inside www which is the folder filezilla opens right after login.

biel-correa avatar Aug 21 '22 21:08 biel-correa

@SamKirkland is there a verbose config that I could use to view more details?

biel-correa avatar Aug 21 '22 21:08 biel-correa

You can set log-level to verbose

SamKirkland avatar Aug 21 '22 23:08 SamKirkland

@SamKirkland I ran it like this now:

- name: Deploy
    if: success()
    uses: SamKirkland/[email protected]
    with:
        server: ftp.my-website.net
        username: user
        password: ${{ secrets.FTP_FRONTEND_PASSWORD }}
        local-dir: ./web/dist/web/
        server-dir: ./www/
        log-level: verbose

And got this:

----------------------------------------------------------------
🚀 Thanks for using ftp-deploy. Let's deploy some stuff!   
----------------------------------------------------------------
If you found this project helpful, please support it
by giving it a ⭐ on Github --> https://github.com/SamKirkland/FTP-Deploy-Action
or add a badge 🏷️ to your projects readme --> https://github.com/SamKirkland/FTP-Deploy-Action#badge
Using the following excludes filters: ["**/.git*","**/.git*/**","**/node_modules/**"]
Creating local state at ./web/dist/web/.ftp-deploy-sync-state.json
Local state created
Connected to 191.6.197.114:21 (No encryption)
< 220 ::ffff:191.6.197.114 FTP server ready

Login security: No encryption
> USER user
< 331 Password required for user

> PASS ###
< 230 User user logged in

> FEAT
< 550 FEAT: Operation not permitted

> TYPE I
< 200 Type set to I

> STRU F
< 200 Structure set to F

> OPTS UTF8 ON
< 200 UTF8 set to on

  changing dir to ./www/
> MKD .
< 550 .: Permission denied

> CWD .
< 550 .: No such file or directory

----------------------------------------------------------------
No file exists on the server "./www/.ftp-deploy-sync-state.json" - this must be your first publish! 🎉
The first publish will take a while... but once the initial sync is done only differences are published!
If you get this message and its NOT your first publish, something is wrong.
----------------------------------------------------------------
Local Files:	14
Server Files:	0
----------------------------------------------------------------
Calculating differences between client & server
----------------------------------------------------------------
📁 Create: assets
📁 Create: assets/img
📁 Create: assets/styles
📄 Upload: 3rdpartylicenses.txt
📄 Upload: assets/img/logo.svg
📄 Upload: assets/styles/mixins.scss
📄 Upload: assets/styles/theme.scss
📄 Upload: favicon.ico
📄 Upload: index.html
📄 Upload: main.99ae500d4d3fed9f.js
📄 Upload: polyfills.7c010118a343638e.js
📄 Upload: runtime.557def03c21605fb.js
📄 Upload: scripts.013b4bc5d63100ec.js
📄 Upload: styles.c07e23c6744a69ac.css
----------------------------------------------------------------
Making changes to 14 files/folders to sync server state
Uploading: 1.03 MB -- Deleting: 0 B -- Replacing: 0 B
----------------------------------------------------------------
creating folder "assets/"
  changing dir to assets
> MKD assets
< 550 assets: Permission denied

> CWD assets

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

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

Error: Server sent FIN packet unexpectedly, closing connection.
    at Socket.<anonymous> (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.3.0/dist/index.js:4617:56)
    at Socket.emit (events.js:326:22)
    at endReadableNT (_stream_readable.js:[12](https://github.com/biel-correa/meucv/runs/7942912288?check_suite_focus=true#step:7:13)41:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:[21](https://github.com/biel-correa/meucv/runs/7942912288?check_suite_focus=true#step:7:22))

this command is trying to create a folder called . > MKD .

biel-correa avatar Aug 22 '22 00:08 biel-correa

also tested with server-dir: www/, had the same error but it tries to create a folder called www instead of .

biel-correa avatar Aug 22 '22 00:08 biel-correa

It looks like you are getting permission errors. Can you see if you can increase the permissions on your FTP account?

SamKirkland avatar Aug 22 '22 01:08 SamKirkland

I can't, if I connect with the same account on filezilla I can do anything. The permission error might be from a folder that I shouldn't even be in

biel-correa avatar Aug 22 '22 01:08 biel-correa

@SamKirkland Is there any way off viewing pwd when it logs in to ftp?

biel-correa avatar Aug 22 '22 14:08 biel-correa