vscode-sftp icon indicating copy to clipboard operation
vscode-sftp copied to clipboard

Watcher not uploading

Open wm-simon opened this issue 6 years ago • 18 comments

Do you read the FAQ?

Describe the bug Easy less compiling the css files to the local css folder. Watcher is not uploading. The manual upload works fine.

To Reproduce Filesystem: Server: root

  • httpdocs
    • css

Local: root

  • css

Settings:

{
  "name": "Name",
  "host": "domain.de",
  "protocol": "sftp",
  "port": 22,
  "username": "**",
  "password": "**",
  "remotePath": "/httpdocs",
  "uploadOnSave": false,
  "watcher": {
    "files": "css/*.css",
    "autoUpload": true,
    "autoDelete": false
  }
}

Thanks for help!

wm-simon avatar Apr 28 '19 16:04 wm-simon

css/*.css

Pfeifakopf [email protected] 于 2019年4月29日周一 00:24写道:

Do you read the FAQ?

Describe the bug Easy less compiling the css files to the local css folder. Watcher is not uploading. The manual upload works fine.

To Reproduce Filesystem: Server: root

  • httpdocs
    • css

Local: root

  • css

Settings: { "name": "Name", "host": "domain.de", "protocol": "sftp", "port": 22, "username": "user", "password": "*****

", "remotePath": "/httpdocs", "uploadOnSave": false, "watcher": { "files": "css/.css", "autoUpload": true, "autoDelete": false } }

Thanks for help!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/liximomo/vscode-sftp/issues/547, or mute the thread https://github.com/notifications/unsubscribe-auth/ACK4RIJGRMYFCT3PXX3XFZTPSXFVPANCNFSM4HI63MBA .

liximomo avatar Apr 29 '19 03:04 liximomo

css/*.css

Sorry, i don't understand...

wm-simon avatar Apr 29 '19 10:04 wm-simon

files: "css/*.css"

Pfeifakopf [email protected] 于 2019年4月29日周一 18:33写道:

css/*.css

Sorry, i don't understand...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/liximomo/vscode-sftp/issues/547#issuecomment-487531294, or mute the thread https://github.com/notifications/unsubscribe-auth/ACK4RIMYTPSAERB5YHFJ63TPS3FGXANCNFSM4HI63MBA .

liximomo avatar Apr 30 '19 00:04 liximomo

If found the problem now. Watcher is not working, if there is no open Windows Explorer window of the watching directory. If you open a window of the watching direcotory, all works fine. Perhaps this helps you.

wm-simon avatar Jul 15 '19 11:07 wm-simon

Hi! I also have some trouble auto uploading a compiled CSS file. I have an extension that compiles a css file based on my less file. But when the css file is generated (less file is saved) the less file is uploaded OK (if that's what you want...) but the css file does not get uploaded. IS this because the less file is generated and nog saved by the user?

Is there a way to auto upload the generated css file?

jjnxpct avatar Aug 07 '19 16:08 jjnxpct

I think I've got it working... In stead of the 'uploadOnSave' (now set to false) I used the watcher setting to watch for file changes. This seems to work. Great.

jjnxpct avatar Aug 07 '19 18:08 jjnxpct

Hi! I think I now ran into the same issue Pfeifakopf had... I am starting out with VS code and set up a testing project to test some features / extensions like less compiling andSFTP upload. In my test project everythink works fine and the SFTP extension watches the CSS folder (with the compiled css form the less extension) and uploas it on change. Exactly as I wanted. Great.

So now I wanted to use this in an exsisiting project. But the wachted folder (css) did nt trigger the SFTP upload when a new css file was compiled. I did exactly what I did with my test project.

But then I realised there is a difference: The VSC project folder is on a shared folder (Window 10 / Synology NAS). And that somehow cuases issues with the watcher.

The I read Pfeiakopfs comments again and tried this: In windows, I openend an explorer window exactly on the folder where the wactcher was set to watch. And nog the css does get uploaded! As soon as I select a different folder in the windows explorer, it stopped working.

How weird is that ;-)

So I can get this to work, but I need to have a woindows explorer opened on the watched folder every time I want to use my project.

So my question is: Can this be somehow changed / fixed in the SFTP extension (or in a different way) so we don't have to open this explorer window every time we work on our projects?

jjnxpct avatar Aug 09 '19 10:08 jjnxpct

I stopped using the NAS shared folder for the local project because of this issue. I use the local HD now. This works fine.

@rafaelperozin Are you storing your local files on a shared drive? If so, that might be the issue. If not it's something else.

jjnxpct avatar Oct 10 '19 14:10 jjnxpct

toring your local file son a shared drive. If so that might be the issue. If not it

@jjnxpct sorry, I'm setting a wrong remotePath.

rafaelperozin avatar Oct 10 '19 14:10 rafaelperozin

Thanks, @Pfeifakopf, @liximomo, and @jjnxpct! These tips were helpful; I was able to resolve this same issue for myself.

What really seemed to solve the issue for me was to clear my cache. I use Cloudflare for all my sites (it's a great, freemium service). I set my Cloudflare to dev mode so I can see my code changes on a browser right away.

Hope this helps! Onelove.

johnahnz0rs avatar Nov 03 '19 18:11 johnahnz0rs

Hey there, having the same problem on my Mac as well as on my Windows laptop.

Here's my config:

"watcher": {
  "files": "**/Resources/Public/Frontend/css/theme.min.css",
  "autoUpload": true,
  "uploadOnSave": true,
  "autoDelete": false
}

Any idea?

Edit: weird thing is that I'm using this extension for months and it suddenly stopped working..

timvonwerne avatar Mar 09 '20 19:03 timvonwerne

This worked very well for me

"uploadOnSave": true,
"watcher": {
    "files": "**/*.{css,css.map,js}",
    "autoUpload": true,
    "autoDelete": true
},

pearlboy avatar Mar 11 '20 02:03 pearlboy

pearlboy's recommendation worked for me!

jslalriya avatar May 10 '21 13:05 jslalriya

for future reference if you came from google like me:

"watcher": {
"files": "**/css/*{.css,.map}",
}

Source

sumonst21 avatar Feb 26 '22 00:02 sumonst21

I'm new to the SFTP extension and have configured it as recommended and then using pearlboy's suggestion. Neither seems to be working. It works great when going from the PC to the host but does not recognize anything created on the host. Open to suggestions...

JeffTeter avatar Feb 10 '23 20:02 JeffTeter

I'm new to the SFTP extension and have configured it as recommended and then using pearlboy's suggestion. Neither seems to be working. It works great when going from the PC to the host but does not recognize anything created on the host. Open to suggestions...

well, setting up a watcher on the server isn't a task here.

@liximomo should close this issue

sumonst21 avatar Feb 11 '23 01:02 sumonst21

@JeffTeter This extension is deprecated. Use the SFTP extension instead. Maintained and updated version by @Natizyskunk 😀 (Forked from the no longer maintained liximomo's SFTP plugin)

sumonst21 avatar Feb 11 '23 01:02 sumonst21

Thanks for the response. I thought I was on the right extension.

I still have a question... I have added the watcher section per issue 136. But, if I modify an item on the remote, the change does not appear in the local until I refresh. Is that the expected behavior?

On Fri, Feb 10, 2023, 7:09 PM Md. Sumon Islam @.***> wrote:

@JeffTeter https://github.com/JeffTeter This extension is deprecated. Use the SFTP https://github.com/Natizyskunk/vscode-sftp extension instead. Maintained and updated version by @Natizyskunk https://github.com/Natizyskunk/ 😀 (Forked from the no longer maintained liximomo's SFTP plugin https://github.com/liximomo/vscode-sftp.git)

— Reply to this email directly, view it on GitHub https://github.com/liximomo/vscode-sftp/issues/547#issuecomment-1426551038, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADDSGWXAULKHZU67DJO5NVTWW3RDBANCNFSM4HI63MBA . You are receiving this because you were mentioned.Message ID: @.***>

JeffTeter avatar Feb 13 '23 20:02 JeffTeter