platformio / platformio-vscode-ide

PlatformIO IDE for VSCode: The next generation integrated development environment for IoT
https://marketplace.visualstudio.com/items?itemName=platformio.platformio-ide
Apache License 2.0
1.18k stars 191 forks source link

Multiple requests to rebuild the project IntelliSense index #2363

Closed ivankravets closed 3 years ago

ivankravets commented 3 years ago

The reasons for "Multiple requests to rebuild the project IntelliSense index have been received" error:

  1. External tools or custom extra scripts DELETE PlatformIO Core's libdeps_dir that trigger infinitely VSCode to re-install all dependencies from scratch. Please fix your code and DO NOT manipulate with libdeps_dir manually. We recommended using the lib_dir folder for the private project libraries/components.
  2. 3rd-party antivirus tools block PlatormIO Core dependency installer.
  3. You made a lot of frequent changes to the platformio.ini file that triggered a lot of requests to rebuild the index. Wait for a few minutes, there is 10 minutes protection window.

If you still DO NOT AGREE with the steps above, you can rebuild the index manually by running the PlatformIO: Rebuild C/C++ Index command in VSCode.

rrayman commented 2 years ago

For those of us that are new to this environment how do you change to the lib folder?

DeathmannX commented 2 years ago

For those of us that are new to this environment how do you change to the lib folder?

Any updates how to do that?

ivankravets commented 2 years ago

Please check the extra scripts that you don't have recursion. Do you have in "platformio.ini" extra_scripts option?

rasmousein commented 2 years ago

What ?

techniker commented 2 years ago

Never mind, fixed itself.

the78mole commented 2 years ago

Never mind, fixed itself.

Could you write down, how you solved it? I have the same Problem.

Blaseee commented 2 years ago

I faced the same problem, but now the status of the build is SUCCESS.

Here is my procedure, but I do not guarantee it. And whether the Marlin is necessary from step 1, I do not want to check afterwards.

Step 1: I installed the "Auto Build Marlin" plugin and loaded the current "platformio" as a project over Open a Marlin 2.x Folder.

Step 2: In "Platform IO" I now loaded my build that I wanted to create (this was also downloaded and not created by me). In the "platformio.ini" I had to adjust a lib_deps path, because the required download was no longer available at the address, but an alternative was found and the link in the ini was adjusted.

Step 3: Now I closed the program, rebooted the computer and pressed the build button directly after opening the program. After that everything went through without errors.

As I said, this worked for me and my build, if there are other adjustments to be made with the same basic problem, I don't know.

I hope I could help.

robertstuart commented 2 years ago

Sorry. I am having the same problem and need some help. I am a new user of PlatformIO. As for the possible causes:

  1. I have made no changes to the standard installation.
  2. I turned off my anti-virus with no change in behavior.
  3. I have made no changes to the ini file. Finally, I don't know how to "Rebuild C/C++ Index". Could you give me some more detailed instructions? Thanks.
ivankravets commented 2 years ago

I've just updated the first recommendation regarding libdeps/lib folders.

@robertstuart, could you share your lib_deps list from the platformio.ini? it looks like PlatformIO reinstalls libraries on every build. This triggers IDE to rebuild C/C++ index because new libs are detected in .pio/$env/libdeps directory.

Could you check .pio/$env/libdeps? Do you see recently added folders?

robertstuart commented 2 years ago

Here is the platformio.ini: bob@roberts-air SevenPotatoe % cat platformio.ini

[env:teensy40]
platform = teensy
board = teensy40
framework = arduino
lib_deps = 
    pololu/Tic@^2.1.1
    sparkfun/SparkFun 9DoF IMU Breakout - ICM 20948 - Arduino Library@^1.2.9

The libdeps folder shows both libraries, neither of which was recently added.

ivankravets commented 2 years ago

@robertstuart , does this project work well for you robertstuart.zip ?

robertstuart commented 2 years ago

No. The project you sent me shows the exact same behavior. This problem started recently - probably after the last update.

Thanks for helping with this...

ivankravets commented 2 years ago

See https://docs.platformio.org/en/latest/faq.html#multiple-platformio-cores-in-a-system

  1. Please remove global PIO Cores ( see docs above )
  2. Remove %USEPROFILE%/.platformio folder and restart VSCode. Wait when all packages are installed.

Did it help?

robertstuart commented 2 years ago

I don't understand 1. but I don't think I have CLI or any other installations. I did 2. and after the re-installation, the problem still exists.

HelgeBoe commented 2 years ago

Pretty much the same issue here... Used VSCode + platformio for quite some time without any problems on my MacBook to do some ESP32 programming. Couple of days ago IntelliSense stopped working (without me doing any changes to my projects, neither to the code nor to any ini files etc.), I did a re-installation, basically as suggested above (uninstalling the extension in VSCode, deleting Met .platformio-folder, and then again installing platformio), but the problem still remains the same.

robertstuart commented 2 years ago

It's probably irrelevant but I note that both us are using a MacBook.

Massimiliano-solutiontech commented 2 years ago

Same issue and I'm using two MacBookPros an Intel i7 and a M1 max, I already did a full clean installation of Platform.io but the issue is still present

ivankravets commented 2 years ago

Please open PlatformIO Core CLI (terminal icon) on the bottom status bar), and type pio system info. Share an output here. Thanks

Massimiliano-solutiontech commented 2 years ago

@ivankravets here the output

--------------------------  -----------------------------------------------------------
PlatformIO Core             6.0.1
Python                      3.9.12-final.0
System Type                 darwin_arm64
Platform                    macOS-12.3.1
File System Encoding        utf-8
Locale Encoding             UTF-8
PlatformIO Core Directory   /Users/massimilianomontagni/.platformio
PlatformIO Core Executable  /Users/massimilianomontagni/.platformio/penv/bin/platformio
Python Executable           /Users/massimilianomontagni/.platformio/penv/bin/python
Global Libraries            0
Development Platforms       2
Tools & Toolchains          14
--------------------------  -----------------------------------------------------------
robertstuart commented 2 years ago

Here is mine:

bob@roberts-air SevenPotatoe % pio system info


PlatformIO Core 6.0.1 Python 3.10.2-final.0 System Type darwin_arm64 Platform macOS-12.4 File System Encoding utf-8 Locale Encoding UTF-8 PlatformIO Core Directory /Users/bob/.platformio PlatformIO Core Executable /Users/bob/.platformio/penv/bin/platformio Python Executable /Users/bob/.platformio/penv/bin/python Global Libraries 0 Development Platforms 1 Tools & Toolchains 5


bob@roberts-air SevenPotatoe %

HelgeBoe commented 2 years ago

here we go...


PlatformIO Core 6.0.2b1 Python 3.8.9-final.0 System Type darwin_x86_64 Platform macOS-12.4 File System Encoding utf-8 Locale Encoding UTF-8 PlatformIO Core Directory /Users/helge/.platformio PlatformIO Core Executable /Users/helge/.platformio/penv/bin/platformio Python Executable /Users/helge/.platformio/penv/bin/python Global Libraries 0 Development Platforms 2 Tools & Toolchains 10


foxieproducts commented 2 years ago

See https://docs.platformio.org/en/latest/faq.html#multiple-platformio-cores-in-a-system

  1. Please remove global PIO Cores ( see docs above )
  2. Remove %USEPROFILE%/.platformio folder and restart VSCode. Wait when all packages are installed.

Did it help?

Nuking ~/.platformio (from orbit) solved this issue for me. macOS.

robertstuart commented 2 years ago

It did not help. The problem remains.

On Mon, May 30, 2022 at 9:43 PM foxieproducts @.***> wrote:

See https://docs.platformio.org/en/latest/faq.html#multiple-platformio-cores-in-a-system

  1. Please remove global PIO Cores ( see docs above )
  2. Remove %USEPROFILE%/.platformio folder and restart VSCode. Wait when all packages are installed.

Did it help?

Nuking ~/.platformio (from orbit) solved this issue for me. macOS.

— Reply to this email directly, view it on GitHub https://github.com/platformio/platformio-vscode-ide/issues/2363#issuecomment-1141636714, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABA7V7TMJVL6OE6OLBN7P3LVMWDFPANCNFSM4XI5SHZA . You are receiving this because you were mentioned.Message ID: @.***>

-- Bob Bundy +1 720-212-1414

MonsterThews commented 2 years ago

I get the 'Multiple request to build...' window all the time. It doesn't have any effect on building or uploading or anything in the menu bar. But it covers the bottom quadrant of the window, which is a pain in the butt.

ivankravets commented 2 years ago

Very strange issue, only a few people are affected. I could not reproduce it on macOS or Windows (VM). If someone can provide a remote session to debug this issue, I would be thankful. Please email me@ikravets.com

Massimiliano-solutiontech commented 2 years ago

@foxieproducts yeah same outcome of @robertstuart

Massimiliano-solutiontech commented 2 years ago

@ivankravets I just sent you an email from massimiliano@solutiontech.tech

MonsterThews commented 2 years ago

I have two issues, including this one. I'll see if Multiple Requests continues despite the other issue. I think it does. My other issue is IntelliSense Rebuilding and Loading Tasks. They start as soon as I open PIO and never quit. I can't upload, build, clean or open Serial monitor while it Rebuilds and Loads Tasks.

On Tuesday, May 31, 2022, 10:00:39 AM EDT, Ivan Kravets ***@***.***> wrote:  

Very strange issue, only a few people are affected. I could not reproduce it on macOS or Windows (VM). If someone can provide a remote session to debug this issue, I would be thankful. Please email @.***

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

MonsterThews commented 2 years ago

Due to the Rebuild/Load issue, I am not seeing the window.I hope my Rebuild/Load issue is resolved soon, because I can't do anything.When it's fixed, I'll let you know. On Tuesday, May 31, 2022, 10:00:39 AM EDT, Ivan Kravets @.***> wrote:

Very strange issue, only a few people are affected. I could not reproduce it on macOS or Windows (VM). If someone can provide a remote session to debug this issue, I would be thankful. Please email @.***

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

ivankravets commented 2 years ago

It seems we have found a problem.

  1. Please open PlatformIO Core CLI
  2. Type pio upgrade --dev
  3. Restart VSCode.

Does it work now?

MonsterThews commented 2 years ago

There is no change.Rebuilding IntelliSense Index, Loading Tasks

On Tuesday, May 31, 2022, 03:04:27 PM EDT, Ivan Kravets ***@***.***> wrote:  

It seems we have found a problem.

Does it work now?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

ivankravets commented 2 years ago

Do you see "multiple requests" warning?

MonsterThews commented 2 years ago

OH!I haven't seen 'Multiple Requests' since the other issue started.VS Code is stuck in Rebuilding IntelliSense Index and Loading Tasks. It can't generate that error.

On Tuesday, May 31, 2022, 03:10:31 PM EDT, Ivan Kravets ***@***.***> wrote:  

Do you see "multiple requests" warning?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

ivankravets commented 2 years ago

@MonsterThews, could you try pio project init --ide vscode? Does this command finish?

MonsterThews commented 2 years ago

"Updating metadata for the vscode IDE...Project has been successfully updated!" Then I did it in the CLI:PS C:\Users\joema\Documents\PlatformIO\Projects\Phoenix_Dashboard_Receiver> Updating metadata for the vscode IDE... >> Project has been successfully updated!Updating metadata for the vscode IDE...>> Project has been successfully updated!pio project init --ide vscodeUpdating : The term 'Updating' is not recognized as the name of a cmdlet, function, script file, or operable      program. Check the spelling of the name, or if a path     was included, verify that the path is correct and try     again.At line:1 char:1+ Updating metadata for the vscode IDE...+ ~~    + CategoryInfo          : ObjectNotFound: (Updating:     String) [], CommandNotFoundException    + FullyQualifiedErrorId : CommandNotFoundException     Project : The term 'Project' is not recognized as the name of a cmdlet, function, script file, or operable      program. Check the spelling of the name, or if a path     was included, verify that the path is correct and try     again.At line:2 char:1+ Project has been successfully updated!Updating metadata for the vscod ...+ ~~~    + CategoryInfo          : ObjectNotFound: (Project:S     tring) [], CommandNotFoundException    + FullyQualifiedErrorId : CommandNotFoundException     Project : The term 'Project' is not recognized as the name of a cmdlet, function, script file, or operable      program. Check the spelling of the name, or if a path     was included, verify that the path is correct and try     again.At line:3 char:1+ Project has been successfully updated!pio project init  --ide vscode+ ~~~~~    + CategoryInfo          : ObjectNotFound: (Project:S     tring) [], CommandNotFoundException    + FullyQualifiedErrorId : CommandNotFoundException     PS C:\Users\joema\Documents\PlatformIO\Projects\Phoenix_Dashboard_Receiver>

On Tuesday, May 31, 2022, 03:38:24 PM EDT, Ivan Kravets ***@***.***> wrote:  

@MonsterThews, could you try pio project init --ide vscode? Does this command finish?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

robertstuart commented 2 years ago

I ran the "pio upgrade --dev" and restarted. I no longer get multiple rebuilds and I get no warnings. This is good news. Thanks.

HelgeBoe commented 2 years ago

I could successfully run the "pro project init --ide vscode" command and also the "pro upgrade --dev", but I remain with the error "The language server crashed 5 times in the last 3 minutes. It will not be restarted." and "Connection to server got closed. Server will not be restarted.". Version of the C/C++ extension is v1.9.8.

Version is also 6.0.2rc2, so updating did not resolve the issue for me...

Massimiliano-solutiontech commented 2 years ago

I confirm that the issue is solved in 6.0.2rc2

Thanks @ivankravets

MonsterThews commented 2 years ago

Thank y'all for your help.

trainman75 commented 2 years ago

+1 for 6.0.2rc2 fixing the problem on Mac.

PlatformIO Core             6.0.2rc2
Python                      3.10.4-final.0
System Type                 darwin_x86_64
Platform                    macOS-12.5

6.0.1 had also been deleting most of the .pio/build directory immediately after building, if it even got that far, so was rebuilding all of the libraries every time. Thanks for resolving it.

HelgeBoe commented 2 years ago

Strange things happening here... opened VSCode today and basically it looked like a freshly installed: explorer was totally empty (I hade before some 5 or 6 projects available in explorer). After opening a project via platformio it shows up in the explorer and magically all errors/ warning are gone and everything works as expected... no clue, what happened, but finally happy ;-) Seriously, anybody any idea or observed something similar?

Sorry, I know, that this is not at all an exact description, but I did not touch at all VSCode or platformio for the last two days, and I would love to understand, what resolved the issues I encountered before..., also checked pin system info, only change I see: development platforms now is 3 instead of 2...

ivankravets commented 2 years ago

This is VSCode. We don't manage projects in explorer. Please check that you didn't move your project into another folder.

AmberElferink commented 1 year ago

I am having the same issue. I tried "pio upgrade --dev", but it didn't fix my issue. I also: deleted the .pio and .vscode folder, uninstalled platformio, shut down my PC, installed it again and freshly opened the project. I am still getting the Multiple requests to build project issue.

AmberElferink commented 1 year ago

I solved my issue. Apparently on uninstalling PlatformIO the .platformio folder located in C:/Users/\<username> for Windows (or ~/.platformio for linux) does not get deleted. I uninstalled PlatformIO, closed VScode, deleted the .pio folder in my project, deleted that .platformio folder. Then opened VScode, reinstalled PlatformIO and everything worked properly again.

officesteve commented 1 year ago

I am no longer interested in your information,Please do not reply to this emai for me

thanks

dagnum commented 1 year ago

Removing %USERPROFILE%/.platformio folder worked for me.

Ductapemaster commented 6 months ago

Hello, I seem to be having this issue despite being on a later version of PIO than the above commit is for (6.1.11). I found this thread as I received an error in VSC linking me here.

I've attached as much info as I can about my setup. What I have tried so far:

Output of pio system info:

/Users/dankouba/.platformio/penv/lib/python3.9/site-packages/urllib3/__init__.py:34: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
  warnings.warn(
--------------------------  -----------------------------------------------
PlatformIO Core             6.1.11
Python                      3.9.6-final.0
System Type                 darwin_arm64
Platform                    macOS-14.0
File System Encoding        utf-8
Locale Encoding             UTF-8
PlatformIO Core Directory   /Users/dankouba/.platformio
PlatformIO Core Executable  /Users/dankouba/.platformio/penv/bin/platformio
Python Executable           /Users/dankouba/.platformio/penv/bin/python
Global Libraries            0
Development Platforms       1
Tools & Toolchains          5
--------------------------  -----------------------------------------------

my platformio.ini:

[env:dodec_esp32]
platform = espressif32
board = esp32dev
framework = arduino
monitor_port = /dev/cu.usbserial-*
monitor_speed = 115200
build_flags = 
    -DLV_CONF_SKIP
    -DLV_CONF_INCLUDE_SIMPLE
    -DLV_COLOR_16_SWAP
    -DUSER_SETUP_LOADED=1
    -DST7796_DRIVER=1
    -DUSE_HSPI_PORT=1
    -DPIN_SDA=18
    -DPIN_SCL=19
    -DTFT_MISO=12
    -DTFT_MOSI=13
    -DTFT_SCLK=14
    -DTFT_CS=15
    -DTFT_DC=21
    -DTFT_RST=22
    -DTFT_BL=23
    -DLV_FONT_MONTSERRAT_12
    -DLV_FONT_MONTSERRAT_16
    -DLV_FONT_MONTSERRAT_20
    -DLV_FONT_MONTSERRAT_24
    -DLV_FONT_MONTSERRAT_26
    -DLV_FONT_MONTSERRAT_30
    -DLV_FONT_MONTSERRAT_44
    -DSPI_FREQUENCY=60000000
    -DSPI_READ_FREQUENCY=60000000
    -DSMOOTH_FONT
    -DCORE_DEBUG_LEVEL=5
lib_deps = 
    Bodmer/TFT_eSPI
    lvgl/lvgl@^8.3.9
    fastled/FastLED@^3.6.0

Additionally, I have disabled as many extensions as possible to avoid any clashes. All that is running in my workspace:

What additional steps do I need to take to debug?

ivankravets commented 6 months ago

@Ductapemaster, could you open CLI and type:

pio upgrade --dev

Restart VSCode.

Now, open again CLI and type pio system info. Do you still see this SSL warning?

Ductapemaster commented 6 months ago

Hey Ivan, unfortunately the warning is persistent, see below. Additionally, the dev branch still has the same reinstallation issue, so no change there.

(base) dankouba@KoubapesonalMBP:~/Documents/projects/domecontroller_fw_esp32$ pio upgrade --dev
/Users/dankouba/.platformio/penv/lib/python3.9/site-packages/urllib3/__init__.py:34: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
  warnings.warn(
Please wait while upgrading PlatformIO Core ...
/Users/dankouba/.platformio/penv/lib/python3.9/site-packages/urllib3/__init__.py:34: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
  warnings.warn(
/Users/dankouba/.platformio/penv/lib/python3.9/site-packages/urllib3/__init__.py:34: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
  warnings.warn(
PlatformIO has been successfully upgraded to 6.1.12a6
Release notes: https://docs.platformio.org/en/latest/history.html
Warning! Please restart IDE to affect PIO Home changes
(base) dankouba@KoubapesonalMBP:~/Documents/projects/domecontroller_fw_esp32$ pio system info
/Users/dankouba/.platformio/penv/lib/python3.9/site-packages/urllib3/__init__.py:34: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
  warnings.warn(
Please wait while upgrading PlatformIO...
PlatformIO has been successfully upgraded to 6.1.12a6!

*******************************************************************************************************************************************
If you like PlatformIO, please:
- star it on GitHub > https://github.com/platformio/platformio-core
- follow us on LinkedIn to stay up-to-date on the latest project news > https://www.linkedin.com/company/platformio/
*******************************************************************************************************************************************

--------------------------  -----------------------------------------------
PlatformIO Core             6.1.12a6
Python                      3.9.6-final.0
System Type                 darwin_arm64
Platform                    macOS-14.0
File System Encoding        utf-8
Locale Encoding             UTF-8
PlatformIO Core Directory   /Users/dankouba/.platformio
PlatformIO Core Executable  /Users/dankouba/.platformio/penv/bin/platformio
Python Executable           /Users/dankouba/.platformio/penv/bin/python
Global Libraries            0
Development Platforms       1
Tools & Toolchains          8
--------------------------  -----------------------------------------------
(base) dankouba@KoubapesonalMBP:~/Documents/projects/domecontroller_fw_esp32$ pio system info
/Users/dankouba/.platformio/penv/lib/python3.9/site-packages/urllib3/__init__.py:34: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
  warnings.warn(
--------------------------  -----------------------------------------------
PlatformIO Core             6.1.12a6
Python                      3.9.6-final.0
System Type                 darwin_arm64
Platform                    macOS-14.0
File System Encoding        utf-8
Locale Encoding             UTF-8
PlatformIO Core Directory   /Users/dankouba/.platformio
PlatformIO Core Executable  /Users/dankouba/.platformio/penv/bin/platformio
Python Executable           /Users/dankouba/.platformio/penv/bin/python
Global Libraries            0
Development Platforms       1
Tools & Toolchains          8
--------------------------  -----------------------------------------------
ivankravets commented 6 months ago

@Ductapemaster , you issue has been fixed. Please remove /Users/dankouba/.platformio folder and restart VSCode.