humy2833 / FTP-Simple

visual studio code extension
107 stars 39 forks source link

Cant connect to ftp-simple, random characters in config #330

Open Vojjtososs opened 1 week ago

Vojjtososs commented 1 week ago

Hey, after i get the config right and go for remote, i always get what is on the image, do you know what can i do?

image

And got this too image

I think its from the last update, bcs yesterday it was all good

shaktidj commented 1 week ago

any altrntive

Vojjtososs commented 1 week ago

Got same problem than issue under me

yeezix13 commented 1 week ago

I have the same problem since yesterday

robskinn commented 1 week ago

Same with me after updating to the new version of VSC;

Version: 1.93.0 (Universal) Commit: 4849ca9bdf9666755eb463db297b69e5385090e3 Date: 2024-09-04T13:02:38.431Z Electron: 30.4.0 ElectronBuildId: 10073054 Chromium: 124.0.6367.243 Node.js: 20.15.1 V8: 12.4.254.20-electron.0 OS: Darwin x64 21.6.0

MaythamGhaly commented 1 week ago

Same here. Do you have any ideas on how we can solve it?

Vojjtososs commented 1 week ago

@MaythamGhaly no idea, i think Just wait for fix bcs it looks like the lastest update cause it

yeezix13 commented 1 week ago

I delete the current version of VSC and intall old version : https://code.visualstudio.com/updates/v1_92 and it seems ok for the moment.

Vojjtososs commented 1 week ago

@yeezix13 thanks for tip, will give it a try

yeezix13 commented 1 week ago

And also disable the auto update in vscode parameter ;)

Messaoudi-Nagib commented 1 week ago

I have the same issue, I tough it was from my side...

Vojjtososs commented 1 week ago

@yeezix13 works for me too, thanks!

peetcc commented 1 week ago

I investigated this today (9 Sept) because I use this extension EVERY DAY, ALL DAY.

After the VSCODE v1.93 upgrade on Friday 6 Sept 2024 a newer version of NodeJS was introduced that causes the error. Some Buffer class involved, whatever.

I managed to fix it for me by editing 2 lines of code in the extension.js file and then I re-created the setup JSON file by hand and it was ok again.

The setup file is encrypted when you save, and decrypted when you run the CONFIG command and see the pure JSON on your screen. On disk it is always encrypted. The crash problem is in the encryption/decryption.

Essentialy removing the encryption/decryption of the settings file made it working again. But then the password is exposed.

That is of course a temporary solution, but I now understand what needs to be done for a permanent fix.

The Changes I made for the temporary fix is:

function writeConfigFile(json) { // fileUtil.writeFileSync(CONFIG_PATH, cryptoUtil.encrypt(JSON.stringify(json, null, '\t'))); // <<<==== CHNANGED THIS LINE TO THE ONE BELOW fileUtil.writeFileSync(CONFIG_PATH, JSON.stringify(json, null, '\t')); fileUtil.rm(CONFIG_PATH_TEMP); } function initConfig() { var result = true; var json = vsUtil.getConfig(CONFIG_NAME); try { // json = cryptoUtil.decrypt(json); // <<<==== COMMENTED OUT THIS LINE json = JSON.parse(json); } catch (e) {

My suggestion going forward is :

  1. Use the secretStorage API for the password (or everything) instead of encrypted JSON files.
  2. Clean up and maybe redesign the code for this extension, the code 'smells'

cheers.

doublelion commented 1 week ago

저도 동일한 문제네요 컴 리부팅만 여러번해도 똑같습니다.

peetcc commented 1 week ago

New fixed version here: https://github.com/humy2833/FTP-Simple/issues/324