-
Notifications
You must be signed in to change notification settings - Fork 227
New macos update causes {"code": null} error #1681
Comments
Identical to the bug I'm seeing after the new macOS update. |
I believe you are correct that this is a permissions issue. I'm experiencing the same thing after updating to Sonoma, and in the Mac's Console.app, I see the following for each attempt to verify or upload a sketch:
|
Please please please throw the solution in here if you figure it out 🙏 |
After some digging around I did find a solution that worked for me. The trick was to toggle some special permissions for the VSCode app in System Settings. What I did was:
Quit and restart VSCode and see if the extension now works. Interestingly, I was able to remove the special permissions after VSCode started working and it continued to work just fine. |
Awesome, I can confirm that this fixes (well, works around) the issue. |
@dbmzzo I had the same problem for days and finally with your help this got solved ! |
I don't see that as an issue but really for what it is for: your own security You understand that giving Visual Studio Code full access to your whole disk creates a risk (if there is a bug or vulnerability in vscode then your whole Mac might be at risk). It's unfortunate that vscode needs read / write access to areas that are off limits. That's a design flaw there. that was a good note though (if that works after a reboot)
If that works then it would be a sound advice to revoke the elevated rights if they are not needed. |
@benmcmorran @elektronikworkshop @yaohaizh @gcampbell-msft Thanks |
THX |
EDIT: Based on additional experience with this issue, I now believe that I had two issues when I originally wrote this comment: 1) a quarantined extension, indicated by the Original comment unedited:
Additional notes:
Finally, while I don't think @dbmzzo's steps were needed, for completeness sake, I did try those settings first. Here are the steps I actually followed:
That last step (#3) suggests to me that the "Privacy & Security > {Full Disk Access, Developer Tools, App Management}" settings are not needed, but I could be wrong. It's possible that my machine had two issues: a) the broken extension that needed to be reinstalled on Sonoma, b) VS code needed one-time access to make a change that was granted by the Privacy & Security settings. |
I know the original disk access fix worked for the people who needed it on my end. It sounds like you had a different problem. |
Regarding the @ at the end of the permissions, it’s likely metadata flagging a quarantined file (in this case app downloaded from the web / brought in through a third party app or source) and which drives Gatekeeper’s notifications. |
Given the file permissions / file attributes issue I found, and the Privacy & Security settings that worked for others, it would be great if others with this issue tried the following:
|
Hi, I have the same issue after macos update.
Thank you in advance for help. |
Faced to the very same issue on Macos 14 yesterday. Interesting, it's not possible to find anything useful using Google search - issue is new and not really known by the search engine. Today I decided to have a look on the open issues here and found it immediately :) I granted full disk access, add to app management and developer tools, so extension started to work - I could verify and upload my sketch. After that I switched the full disk access off again, restarted the VS Code and it looks like still working. Will keep the setup for a while. Hope, MS will fix this annoying issue or at leas provide official FAQ for it. |
As temp solution. UPD
deleting of this file allows to build. Not quite handy, but maybe will help to solve this issue sooner. |
I was able to resolve
Like @nosknut, I observed that
|
I confirm this works |
Following on from this.. Note: I did/do not have arduino-cli installed via homebrew or similar. The permissions issue seems to relate to the file name. The bundled version of the arduino-cli has been renamed to arduino-cli.app. This is what I think is triggering gatekeeper to kill it. To show this try the following:
I don't view the above as anything like a permanent solution however it did get me going again without any permissions changes that would take more analysis than i want to do right now. I'm not sure why the devs changed the file name however it seems to be what is driving the issue so I assume it would be easy enough to change it back in the next version of this plugin. |
I've now encountered I have reliably been able to fix the issue every time using @dbmzzo's instructions. Specifically:
— |
What is the possibility of resolving this issue for macOS Sonoma (M1 MacBook)? And what about PlatformIO for Arduino, What do you think? |
As I said above, "all" the devs have to do is rename arduino-cli.app to arduino-cli and then change the default name for the Arduino CLI from arduino-cli.app to arduino-cli in the plugin code and all should be good. I assume this would be quick and easy to do for the Devs. If it is not then I would be interested to hear why. In the meantime, if you want to avoid having to play with permissions after every restart you can just use the combination of @btmills and my formulas mentioned above. |
Go the extensions, search for arduino extension and click on "switch to pre-release version" beside uninstall button and click on "Reload required" |
This remains an issue on MacOS. Are there any plans to fix it? I am curious to hear a dev response to @andrewk123's comment above which looks like the best solution if it works. #1681 (comment) |
I fixed the problem with following #1681 (comment) . The version of Auduino extension I've fixed is v0.6.230727001 (pre-release). |
I have seen this problem on 2 macs now for a pair of students i tutor.
The tirst one was unsure of what had changed but the second student pointed out he recently updated from "Big Sur" to "Sonoma".
The error message is produced by these lines in the vscode-areduino extension codebase:
https://github.com/microsoft/vscode-arduino/blob/main/src/arduino/arduino.ts#L863-L866
The { "code": null } error comes from the reason object and seems to me the nodejs spawn function is producing a null error code.
I have attempted to install the arduino-cli manually on the first student's computer and using the cli directly through a terminal poses no problems. I was unable to configure the arduino extension to use the cli instead of the bundled cli in the time available.
It seems clear that the issue lies between the run function i linked above and the arduino-cli.
This could be caused by filesystem access issues related to the new os or an issue with the extension being able to execute the command?
The text was updated successfully, but these errors were encountered: