-
Notifications
You must be signed in to change notification settings - Fork 319
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
Use IntelliJ proxy settings when running flutter/pub commands #2914
Comments
Thanks for the report. Can you help me understand the issue better? Here's what I think happened. Is this correct:
|
Hi Nearly correct. |
Thanks for the additional info. I don't have a fix yet, but to get a work-around I want to make sure you understand the architecture. The Flutter plugin runs in the IDE and uses the IDE's proxy config (which is working). The project creation is done by the Flutter SDK, which is outside the IDE. You might need to set up a proxy for the flutter tool. Admittedly, that sounds like something the plugin should be doing but apparently it is not. @pq for additional insights. |
Possibly relevant info: |
@Fredro: to be clear, are you setting up your proxy info in preferences here?: |
@pq correct |
/cc @alexander-doroshko : since this should probably get addressed in the Dart Plugin too for vanilla pub actions. |
Right, currently, IDE simply starts tools from the Dart/Flutter SDK without caring about proxy configured in the IDE settings. As far as I understand, if a proxy is configured in the OS as recommended here, this will work because the IDE and therefore Flutter/Dart tools will inherit OS proxy settings. |
Thanks @alexander-doroshko! What's the recommended way to launch IDEA w/ custom environment settings? |
AFAIU, IDE inherits env vars from where it is started from. I mean if you have a proxy configured globally on Windows PC then IDE will be started with these env vars. I'm not sure you need to start IDE w/ custom environment settings. I haven't tested the use case myself though. |
I know that the IDE uses its proxy settings when the IDE itself needs to access the internet, I mean, verify license, fetch documentation, check for updates, etc. I'm not sure IDE needs to use its proxy settings when it launches 3rd party tools like tools from the Dart/Flutter SDK. I may be wrong, but as far as I can see, IDE doesn't use proxy settings for npm or node.js tools integration. |
Great thanks @alexander-doroshko! @Fredro : maybe try setting |
@pq Yes, setting |
Steps to Reproduce
Create new project, go through the setup. It tries to run "packages get", retries a lot. Close program because getting nowhere. Open studio again select project. Studio says "package get" not run, run now. I run it, and the result below
Go into Settings, and HTTP Proxy settings, automatic proxy conf is selected. Check connection is working when entering "https://pub.dartlang.org".
Version info
The text was updated successfully, but these errors were encountered: