Permission Issue on PlatformIO

I am re-posting in a different category because my first post didn’t receive any response.

I have been using platformIO for Arduino developments on a MAC with MACOS 12.3.1 (Monterey) with no problem for some time. But now when I try to list the installed libraries after clicking on the “home” icon at the bottom, I get the following pop-up screen and the system keeps waiting forever, forbidding to add or remove libraries. Any idea on how to fix this ? Thanks
Capture d’écran 2023-03-26 à 18.56.36

What stacktrace does it show when you click “Report Problem”?

Server error: {“type”:“PermissionError”,“args”:[1,“Operation not permitted”],“message”:“[Errno 1] Operation not permitted”}

Are there any errors in the development console? In VScode, Help → Toggle Developer Tools → Console.

Good catch ! But I fail to understand what’s going on. Here is a screen copy of the console:

Hm, sadly the output doesn’t say much about what path was tried to be accessed that made it throw that error. Not sure how to continue.

Maybe @ivankravets has more ideas how to get more debugging info out of it?

On Linux there’s the possibility of running VSCode under strace to see exactly what system calls with what arguments and return values were made, but I don’t think it’s available for Mac.

Could you open the system terminal and type

rm ~/.platformio/homestate.json

Restart VSCode. Does it work now?

Yes, it does ! Many thanks !
May I ask you what is the magic ?