robb0wen / synthwave-vscode

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

admin privilleges #263

Closed GeorgiNiagulov closed 2 years ago

GeorgiNiagulov commented 2 years ago

I updated vs code insiders on 8 july. And when I enable synthwave84 neon dreams, I receive this message "You must run VS code with admin privileges in order to enable Neon Dreams.". I written to vscode insiders github, they responded this problem to extension.

pulberg commented 2 years ago

Same issue -

macOS 12.4

vscode - Version: 1.70.0-insider (Universal) Commit: 052d5b0027f6c9d64c8ca35955cb5117ba94d5d7 Date: 2022-07-13T05:21:34.551Z Electron: 18.3.5 Chromium: 100.0.4896.160 Node.js: 16.13.2 V8: 10.0.139.17-electron.0 OS: Darwin x64 21.5.0

Screen Shot 2022-07-13 at 3 44 30 PM

JediRhymeTrix commented 2 years ago

I'm also facing the same issue.

I've tried the solution suggested in #146 but it didn't work.

The suggested fix is to run:

sudo chmod ugo+rw /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench

However, workbench is not present inside electron-browser in the newer Insider builds. So, if the theme looks for it in that directory, it will error out. I have not gone through the code, but could this be the root cause of the issue?

mcpads commented 2 years ago

This issue is caused by changed behavior of latest Visual Studio Code.

Basically this extension is enabled by changing workbench files of electron-browser in VSCode app. However, electron-browser was removed in commit https://github.com/microsoft/vscode/tree/f4f1b04d872a2b94d9a5105a1eefb81a213c07f2, and it was moved to electron-sandbox.

I checked that the extension works well if all electron-browser in below lines is replaced with electron-sandbox, for Insider.

https://github.com/robb0wen/synthwave-vscode/blob/07273cd1e1fb6d0873dd96ab9f2e291eb136bee5/src/extension.js#L30-L40

https://github.com/robb0wen/synthwave-vscode/blob/07273cd1e1fb6d0873dd96ab9f2e291eb136bee5/src/extension.js#L109-L113

vinayakkulkarni commented 2 years ago

This issue is caused by changed behavior of latest Visual Studio Code.

Basically this extension is enabled by changing workbench files of electron-browser in VSCode app. However, electron-browser was removed in commit microsoft/vscode@f4f1b04, and it was moved to electron-sandbox.

I checked that the extension works well if all electron-browser in below lines is replaced with electron-sandbox, for Insider.

https://github.com/robb0wen/synthwave-vscode/blob/07273cd1e1fb6d0873dd96ab9f2e291eb136bee5/src/extension.js#L30-L40

https://github.com/robb0wen/synthwave-vscode/blob/07273cd1e1fb6d0873dd96ab9f2e291eb136bee5/src/extension.js#L109-L113

Can confirm replacing electron-browser with electron-sandbox worked! Thanks!

mirulnasir commented 2 years ago

had this issue today. confirmed replacing electron-browser with electron-sandbox worked. thank you.

puentebravo commented 2 years ago

Just had this issue after updating VSCode, and the suggested changes worked. Thank you!

FrancRose commented 2 years ago

Just had this issue after updating VSCode, and the suggested changes worked. Thank you!

Newb here, where do you go to change these settings?

puentebravo commented 2 years ago

Just had this issue after updating VSCode, and the suggested changes worked. Thank you!

Newb here, where do you go to change these settings?

If you're on Windows, head to the directory VSCode is installed in (.vscode by default, typically under users/yourUsername), then head into the extensions directory.

Once you're there, you're looking for a folder called 'robbowen.synthwave-vscode-0.1.11'. Inside, navigate to the src folder, then pop open extension.js in your code editor of choice. The code you need to change is on the lines specified in @vinayakkulkarni 's comment above.

yowynn commented 2 years ago

This issue is caused by changed behavior of latest Visual Studio Code. Basically this extension is enabled by changing workbench files of electron-browser in VSCode app. However, electron-browser was removed in commit microsoft/vscode@f4f1b04, and it was moved to electron-sandbox. I checked that the extension works well if all electron-browser in below lines is replaced with electron-sandbox, for Insider. https://github.com/robb0wen/synthwave-vscode/blob/07273cd1e1fb6d0873dd96ab9f2e291eb136bee5/src/extension.js#L30-L40

https://github.com/robb0wen/synthwave-vscode/blob/07273cd1e1fb6d0873dd96ab9f2e291eb136bee5/src/extension.js#L109-L113

Can confirm replacing electron-browser with electron-sandbox worked! Thanks!

that works, my code version is: 1.70.0 thanks a lot

ODYYYYYY commented 2 years ago

Just had this issue after updating VSCode, and the suggested changes worked. Thank you!

Newb here, where do you go to change these settings?

If you're on Windows, head to the directory VSCode is installed in (.vscode by default, typically under users/yourUsername), then head into the extensions directory.

Once you're there, you're looking for a folder called 'robbowen.synthwave-vscode-0.1.11'. Inside, navigate to the src folder, then pop open extension.js in your code editor of choice. The code you need to change is on the lines specified in @vinayakkulkarni 's comment above.

It works well, thank you a lot !

nadinCodeHat commented 2 years ago

I wrote a medium blog on how to activate the neon dreams without admin privileges Here’s how to install the SynthWave ’84 theme and activate the glow effect (Neon Dreams) in VS Code

quantumudit commented 2 years ago

This worked. Finally after hours of head scratching .. Thanks a lot.

codeMauguin commented 2 years ago

此问题是由最新 Visual Studio Code 的行为更改引起的。 基本上,这个扩展是通过更改electron-browserVSCode 应用程序中的工作台文件来启用的。但是,electron-browser在提交microsoft/vscode@f4f1b04中被删除,并被移至electron-sandbox. electron-browser如果以下行中的所有内容都被替换electron-sandbox为 Insider,我检查了扩展是否正常工作。 https://github.com/robb0wen/synthwave-vscode/blob/07273cd1e1fb6d0873dd96ab9f2e291eb136bee5/src/extension.js#L30-L40

https://github.com/robb0wen/synthwave-vscode/blob/07273cd1e1fb6d0873dd96ab9f2e291eb136bee5/src/extension.js#L109-L113

可以确认替换electron-browserelectron-sandbox工作!谢谢!

我有个疑问为什么我的window上这里面的iswin是false

hmmhmmhm commented 2 years ago

Has anyone solved it in the mac?

nadinCodeHat commented 2 years ago

Has anyone solved it in the mac?

Try to find the .vscode\extensions path in mac and locate synthwave84.css file, add this to the settings.json with your path

"vscode_custom_css.imports": [ "file:///path-in-mac/.vscode/extensions/robbowen.synthwave-vscode-0.1.11/synthwave84.css" ]

Try this for mac probably it'll work

robb0wen commented 2 years ago

There was a PR to fix the issue, but I needed to add a check to prevent compatibility issues across the different VS code versions (pre and post 'electron-sandbox').

The latest changes on the PR looks like it's working on Mac. I don't have access to a windows machine right now though, so I'd be super grateful if a windows user could please test that everything works as expected with the version in that PR.

Once we're happy it's working on windows I'll merge it in and push a new version of the extension to the marketplace

GeorgiNiagulov commented 2 years ago

I checked that everything works well if all electron-browser is replaced with electron-sandbox for Insiders on windows. I changed them in extension and there not any problems. Thankk you :)

cheestudio commented 2 years ago

@robb0wen Another Windows user (Windows 11) confirming that the PR works for me, as well.

itsnull12 commented 2 years ago

This issue is caused by changed behavior of latest Visual Studio Code.

Basically this extension is enabled by changing workbench files of electron-browser in VSCode app. However, electron-browser was removed in commit https://github.com/microsoft/vscode/tree/f4f1b04d872a2b94d9a5105a1eefb81a213c07f2, and it was moved to electron-sandbox.

I checked that the extension works well if all electron-browser in below lines is replaced with electron-sandbox, for Insider.

https://github.com/robb0wen/synthwave-vscode/blob/07273cd1e1fb6d0873dd96ab9f2e291eb136bee5/src/extension.js#L30-L40

https://github.com/robb0wen/synthwave-vscode/blob/07273cd1e1fb6d0873dd96ab9f2e291eb136bee5/src/extension.js#L109-L113

Thank u so much

jdan commented 2 years ago

Confirmed on mac that changing all occurrences of electron-browser to electron-sandbox inside ~/.vscode/extensions/robbowen.synthwave-vscode-0.1.11/src/extension.js fixed the issue.

bildungsroman commented 2 years ago

Confirmed on mac that changing all occurrences of electron-browser to electron-sandbox inside ~/.vscode/extensions/robbowen.synthwave-vscode-0.1.11/src/extension.js fixed the issue.

I tried this but am still getting the admin error. I reloaded VSCode, is there anything else I need to do to get this to work? I'm on an M1, macOS 12.4.

Also, will an update to the extension with this fix be released soon?

LaptopTheOne commented 2 years ago

Confirmed on mac that changing all occurrences of electron-browser to electron-sandbox inside ~/.vscode/extensions/robbowen.synthwave-vscode-0.1.11/src/extension.js fixed the issue.

I tried this but am still getting the admin error. I reloaded VSCode, is there anything else I need to do to get this to work? I'm on an M1, macOS 12.4.

Also, will an update to the extension with this fix be released soon?

@bildungsroman try quitting the vscode completely and try it. Same config as you, and it works for me :). If that doesn't work try removing and installing the extension.

robb0wen commented 2 years ago

I've just merged a fix for this, and a few other changes. The latest version is bumped to v0.1.14 and should fix the issues starting the glow.

Thanks everyone for your input on this!

Jayprecode commented 2 years ago

I'm also facing the same issue.

I've tried the solution suggested in #146 but it didn't work.

The suggested fix is to run:

sudo chmod ugo+rw /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench

However, workbench is not present inside electron-browser in the newer Insider builds. So, if the theme looks for it in that directory, it will error out. I have not gone through the code, but could this be the root cause of the issue?

if you're using mac

sudo chmod ugo+rw /Applications/Visual\ Studio\ Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench

61ZM07H36R3ML1N commented 2 years ago

I had to add the synthwave.css via custom css and js loader extension to get the theme working again following this guide. the guide

it worked flawlessly

robb0wen commented 2 years ago

Closing this as the latest published version of the extension, v0.1.14 should fix the admin issue and allow the Neon Dreams command to work as normal.

FYI, linking the CSS via the custom CSS and JS loader hasn't been the standard approach for a while now, and should be considered as a fallback if nothing else works (it doesn't dynamically create the glow classes like core extension does).

JerryApazaYllatupa commented 1 year ago

sigo teniendo el mismo problema la extension ya esta actualizado 1.70.0 y no puedo activar | enable synthwave84 neon dreams

const electronBase = isVSCodeBelowVersion("1.70.0") ? "electron-browser" : "electron-sandbox";

    const htmlFile =
        base +
        (isWin
            ? "\\"+electronBase+"\\workbench\\workbench.html"
            : "/"+electronBase+"/workbench/workbench.html");

    const templateFile =
            base +
            (isWin
                ? "\\"+electronBase+"\\workbench\\neondreams.js"
                : "/"+electronBase+"/workbench/neondreams.js");
rangeldor commented 1 year ago

sigo teniendo el mismo problema la extension ya esta actualizado 1.70.0 y no puedo activar | enable synthwave84 neon dreams

const electronBase = isVSCodeBelowVersion("1.70.0") ? "electron-browser" : "electron-sandbox";

  const htmlFile =
      base +
      (isWin
          ? "\\"+electronBase+"\\workbench\\workbench.html"
          : "/"+electronBase+"/workbench/workbench.html");

  const templateFile =
          base +
          (isWin
              ? "\\"+electronBase+"\\workbench\\neondreams.js"
              : "/"+electronBase+"/workbench/neondreams.js");

Me too! Since before the update.