Open alanmasu opened 4 months ago
I’m having this behavior as well, already for several months. Here is what’s happening:
after switching the [env] there is some activity from PlatformIO extension, showing a clock badge on the PlatformIO icon in the left-side taskbar.
if you try to build before this activity is completed, you get the Cannot read properties of undefined (reading ‘id’) error. That’s ok, it’s busy.
after some time working (typically a few hours), even if you wait until the environment switching activity is completed, this error also pops up. It only pops up when using the bottom toolbar. When using the left-side bar (Project Tasks), it still works. The problem is not only for build, also for test.
when you exit VSCode and re-open it, the bottom toolbar works again.
So currently my workaround is to close VSCode and open it again, but still it is an annoying thing.
My setup is Win11 and all up-to-date with PlatformIO.
My repo is this : Strooom/MuMo-v2-Node-SW: Firmware for the Museum Monitor V2 node (github.com) in case you want to check my platformio.ini
I'll try to find a way to reproduce it in a deterministic way. Will comment here if I find one.
Will also ask my colleague working on MacOs if he ever experienced this. (Working on the same repository)
Hi, I have this problem too. I have created two envs which differ only by a build_flag and upload_port.
When I use env default it compiles and uploads to both tabs while if I move to env specific I get the toast "Cannot read properties of undefined (reading 'id')"
Platformio version Core 6.1.11-Home 3.4.4
I don't know what other info I could add to help reproduce the problem.
Mattia
Exactly the same problem. Using PIO Core: 6.1.10 & PIO Home: 3.4.4
When switching the PIO Project Environment the buttons on the bottom do not work anymore, but on the left side unther project tasks they work fine.
+1 Here. Thought I was going mad trying to compile. Happened just after adding another environment. Could no longer use the buttons on the toolbar - getting the error as in the title.
I'm using a dozen or so environments with build flags to define a macro for different code compiling #ifdefs The environment I added was the same as the dozen or so others I have except a build flag -D was changed:
[env:ESP32_s2_mini_NoMsgs] extends = env:Release32_s2_mini build_flags = ${env:Release32_s2_mini.build_flags} -D GENIE_TYPE_NOMSG=true
Ended up here after googling, Hadn't thought to try the Project Tasks list menu and hey presto they work, but the toolbar buttons don't.
My addition. Shortcut keys (for the toolbar buttons) don't work either, however the notification message has a warning triangle whereas pressing a toolbar button gets a notification with a red X. The message is exactly the same.
Andy.
Hi Quick addition,
May not be relevant but the more info and all that...
I had a second vscode/platformio instance open with another project. That toolbar still worked while the broken one didn't.
A.
Same here. I am using latest T-Display-S3 examples. Some envs throws that error right away, some works and at the same time side menu works as expected. Only taskbar throws that error. Interestingly I do not have that problem with projects which have only one env in platformio.ini
Hi, I’m using PlatformIO for developing a project whit an RP2040 and an ESP01 connected to it.
So I’ve created multiple environments for differentiating sources, such functionality testing files and real application sources, but also for sources for the ESP01 and the RP2040:
and it’s ok, but when I change the environment buttons in the bottom navigation tab:![image](https://github.com/platformio/platformio-vscode-ide/assets/70368559/46cdfe50-9dd3-40a1-a414-76ffc0f5e6e8)
shows the![image](https://github.com/platformio/platformio-vscode-ide/assets/70368559/aba4d4ae-b644-4e25-be25-fcd1a26f51b1)
Cannot read properties of undefined (reading 'id')
error and for upload/build/etc… I have to use the PlatfomIO tab on the nav bar instead:In particular this error is triggered when environment is changed and also after a pair of hours of work! There is a discussion opened also in the Community Forum reachable here
I’m working on Windows 10 and VSCode 1.86.1 and PIO (core: 6.1.14) (Home: 3.4.4) There is any solution?? This is very uncomfortable…
Thanks in advance! Alan