SamKirkland / FTP-Deploy-Action

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

None of the available transfer modes work #229

Closed posbank2 closed 2 years ago

posbank2 commented 3 years ago

on: push name: Deploy website on push 1 jobs: web-deploy: name: 🎉 Deploy runs-on: ubuntu-latest steps:

1 set up job ok 2.Get latest code ok

  1. sync files error 📁 Create: admin ➕ Upload: admin/404.html ➕ Upload: admin/blank.html ➕ Upload: admin/buttons.html ➕ Upload: admin/cards.html ➕ Upload: admin/charts.html 📁 Create: admin/ckeditor 10867 uploading "admin/404.html"

Error: None of the available transfer modes work. at Client.prepareTransfer (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.1.0/dist/index.js:3494:19) at processTicksAndRejections (internal/process/task_queues.js:93:5) Error: Error: None of the available transfer modes work.

All firewalls allow port 21. The file transfer is interrupted.

Its file permissions are the same as all other files. Could a lot of files be a problem?

I keep getting an error from a specific file.

posbank2 commented 3 years ago

In dry-run mode, it works fine.

emyu01 commented 2 years ago

Having same issue

manuelescrig commented 2 years ago

Same issue for me.

bertugmete commented 2 years ago

Same issue :(

emyu01 commented 2 years ago

Downgrading to v4.0.0 solved the issue for me

AbigaelCodes commented 2 years ago

I had the same issue, make sure ports for data channel are open. You need to open port for command channel, but also for the range of ports that you specified to your ftp server to use when passive mode is requested.

It works for me.

kingyue737 commented 2 years ago

Same issue for me.

kingyue737 commented 2 years ago

Here is my error log:

Trying to find optimal transfer mode...
> EPSV
< 229 Entering Extended Passive Mode (|||40003|).

Transfer mode failed: "Can't open data connection in passive mode: connect ECONNREFUSED 101.37.28.143:40003", will try next.
> PASV
< 227 Entering Passive Mode(127,0,0,1,156,75).

Transfer mode failed: "Can't open data connection in passive mode: connect ECONNREFUSED 127.0.0.1:40011", will try next.

Here is the log of filezilla which can successfully transfer file with ftp server. May be the issue is related to server address?

Command:    PASV
Trace:  CFtpControlSocket::OnReceive()
Response:   227 Entering Passive Mode(127,0,0,1,156,81).
Trace:  CFtpRawTransferOpData::ParseResponse() in state 2
Status: Server sent passive reply with unroutable address. Using server address instead.
Trace:    Reply: 127.0.0.1, peer: 101.37.28.143
kingyue737 commented 2 years ago

I've located the issue! The problem is that 127.0.0.1 is not considered as private address:

https://github.com/patrickjuchli/basic-ftp/blob/e1acee0215bf8e39c490a470e98cdaa0898460b3/src/netUtils.ts#L55

patrickjuchli commented 2 years ago

@SamKirkland, this should be fixed with basic-ftp 5.0.0.

SamKirkland commented 2 years ago

@patrickjuchli you rock! ♥️🚀 I'll upgrade asap

mhasanmeet commented 2 years ago
Error: None of the available transfer modes work.
    at Client.prepareTransfer (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.3.0/dist/index.js:4323:19)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
Error: Error: None of the available transfer modes work.

This issue happens. Can you please solve the issue? Thank you so much for your contributing time, sir.

KimpShreyan commented 2 years ago

This error shows up latest version please help

Error: None of the available transfer modes work. at Client.prepareTransfer (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.3.2/dist/index.js:4803:19) at processTicksAndRejections (internal/process/task_queues.js:97:5)

harry2712 commented 2 years ago

i also get the same Error: None of the available transfer modes work.

ibilalfaizz commented 1 year ago

Tried the latest as well as the 4.3.1v, but the issue is still there for me. p.s: it occurs in the last 1% of the files. image

DEV-BDM commented 1 year ago

Anybody found solutions for [None of the available transfer modes work]. SamKirkland/FTP-Deploy-Action@4.3.3

image

inventorDrizzt commented 1 year ago

just downgrade to version 4.6.6 , it works https://www.npmjs.com/package/basic-ftp/v/4.6.6

SamKirkland commented 1 year ago

Had a bug on my side. This should be fixed in v4.3.4

awaidus commented 1 year ago

Same error:

image

SamKirkland commented 1 year ago

@awaidus can you post your config?

Looking at your log it appears you're still on a old version (4.3.0)

awaidus commented 1 year ago

@awaidus can you post your config?

Looking at your log it appears you're still on a old version (4.3.0)

I previously tried with 4.3.4 but still not working so I tried again with some older version as it was working fine before. but now none of any working

awaidus commented 1 year ago

one more thing it is also not recognizing " .ftp-deploy-sync-state.json " whereas this file is already there.

image

SamKirkland commented 1 year ago

@awaidus Can you switch back to the latest version 4.3.4 and try excluding files that start with . see readme for how. You also need to change your state-name to a file that does NOT start with . see readme for how.

What I suspect is happening: Your FTP account does not have access to special files (files that start with .) - which is why the upload fails on .editorconfig and the script cannot see the .ftp-deploy-sync-state.json file

awaidus commented 1 year ago

@awaidus Can you switch back to the latest version 4.3.4 and try excluding files that start with . see readme for how. You also need to change your state-name to a file that does NOT start with . see readme for how.

What I suspect is happening: Your FTP account does not have access to special files (files that start with .) - which is why the upload fails on .editorconfig and the script cannot see the .ftp-deploy-sync-state.json file

Thank @SamKirkland for your muck quicker and needed answer. I have changed my config.

image

would it be worked ? is config is correct ?

SamKirkland commented 1 year ago

state-name is relative. So no need to re-specify /public_html/laravel-app/

state-name: ftp-deploy-sync-state.json

If you make that change it should work - assuming the problem is limited FTP access.


If you want to test your config out you can add

dry-run: true

dry-run will output paths/files that WOULD be uploaded. But doesn't attempt to make the uploads. So its useful for testing what files would be excluded.

awaidus commented 1 year ago
dry-run: true

Thank you again. with your help I can manage to exclude all files staring from " . " and test the upload using dry-run. it works. but still it could not recognize ftp-deploy-sync-state.json. Well let's see what happened after upload completed as it takes a while.

image

SamKirkland commented 1 year ago

@awaidus state-name only works after the initial sync.

SamKirkland commented 1 year ago

@awaidus did the upload work? After the first upload it should be MUCH faster (only changes will be uploaded going forward)

Atahar-Hossain commented 1 year ago

workflows

after completing this commit i got success message. But when i am going to cpanel there have all folders without file. That means all folders uploaded to cpanel but folders are empty. Secondly files are not uploading which are with (.) like, package.json.

theJohnCode commented 1 year ago

This is still a problem in version 4.3.4

Sharifur commented 1 year ago

same problem in version 4.3.4

presidonaycs commented 1 year ago

Same Issue with version 4.3.4 I have tried all the solutions above @SamKirkland please help

presidonaycs commented 1 year ago

The Error I get

Error: None of the available transfer modes work. at Client.prepareTransfer (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/v4.3.0/dist/index.js:4323:19) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async Client._uploadFromStream (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/v4.3.0/dist/index.js:4011:13) at async Client._uploadLocalFile (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/v4.3.0/dist/index.js:3997:20) Error: Error: None of the available transfer modes work.

[debug]Node Action run completed with exit code 1

[debug]Finishing: 📂 Sync files

presidonaycs commented 1 year ago

It works fine with dry-run, but nothing shows up on the server, not even the empty folders

Sharifur commented 1 year ago

I have solved my problem by downgrade to version 4.1.0

presidonaycs commented 1 year ago

@Sharifur I have tried that as well, I have also tried 4.0.0, 4.3.0, non worked

Sharifur commented 1 year ago

@Sharifur I have tried that as well, I have also tried 4.0.0, 4.3.0, non worked

Did you try to change your FTP host url to IP address? example: ftp.yourftp.com to 123.123.123.123

presidonaycs commented 1 year ago

Screenshot 2023-10-28 174942

This is my current configuration

presidonaycs commented 1 year ago

@Sharifur I just tried that, still didn't work

kcnaiamh commented 5 months ago

@presidonaycs Have you solve the problem? I'm exactly facing same situation.

presidonaycs commented 5 months ago

I couldn't solve the problem man...

On Thu, Jun 13, 2024, 5:09 PM Naimul Islam @.***> wrote:

@presidonaycs https://github.com/presidonaycs Have you solve the problem? I'm exactly facing same situation.

— Reply to this email directly, view it on GitHub https://github.com/SamKirkland/FTP-Deploy-Action/issues/229#issuecomment-2166118947, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN5FCQY5JY527CSJFXBKZ7LZHG735AVCNFSM6AAAAABJIW5RKCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRWGEYTQOJUG4 . You are receiving this because you were mentioned.Message ID: @.***>

sherz12r commented 4 months ago

if you guys still have issues use following name: Deploy via SFTP on: push: branches:

presidonaycs commented 4 months ago

thanks alot man, i'll try ASAP

On Thu, Jun 27, 2024 at 4:11 PM Sheraz @.***> wrote:

same problem tried all above suggestions not worked any update?

— Reply to this email directly, view it on GitHub https://github.com/SamKirkland/FTP-Deploy-Action/issues/229#issuecomment-2194978257, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN5FCQYNHWALGWCZTWWH4U3ZJQTRDAVCNFSM6AAAAABJIW5RKCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJUHE3TQMRVG4 . You are receiving this because you were mentioned.Message ID: @.***>

codeparl commented 4 months ago

setting dry-run: true worked for me

RayhanulSumon commented 4 months ago

I am facing the same problem dot (.) file not uploading, what should i do? i am on VPS Cpanel.

sherz12r commented 4 months ago

Use following

name: Deploy via SFTP on: push: branches:

RayhanulSumon commented 4 months ago

name: 🚀 Deploy website on push to production on: push: branches: