[ISSUE] Visual Studio Code [app] Error: User did not grant permission

Trying to install workbench on Linux (Fecora 29); getting two errors:

Visual Studio Code [app]
Error: User did not grant permission.
at /tmp/.mount_PartictMTa65/resources/app.asar/node_modules/sudo-prompt/index.js:111:23
at ChildProcess.exithandler (child_process.js:310:5)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:961:16)
at Socket.stream.socket.on (internal/child_process.js:380:11)
at Socket.emit (events.js:182:13)
at Pipe._handle.close [as _onclose] (net.js:596:12)

and

Particle Workbench [extension]
TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received type undefined
at normalizeSpawnArguments (child_process.js:409:11)
at Object.spawn (child_process.js:534:38)
at module.exports (/tmp/.mount_PartictMTa65/resources/app.asar/node_modules/execa/index.js:205:26)
at VSCodeInstallerLinux.installExtension (/tmp/.mount_PartictMTa65/resources/app.asar/src/installers/vscode/base.js:80:17)
at process._tickCallback (internal/process/next_tick.js:68:7)

This happens whether I execute the .ApplImage as my own user or via sudo.

ah, sorry about that - the installer only supports ubuntu / debian atm since we’re relying on apt to install VSCode itself.

easy work-around is to install VSCode and Particle Workbench separately:

  1. Install VSCode:
  2. Install Particle Workbench via the extension marketplace:

out of curiosity, do you use the snap package manager (info)? we’re looking at using that for easier cross-distro compatibility.

Nah, I have enough different installation mechanisms taking up space in my brain. :slight_smile: I use dnf and yum and rpm, in that order.

Thanks for the workaround; I’ll give that a try.

Do I need to install the workbench as root or can it be done as a normal unprivileged user?

Okey, I tried installing the workbench as root; it apparently worked, but crapped out saying I shouldn't try to run it as superuser. So I tried running the .AppImage as my normal user; it says Visual Studio and the Workbench are installed, and then tried to install components. The end result:

Visual Studio Code [app]
Error: User did not grant permission.
at /tmp/.mount_ParticZRPAi0/resources/app.asar/node_modules/sudo-prompt/index.js:111:23
at ChildProcess.exithandler (child_process.js:310:5)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:961:16)
at Socket.stream.socket.on (internal/child_process.js:380:11)
at Socket.emit (events.js:182:13)
at Pipe._handle.close [as _onclose] (net.js:596:12)

and

Particle Workbench [extension]
TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received type undefined
at normalizeSpawnArguments (child_process.js:409:11)
at Object.spawn (child_process.js:534:38)
at module.exports (/tmp/.mount_ParticZRPAi0/resources/app.asar/node_modules/execa> /index.js:205:26)
at VSCodeInstallerLinux.installExtension (/tmp/.mount_ParticZRPAi0/resources/app.asar/src/installers/vscode/base.js:80:17)

I'm thinking I should UNinstall all of the stuff, and re-run the VS and .AppImage installs entirely as a non-privileged user.

Except.. how do I reliably and completely remove this stuff?

Thanks!

Actually, if there are any network restrictions then we will face these issues. The best solution is install particle workbench in VS code and flash a sample program after the device is connected to cloud or else reset the device and run the particle in DFU mode.

Instead of using sudo run in root terminal to avoid network permissions.

you're still trying to run the installer?

as i said previously, that's not going to work - try installing them individually as described here:

Meh. I got it to work, but then got distracted by some heavy work, and then getting unemployed, and never got back to update this. I don’t remember what I did, but it’s not an issue for me now, so I’m just going to close it.

My apologies for being to unresponsive and dilatory. :frowning:

1 Like