vscode: `code` cli prints a SecCodeCheckValidity error

Type: Bug

Running any code command, produces the following error

11:31:16 [0202/113303.287523:ERROR:codesign_util.cc(108)] SecCodeCheckValidity: Error Domain=NSOSStatusErrorDomain Code=-67062 "(null)" (-67062)

code --version output:

[0202/113602.603773:ERROR:codesign_util.cc(108)] SecCodeCheckValidity: Error Domain=NSOSStatusErrorDomain Code=-67062 "(null)" (-67062)
1.86.0
05047486b6df5eb8d44b2ecd70ea3bdf775fd937
x64

VS Code version: Code 1.86.0 (05047486b6df5eb8d44b2ecd70ea3bdf775fd937, 2024-01-31T10:29:15.765Z) OS version: Darwin x64 21.6.0 Modes:

System Info
Item Value
CPUs Intel® Core™ i9-9980HK CPU @ 2.40GHz (16 x 2400)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) 2, 2, 1
Memory (System) 32.00GB (17.36GB free)
Process Argv /Users/osaxma/Projects/dart_types/ --crash-reporter-id 4ee399e7-b529-43d0-ad15-5bee553afe8d
Screen Reader no
VM 0%
Extensions (34)
Extension Author (truncated) Version
language-x86-64-assembly 13x 3.1.4
codesnap adp 1.3.4
vscode-mac-color-picker dae 1.1.0
dart-code Dar 3.82.0
flutter Dar 3.82.0
gitlens eam 14.7.0
vscode-graphql Gra 0.9.1
vscode-graphql-syntax Gra 1.3.1
todo-tree Gru 0.0.226
dart-data-class-generator hzg 0.5.4
pubspec-assist jer 2.3.2
vscode-position jtr 1.1.2
vscode-docker ms- 1.28.0
debugpy ms- 2024.0.0
jupyter ms- 2024.1.0
jupyter-keymap ms- 1.1.2
jupyter-renderers ms- 1.0.17
vscode-jupyter-cell-tags ms- 0.1.8
vscode-jupyter-slideshow ms- 0.1.5
remote-containers ms- 0.338.1
hexeditor ms- 1.9.13
remote-explorer ms- 0.4.1
remote-server ms- 1.5.0
vscode-typescript-tslint-plugin ms- 1.3.4
ocaml-platform oca 1.17.0
vscode-jest Ort 5.2.3
material-icon-theme PKi 4.33.0
excalidraw-editor pom 3.7.1
vscode-yaml red 1.14.0
comment-divider sta 0.4.0
even-better-toml tam 0.19.2
pdf tom 1.2.2
vscode-lldb vad 1.10.0
intellicode-api-usage-examples Vis 0.2.8

(2 theme extensions excluded)

A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscorecescf:30445987
vscod805:30301674
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:30899288
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30951796
pythongtdpath:30769146
welcomedialogc:30910334
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
pythontbext0:30879054
accentitlementsc:30887149
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
dsvsc019b:30953937
3ef8e399:30949928

note: the commands do execute successfully but I am not sure if this error is a concern?

About this issue

  • Original URL
  • State: open
  • Created 5 months ago
  • Reactions: 67
  • Comments: 48 (9 by maintainers)

Most upvoted comments

Oh it seems the issue is more prominent on x86_64 macOS. I was testing on arm64 before. I will confirm the issue in runtime, in the meantime please ignore the error it does not affect how the application behaves.

As mentioned in https://github.com/microsoft/vscode/issues/204085#issuecomment-1924297462 there is enough context by now, I would recommend users to subscribe to this issue rather than a +1 comment. To highlight, the error will not impact application behavior. I will check in the runtime if the logs can be ignored for this case.

@deepak1556 it happens for me in both Terminal.app and in iTerm2 (I tested all of: fish, zsh, bash and sh and the error still shows up).

Maybe it’s worth noting that I had a crash earlier in VS Code (opened a huge file and the app got stuck), then I struggled to reopen VS Code again as the huge file was reopened as well so I had to force quit and reopen without reopening the editors. And VS Code got updated during this mess. (unrelated given the other reports)

Let me know if you need additional info.

Looks like code has no codesign:

# codesign -dv /Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code
/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code: code object is not signed at all

# codesign -dv /Applications/Visual\ Studio\ Code.app/Contents/MacOS/Electron
Executable=/Applications/Visual Studio Code.app/Contents/MacOS/Electron
Identifier=com.microsoft.VSCode
Format=app bundle with Mach-O thin (x86_64)
CodeDirectory v=20500 size=512 flags=0x10000(runtime) hashes=5+7 location=embedded
Signature size=9012
Timestamp=Jan 31, 2024 at 6:28:37 AM
Info.plist entries=35
TeamIdentifier=UBF8T346G9
Runtime Version=13.3.0
Sealed Resources version=2 rules=13 files=958
Internal requirements count=1 size=180

# code -v
[0205/123530.697305:ERROR:codesign_util.cc(108)] SecCodeCheckValidity: Error Domain=NSOSStatusErrorDomain Code=-67062 "(null)" (-67062)
1.86.0
05047486b6df5eb8d44b2ecd70ea3bdf775fd937
x64

# system_profiler SPHardwareDataType

Hardware:

    Hardware Overview:

      Model Name: MacBook Pro
      Model Identifier: MacBookPro16,1
      Processor Name: 8-Core Intel Core i9
      Processor Speed: 2.3 GHz
      Number of Processors: 1
      Total Number of Cores: 8
      L2 Cache (per Core): 256 KB
      L3 Cache: 16 MB
      Hyper-Threading Technology: Enabled
      Memory: 32 GB
      System Firmware Version: 2020.61.1.0.0 (iBridge: 21.16.2057.0.0,0)
      OS Loader Version: 580~1053
      Serial Number (system): C02C7395MD6T
      Hardware UUID: E41B425C-F80C-526C-8617-53767EC0A0A2
      Provisioning UDID: E41B425C-F80C-526C-8617-53767EC0A0A2
      Activation Lock Status: Enabled

Hey guys, I can also confirm that it is reproducable in x86_64 macOS Monterey. It is happening when running code command. I tried uninstalling/reinstalling vs code, also disableing/enabling code command but it didn’t fix it.

Also seeing this. x86_64 macOS Monterey.

I am getting this in my arm mac as well. It started today. May be after the latest update.

code --version
[0212/073707.969302:ERROR:codesign_util.cc(108)] SecCodeCheckValidity: Error Domain=NSOSStatusErrorDomain Code=-67062 “(null)” (-67062) 1.86.1 31c37ee8f63491495ac49e43b8544550fbae4533 x64

Same here

code --version
[0212/095954.298337:ERROR:codesign_util.cc(108)] SecCodeCheckValidity: Error Domain=NSOSStatusErrorDomain Code=-67062 "(null)" (-67062)
1.86.1
31c37ee8f63491495ac49e43b8544550fbae4533
x64

Same here - running any code command from zsh yields:

[0210/111927.096286:ERROR:codesign_util.cc(108)] SecCodeCheckValidity: Error Domain=NSOSStatusErrorDomain Code=-67062 "(null)" (-67062)

My vs-code version info

Commit: 05047486b6df5eb8d44b2ecd70ea3bdf775fd937
Date: 2024-01-31T10:29:15.765Z
Electron: 27.2.3
ElectronBuildId: 26495564
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Darwin x64 21.6.0

As pointed out in some previous comments - it seems that this latest release binary was not “signed at all”.

❯ codesign -dv '/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code'
/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code: code object is not signed at all

Relevant links: (developer.apple.com)

Thanks for the quick testing @osaxma , can you also provide the output of codesign -dv /usr/local/Cellar/fish/3.6.1/bin/fish

+1 experiencing this issue on macOS Sonoma 14.3

[0205/032731.610627:ERROR:codesign_util.cc(108)] SecCodeCheckValidity: Error Domain=NSOSStatusErrorDomain Code=-67062 "(null)" (-67062)
1.86.0
05047486b6df5eb8d44b2ecd70ea3bdf775fd937
x64

I’m experiencing the same issue on terminal (zsh). It still opens the vscode successfully though.

➜  code .
[0204/154205.208544:ERROR:codesign_util.cc(108)] SecCodeCheckValidity: Error Domain=NSOSStatusErrorDomain Code=-67062 "(null)" (-67062)
➜  code --v
[0204/154243.305742:ERROR:codesign_util.cc(108)] SecCodeCheckValidity: Error Domain=NSOSStatusErrorDomain Code=-67062 "(null)" (-67062)
1.86.0
05047486b6df5eb8d44b2ecd70ea3bdf775fd937
x64

Same here in iTerm2 3.4.23 and Apple Terminal 2.14 (453). Sonoma 14.3 on Intel MacBookPro16,1.

$ code --version [0202/111440.260313:ERROR:codesign_util.cc(108)] SecCodeCheckValidity: Error Domain=NSOSStatusErrorDomain Code=-67062 “(null)” (-67062) 1.86.0 05047486b6df5eb8d44b2ecd70ea3bdf775fd937 x64

Strangely though, when I went to open About This Mac to pull my system info for this report, a window popped-up saying that vscode wanted to access information from other apps. I refused this.