illixion / vscode-vibrancy-continued

Enable Acrylic/Glass effect for your VS Code.
MIT License
506 stars 27 forks source link

[Bug]: "workbench.html file is different from what is expected" // Vibrancy Continued not working on MacOS #135

Closed WeLeBro closed 3 months ago

WeLeBro commented 4 months ago

Is there an existing issue for this?

Current Behavior

I have tried just about everything, and looked through every solution provided on this page but nothing seems to do the trick. Every time I try to get it to work I get the following message:

error_vibrancy_continued

I have tried:

Nothing seems to be out of the ordinary in my Workbench settings. Yet I can't figure it out, so I'm here to see if you guys know any ways of resolving the issue and whether it is down to something on my system or a bug in Vibrancy Recontinued.

Expected Behavior

I expected the background to change to a translucent state, instead, it stayed solid whatever parameters I tried to change and every time the error message showed up again.

Steps To Reproduce

  1. Select Dark+ as VS Code theme.
  2. Install: Vibrancy Continued
  3. Reload Vibrancy Continued
  4. Restart VS Code error_vibrancy_continued

Environment

- OS: MacOS Sonoma 14.3.1 (23D60)
- VSCode: 1.86.2
- Extension: 1.1.27
- Theme: Dark+

Anything else?

No response

illixion commented 4 months ago

I'm unable to reproduce this issue, type this command into a Terminal and paste the output here, preferably as a code block:

cat "/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html"
WeLeBro commented 4 months ago

Sorry for the late response, I had a busy week at school. Here is the output of your command;

<!-- Copyright (C) Microsoft Corporation. All rights reserved. -->
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <meta
            http-equiv="Content-Security-Policy"
            content="
                default-src
                    'none'
                ;
                img-src
                    'self'
                    data:
                    blob:
                    vscode-remote-resource:
                    vscode-managed-remote-resource:
                    https:
                ;
                media-src
                    'self'
                ;
                frame-src
                    'self'
                    vscode-webview:
                ;
                script-src
                    'self'
                    'unsafe-eval'
                    blob:
                ;
                style-src
                    'self'
                    'unsafe-inline'
                ;
                connect-src
                    'self'
                    https:
                    ws:
                ;
                font-src
                    'self'
                    vscode-remote-resource:
                    vscode-managed-remote-resource:
                    https://*.vscode-unpkg.net
                ;
                require-trusted-types-for
                    'script'
                ;
                trusted-types
                    amdLoader
                    cellRendererEditorText
                    defaultWorkerFactory
                    diffEditorWidget
                    diffReview
                    domLineBreaksComputer
                    dompurify
                    editorGhostText
                    editorViewLayer
                    notebookRenderer
                    stickyScrollViewLayer
                    tokenizeToString
                ;
        "/>
    </head>

    <body aria-label="">
    </body>

    <!-- Startup (do not modify order of script tags!) -->
    <script src="workbench.js"></script>
</html>
illixion commented 4 months ago

Your file appears to be correct, so you shouldn't be getting this message. This error is also triggered if the function that writes to the file fails, so it's possible that this file isn't writable by your user account for some reason. You can check by running this terminal command:

test -w "/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html" && echo "Writable" || echo "Not Writable"
WeLeBro commented 4 months ago

It does say 'Writable' when I put in that command into the terminal. So do you know if anything else could be going wrong? A setting maybe?

illixion commented 4 months ago

I'm not sure what else might be going wrong. You could try running the extension locally using VSCode's debugging tools to check what the cause of the error is:

  1. Clone this repository and open it in VSCode (git clone https://github.com/illixion/vscode-vibrancy-continued.git && code vscode-vibrancy-continued)
  2. Open extension/index.js and select line 319 (if (HTML !== newHTML) {)
  3. Press F9 to set a breakpoint and then press F5, when asked for a debugging option choose VS Code Extension Development
  4. In a new VSCode window that pops up, bring up command palette and choose Reload Vibrancy
  5. In the original window, step through the code by pressing F10 until you encounter an error
  6. Check what the error is on the left panel that lists variables and post it here
wanan-life commented 3 months ago

@WeLeBro It seems that reinstalling vscode can solve this problem, and that's how I solved it.

illixion commented 3 months ago

Closing as stale, feel free to reopen if this is still an issue.