Use IntelliJ proxy settings when running flutter/pub commands
See original GitHub issueSteps 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
C:\src\flutter\bin\flutter.bat --no-color packages get
Running "flutter packages get" in flutter_app...
Could not resolve URL "https://pub.dartlang.org".
pub get failed (69) -- attempting retry 1 in 1 second...
Go into Settings, and HTTP Proxy settings, automatic proxy conf is selected. Check connection is working when entering “https://pub.dartlang.org”.
Version info
[√] Flutter (Channel stable, v1.0.0, on Microsoft Windows [Version 10.0.16299.785], locale sv-SE)
• Flutter version 1.0.0 at C:\src\flutter
• Framework revision 5391447fae (5 days ago), 2018-11-29 19:41:26 -0800
• Engine revision 7375a0f414
• Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)
[√] Android toolchain - develop for Android devices (Android SDK 28.0.3)
• Android SDK at C:\Users\xxx\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
• All Android licenses accepted.
[√] Android Studio (version 3.2)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 31.1.1
• Dart plugin version 181.5656
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
[√] VS Code (version 1.29.1)
• VS Code at C:\Users\xxx\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 2.21.0
[√] VS Code, 64-bit edition (version 1.26.0)
• VS Code at C:\Program Files\Microsoft VS Code
• Flutter extension version 2.21.0
[√] Connected device (1 available)
• Pixel 3 • xxx • android-arm64 • Android 9 (API 28)
• No issues found!
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:14 (11 by maintainers)
Top Results From Across the Web
HTTP Proxy | IntelliJ IDEA Documentation - JetBrains
Specify proxy settings that IntelliJ IDEA should use to access the Internet. The HTTP proxy works for both HTTP and HTTPS connections.
Read more >Troubleshooting pub | Dart
From the command line, pub honors the http_proxy and https_proxy environment variables. You can set the proxy server environment variable as follows. On...
Read more >How to fix the proxy setup issue with flutter? - Stack Overflow
You need to run these 2 lines on both your Flutter folder and your project folder: set https_proxy=USERNAME:PASSWORD@hostname:port set ...
Read more >How to Store API Keys in Flutter: --dart-define vs .env files
the client should only communicate to your server, which acts as a proxy for the 3rd party API you intend to use. This...
Read more >Using Flutter in China
You must also set two environment variables to upgrade Flutter and use the pub package repository in China. Instructions are below. Important: Use...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Possibly relevant info: https://www.dartlang.org/tools/pub/troubleshoot#pub-get-fails-from-behind-a-corporate-firewall
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.