robb0wen / synthwave-vscode

Synthwave inspired colour theme for VS Code 🌅🕶
MIT License
5.19k stars 1.19k forks source link

Missing workbench source files and "filename" is undefined #320

Closed horangelmillan closed 3 weeks ago

horangelmillan commented 1 month ago

I'm encountering an error when trying to enable Neon Dreams using the Synthwave '84 extension in VSCode. The command synthwave84.enableNeon throws the following error:

{
  "errno": -4058,
  "code": "ENOENT",
  "syscall": "open",
  "path": "C:\\Program Files\\Microsoft VS Code\\vs\\code\\electron-sandbox\\workbench\\neondreams.js"
}

In order to observe this error, it is necessary to modify the "extension.js" file that is within the extension resources.

vscode.window.showInformationMessage(${JSON.stringify(e)});

Also when trying to enable the Neon Dreams feature in the SynthWave 84 extension, the following error appears:

synthWave no enable cannot read properties of undefined (reading 'filename')

Steps to reproduce the issue:

  1. Install the Synthwave '84 extension in VSCode.

  2. Run the command "Synthwave '84: Enable Neon Dreams" to enable Neon Dreams mode.

  3. Observe the error message displayed in the console and in VSCode's notification popup.

Expected behavior: The neondreams.js file should be generated correctly in the appropriate location, and Neon Dreams should be enabled without errors.

Actual behavior: The process fails with the ENOENT error, indicating that the files are missing or cannot be written to the specified location.

Additional information: Operating System: Windows 10 VSCode Version: 1.94 Synthwave '84 Extension Version: v0.1.15 Running VSCode as Administrator: Yes & No (I have tried running as administrator, but the error persists) Write permissions: I have verified that I have write permissions to the C:\Program Files\Microsoft VS Code\vs\code\electron-sandbox\workbench folder.

Possible causes:

  1. The issue is likely caused by changes introduced in VSCode version 1.94. The path to the workbench files, including neondreams.js, has changed. Previously, these files were located in the root of the VSCode installation directory. In version 1.94, they are now found in \resources\app\out\vs\code.
horangelmillan commented 1 month ago

I have created a pull request to address this issue: #321. I would appreciate any feedback or review.

jerradneff commented 1 month ago

This change fixes the issues for me on 1.94.0!

VanderSP commented 1 month ago

Sad news, today 1.95 broken it again

EDIT: Just moved out to

thecodemonkey.synthwave-x-fluoromachine-epic-animations

looks awesome with animations, and i can fullfill right path in settings.json uses custom loader extension...

vcancode commented 1 month ago

same with me have you got any solution now ?

horangelmillan commented 1 month ago

same with me have you got any solution now ?

Hi @vcancode, yes, for version 1.94 there is this pull request #321, I have to check if it is broken again in 1.95.

If you are going to try, I suggest you have technical knowledge and review the changes in the code before applying it in your VScode.

robb0wen commented 1 month ago

This is happening on Mac too with the latest update. Thanks for the PR, @horangelmillan I'll check it out and see if it fixes the mac version too.

vcancode commented 1 month ago

hey did you get any solution for this please help me

v4de commented 1 month ago

I was able to get the glow back by installing the custom CSS and JS loader extension: https://marketplace.visualstudio.com/items?itemName=be5invis.vscode-custom-css

Then adding in my settings.json the following block that is mentioned in the docs for the above extension:

"vscode_custom_css.imports": [
        "file:///C:/Users/<username>/.vscode/extensions/robbowen.synthwave-vscode-0.1.15/synthwave84.css"
]

After running the enable custom js command from command palette and reloading it seems normal.

vcancode commented 1 month ago

@horangelmillan hey thanks i pasted your code files in my package but now it shows something went wrong with synthwave type things

Zallutions commented 1 month ago

I was able to get the glow back by installing the custom CSS and JS loader extension: https://marketplace.visualstudio.com/items?itemName=be5invis.vscode-custom-css

Then adding in my settings.json the following block that is mentioned in the docs for the above extension:

"vscode_custom_css.imports": [
        "file:///C:/Users/<username>/.vscode/extensions/robbowen.synthwave-vscode-0.1.15/synthwave84.css"
]

After running the enable custom js command from command palette and reloading it seems normal.

This worked for me; thank you! I hope the dev fixes the issue soon, but anyone having this issue should just download this new extension.

horangelmillan commented 1 month ago

Hello @vancode and everyone who wants to solve the problem with an experimental alternative, how to test these adjustments made

In order to apply the above mentioned settings, the following steps must be performed:

  1. download the extension.js file from https://github.com/horangelmillan/synthwave-vscode/blob/fix/compatibility_vsc_1.94/src/extension.js

  2. disable the SynthWave '84 extension.

  3. close the VScode window.

  4. replace the extension.js file

NOTE: Depending on the system and VScode version the extension.js file may be located in a different path, example paths:

Windows 10

VScode 1.94: C:\Users\[your user]\.vscode\extensions\robbowen.synthwave-vscode-0.1.15\src\extension.js

or

VScode 1.94 (insiders version): C:\Users\[your user]\.vscode-insiders\extensions\robbowen.synthwave-vscode-0.1.15\src\extension.js

  1. open VScode in administrator mode (required).

  2. Run the command Synthwave '84: Enable Neon Dreams from the command palette

It may be necessary to uninstall the extension and reinstall it to rule out any conflicts. Once it is reinstalled, proceed with the steps indicated above.

vinayakkulkarni commented 1 month ago

hey did you get any solution for this please help me

temporary fix for v1.94 https://github.com/robb0wen/synthwave-vscode/issues/317#issuecomment-2351804426

fix for v1.95 - https://github.com/robb0wen/synthwave-vscode/pull/318/files

robb0wen commented 3 weeks ago

Thanks very much everyone for your work on this issue. I've been really tied up with a work contract recently, so haven't been able to respond as quickly as I would have liked.

@horangelmillan - Thanks for #321. Whilst I really like how future-proofed your solution is, after using it I worry that adding a config to the filepath will add complexity to the theme. Your Readme updates are very thorough but, sadly, the theme already has an issue where many users don't fully read the Readme for existing issues. I think this PR might make that situation more difficult. Compounding that, the solution would also mean adding a notification for pre-installed users to update the config as VS code won't do it otherwise.

Because of that, I'm leaning towards merging #327 as the immediate fix and perhaps adding a config-override in future. It fixes the issue on Mac and now also maintains backwards compatibility. I don't have a windows machine to test the PR works there, but once I am sure it does I can merge and push it to the VS code marketplace.

horangelmillan commented 3 weeks ago

Dueño

@robb0wen

Hi, thank you so much for taking the time to respond to my PR. I truly appreciate the attention given to it and completely understand the weight of the decision you're making.

I wish you the best of success with your work and look forward to seeing the project continue to grow!

robb0wen commented 3 weeks ago

Ok, I've tested and merged the PR. v0.1.16 should be available on the VS code marketplace, with the glow working again.

Thanks again for everyone who looked at this. Its such a massive help and I really appreciate it. I hope that one day VS code will allow CSS shadow without such hacks to get it working, but it's amazing that we've found ways to keep it going as long as we have.