Using latest esp-idf (4.3.1) in platformio.ini

It is missing an ESP-IDF file here. This is most likely due to the fact that you can’t just specify the source of framework-espidf to be from their github repo. In order for something to be usable as a package (in platform_packages), it needs to have a package.json metainfo file at the top level. See here for a more in-depth explanation.

Try forking the ESP-IDF repo, going to the v4.3.1 branch and adding a package.json to it, akin to the one found in https://github.com/maxgerhardt/esp-idf/blob/master/package.json but with corrected version info. All that can be comfortably done via the Github GUI (switch branch, “Add file → Upload file”)