Vscode: [Insiders] Could not create temporary directory: Permission denied

Created on 27 Nov 2018  路  11Comments  路  Source: microsoft/vscode


  • VSCode Version: 1.30.0-insider (1.30.0-insider)
  • OS Version: macOS Mojave 10.14.1 (18B75)

Steps to Reproduce:

  1. Click "Code - Insiders" menu and select Check for Update...
  2. Error appears at the bottom of the screen: Could not create temporary directory: Permission denied

screen shot 2018-11-27 at 10 07 53 am

I previously had this issue on a code-insiders release from a day or so ago, downloaded the latest insiders build, but having the problem again today.


Does this issue occur when all extensions are disabled?: Yes

needs more info

Most helpful comment

@joaomoreno That command returns nothing at all. I tried to cd into it, and received a permission denied, so I then ran:

sudo chown $USER ~/Library/Caches/com.microsoft.VSCodeInsiders.ShipIt/

Restarted the insiders build, and now the software update works!

Sorry about the run-around, I didn't realize there was a ShipIt directory for both kinds of builds... Thanks for the help!

All 11 comments

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@joaomoreno The app is already in the Applications folder...

I ran the two commands, the first one failed with:

chown: /Users/tom/Library/Caches/com.microsoft.VSCode.ShipIt/*: No such file or directory

However it runs OK if I drop the asterisk:

sudo chown $USER ~/Library/Caches/com.microsoft.VSCode.ShipIt/

The second one seemed to run ok, but has had no effect on my ability to update, I still get permission denied. To be clear, I ran it for Code Insiders:

xattr -dr com.apple.quarantine /Applications/Visual\ Studio\ Code\ -\ Insiders.app

When I run ps to see where Code Insiders is running from, it shows that it's running from /Applications/Visual Studio Code - Insiders.app as expected. Any other ideas?

Make sure Code isn't running. Then, run it from the Terminal as code --verbose, then run an update. The specific error should come up in the terminal, maybe it contains more info.

Also what does ls -la ~/Library/Caches/com.microsoft.VSCode.ShipIt return?

Running in verbose mode I get this when checking for updates:

[main 2:29:36 PM] update#checkForUpdates, state =  idle
[main 2:29:36 PM] update#setState checking for updates
[main 2:29:36 PM] telemetry/workbenchActionExecuted { id: 'CheckForUpdate', from: 'menu' }
[main 2:29:36 PM] menubarService#updateMenubar 1
[main 2:29:37 PM] update#setState downloading
[main 2:29:37 PM] UpdateService error: Could not create temporary directory: Permission denied
[main 2:29:37 PM] update#setState idle
[1962:1130/142937.132645:INFO:CONSOLE(2465)] "Could not create temporary directory: Permission denied", source: file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (2465)
[main 2:29:37 PM] menubarService#updateMenubar 1

The output from that ls command is:

drwxr-xr-x   2 tom  staff    64 Nov 19 10:35 .
drwx------+ 88 tom  staff  2816 Nov 30 12:05 ..

What about $TMPDIR, does your user have permissions there?

@joaomoreno Yep, just verified I can write there.

Oh I just noticed you are on Insiders. Run this one:

ls -la ~/Library/Caches/com.microsoft.VSCodeInsiders.ShipIt

@joaomoreno That command returns nothing at all. I tried to cd into it, and received a permission denied, so I then ran:

sudo chown $USER ~/Library/Caches/com.microsoft.VSCodeInsiders.ShipIt/

Restarted the insiders build, and now the software update works!

Sorry about the run-around, I didn't realize there was a ShipIt directory for both kinds of builds... Thanks for the help!

Was this page helpful?
0 / 5 - 0 ratings