Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http.proxy in vscode is not set for build/upload task #3287

Closed
yyjdelete opened this issue Aug 24, 2022 · 4 comments
Closed

http.proxy in vscode is not set for build/upload task #3287

yyjdelete opened this issue Aug 24, 2022 · 4 comments
Labels
Milestone

Comments

@yyjdelete
Copy link

yyjdelete commented Aug 24, 2022

In current version, installer for platform.io follows http.proxy settings in vscode, but build task and upload task(which may download some toolchains/frameworks/platform resource for the first time) start from another process from vscode don't follow it

patchOSEnviron() {
const extraVars = {
PLATFORMIO_IDE: utils.getIDEVersion(),
};
// handle HTTP proxy settings
const http_proxy = vscode.workspace.getConfiguration('http').get('proxy');
if (http_proxy && !process.env.HTTP_PROXY && !process.env.http_proxy) {
extraVars['HTTP_PROXY'] = http_proxy;
}
if (!vscode.workspace.getConfiguration('http').get('proxyStrictSSL')) {
// https://stackoverflow.com/questions/48391750/disable-python-requests-ssl-validation-for-an-imported-module
extraVars['CURL_CA_BUNDLE'] = '';
}
if (http_proxy && !process.env.HTTPS_PROXY && !process.env.https_proxy) {
extraVars['HTTPS_PROXY'] = http_proxy;
}
if (this.getSetting('customPyPiIndexUrl')) {
extraVars['PIP_INDEX_URL'] = this.getSetting('customPyPiIndexUrl');
}
pioNodeHelpers.proc.patchOSEnviron({
caller: 'vscode',
extraPath: this.getSetting('customPATH'),
extraVars,
});
}

Should the above logic also be added here?

toVSCodeTask(projectTask) {
const envClone = Object.create(process.env);
if (process.env.PLATFORMIO_PATH) {
envClone.PATH = process.env.PLATFORMIO_PATH;
envClone.Path = process.env.PLATFORMIO_PATH;
}

@yyjdelete yyjdelete changed the title http.proxy in vscode is not set for build task http.proxy in vscode is not set for build/upload task Aug 24, 2022
@stale
Copy link

stale bot commented Oct 29, 2022

This issue has been automatically marked as stale because it has not had recent activity. Please provide more details or it will be closed if no further activity occurs. Thank you for your contributions.

@ivankravets
Copy link
Member

Thanks for the report! Please update the extension to the v2.5.5

@AndreyNazarenko62
Copy link

Установил VSCODE для работы с esp32-wroom-32 devkit 1, в качестве расширения PlatformIO IDE, один раз скомпилировал пример со светодиодом, прошивка прошла, все заработало. Второй раз добавил в прошивку вывод числа в незанятый UART, тоже в норме, на осциллографе видно импульс. Потом стала возникать систематическая ошибка при сборке, потом пропала <Arduino.h> и наконец исчезла возможность запустить сборку и отладку.
Подскажите в каком направлении копать? Переустанавливал дважды - толку нетю

@ivankravets
Copy link
Member

@AndreyNazarenko62, this issue was related to the HTTP Proxy. If you don't use a Proxy, please forward your issue to https://community.platformio.org/ and our awesome community will help you. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants