vscodium: 1.74 Intentionally Breaks Monkeypatch + CustomizeUI

Describe the bug

A microsoft employee merged a build change that effectively targets and breaks Monkeypatch and CustomizeUI. See: https://github.com/microsoft/vscode/pull/166126. This was a purposeful and malicious commit to further control users of the app.

Please confirm that this problem is VSCodium-specific

  • This bug doesn’t happen if I use Microsoft’s Visual Studio Code. It only happens in VSCodium.

Please confirm that the issue/resolution isn’t already documented

To Reproduce Steps to reproduce the behavior:

  1. Install 1.74
  2. Install Monkeypatch
  3. Exit
  4. Run code --verbose from the terminal, or try to start VSCodium from the applications menu

Expected behavior

I was half expecting the project not to pick up malicious changes from MS like this. But it’s understandable that this went under the radar.

I would love to see this change excluded, as I view this kind of this as harmful as the telemetry.

Screenshots

n/a

Desktop (please complete the following information):

  • OS: MacOS
  • Architecture x64
  • Version 1.74
  • App Manager n/a
  • Sandboxed no

Additional context

Here’s the stack that code produces, which is identical to the stack that vscodium produces:

→ code --verbose
[58028:0125/195311.492768:ERROR:node_bindings.cc(289)] Most NODE_OPTIONs are not supported in packaged apps. See documentation for more details.
Loading monkey-patch
(node:58028) UnhandledPromiseRejectionWarning: TypeError: Cannot read properties of undefined (reading 'crypto')
    at P (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:25:24056)
    at i (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:25:33504)
    at get mainIPCHandle (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:32:6945)
    at p.<computed> (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:3:53298)
    at Oe.c (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:84:7310)
    at Oe.b (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:84:5809)
    at Oe.a (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:84:4864)
    at Oe.main (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:84:4709)
    at Object.<anonymous> (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:85:1732)
    at s._safeInvokeFunction (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:5:1337)
    at s._invokeFactory (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:5:1522)
    at s.complete (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:5:1801)
    at s._onModuleComplete (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:6:1112)
    at s._onModuleComplete (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:6:1358)
    at s._resolve (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:6:510)
    at s.defineModule (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:5:6066)
    at n (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:5:10527)
    at Object.R (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:6:6036)
    at s._safeInvokeFunction (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:5:1337)
    at s._invokeFactory (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:5:1522)
    at s.complete (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:5:1801)
    at s._onModuleComplete (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:6:1112)
    at s._onModuleComplete (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:6:1358)
    at s._resolve (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:6:510)
    at s.defineModule (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:5:6066)
    at y (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:6:1825)
    at h (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:2554)
    at Object.<anonymous> (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.nls.js:3:61)
    at e._createAndEvalScript (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:2598)
    at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js:4:2237
    at /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-amd.js:82:14
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)
(Use `Electron --trace-warnings ...` to show where the warning was created)
(node:58028) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Reactions: 30
  • Comments: 31 (6 by maintainers)

Most upvoted comments

We might disable the mangle since it also breaking the build process on Windows… I have to think about that.

I really hope this project pushes back on PRs like the one causing this issue. It shows an egregious disregard for the community as a whole.

Ya, it seems that Monkey Patch hasn’t been updated since it’s impossible to maintain for the official version due to the mangling (https://github.com/iocave/customize-ui/issues/156). it looks for vs/code/electron-browser/workbench/workbench.html which isn’t there anymore (https://github.com/iocave/monkey-patch/issues/61). I will keep VSCodium not-mangled so you can ask the extensions author to support VSCodium or make your own version.

Great news! I used the vsce package command to build a VSIX version of the extension, and with this, both iocave/monkey-patch and iocave/customize-ui work as intended with the latest VSCodium Insider, see attached screenshot!

You can download the extension here: monkey-patch-0.1.23.vsix.zip

To install, simply run the command: Extensions: Install from VSIX…

Enjoy!

Screenshot 2023-01-31 at 23 59 14

OK, I’ve removed the mangle in the latest Insiders version. Can you test it?

@lehni If you generate a release in github, users could use VSIX Manager with the following settings to install and keep it up to date.

{
    "vsix.extensions": [
        "github:iocave/customize-ui",
    ],
    "vsix.crons": {
        "update": "0 12 * * *"      // at 12PM, every day
    },
}

I’ve fixed this bug in https://github.com/lehni/customize-ui/commit/215ea7fb76986e625e376d84e5cdbf7191488a4e and you can download a new version of the extension to install from a VSIX file here: https://github.com/iocave/customize-ui/issues/170#issuecomment-1503371606

Enjoy!

Ya, the git is 2 weeks old while the extension is 3 months old (on VSMarket), 9 months old (on OpenVSX)…

re-applied

vscode@1.76 not work

Ah good, I thought it was just me. It’s stopped working on v1.77 for me as well. I had to disable it to get going and had planned to investigate later, thinking I had accidentally changed something to break it.

That’s exactly why i had to post that “post” to let everyone know what’s going on with the extension and the latest version. I am glad that you know you are not alone.

vscode@1.76 not work

@zwmmm it works solely on vscodium

@weaming: but my settings seem do not work as expect as before in VSCode.

have you re-applied “Enable Monkey Patch” ??

It works after re-applied, tks!

@weaming: but my settings seem do not work as expect as before in VSCode.

have you re-applied “Enable Monkey Patch” ??

@wtf403 Yes. Check out apc-extension

it seems that there have been no updates for the extensions and VSCodium have been updated to the latest: 1.77.1.23095 It doesn’t work with the extensions. Currently, the version is v1.76.2.23074 and it work with the extension.