'Can I use HTTPS instead of HTTP for host availability?

I just started setting up Flutter (Channel stable, 3.0.0) on my Centos 7 server. I've set up the proxy configuration and added chrome as connected device. I did not install Android Studio since I won't be using it on this server.

When running my Flutter webapp using the command

flutter run -d chrome

I get the following error:

Proxy failed to establish tunnel (407 Proxy Authentication Required)
---- Log transcript ----
FINE: Pub 2.17.0
MSG : Resolving dependencies...
SLVR: fact: rob_chatbot is 1.0.0+1
SLVR: derived: rob_chatbot
SLVR: fact: rob_chatbot depends on flutter from sdk
SLVR: fact: rob_chatbot depends on cupertino_icons ^1.0.2
SLVR: fact: rob_chatbot depends on flutter_test from sdk
SLVR: fact: rob_chatbot depends on flutter_lints ^1.0.0
SLVR:   selecting rob_chatbot
SLVR:   derived: flutter_lints ^1.0.0
SLVR:   derived: flutter_test from sdk
SLVR:   derived: cupertino_icons ^1.0.2
SLVR:   derived: flutter from sdk
IO  : Get versions from https://pub.dartlang.org/api/packages/flutter_lints.
IO  : HTTP GET https://pub.dartlang.org/api/packages/flutter_lints
    | Accept: application/vnd.pub.v2+json
    | X-Pub-OS: linux
    | X-Pub-Command: get
    | X-Pub-Session-ID: 9143CA91-A5EC-4620-A2C9-817E982427C0
    | X-Pub-Environment: flutter_bot:flutter_cli:verify:run
    | X-Pub-Reason: dev
    | user-agent: Dart pub 2.17.0
IO  : Get versions from https://pub.dartlang.org/api/packages/lints.
IO  : HTTP GET https://pub.dartlang.org/api/packages/lints
    | Accept: application/vnd.pub.v2+json
    | X-Pub-OS: linux
    | X-Pub-Command: get
    | X-Pub-Session-ID: 9143CA91-A5EC-4620-A2C9-817E982427C0
    | X-Pub-Environment: flutter_bot:flutter_cli:verify:run
    | user-agent: Dart pub 2.17.0
SLVR: Version solving took 0:00:00.160384 seconds.
    | Tried 1 solutions.
FINE: Resolving dependencies finished (0.1s).
ERR : Proxy failed to establish tunnel (407 Proxy Authentication Required)
FINE: Exception type: ClientException
FINE: package:pub/src/source/hosted.dart 946:7                       HostedSource._throwFriendlyError
    | package:pub/src/source/hosted.dart 368:7                       HostedSource._fetchVersionsNoPrefetching
    | ===== asynchronous gap ===========================
    | dart:async                                                     Future.catchError
    | package:pub/src/utils.dart 109:52                              captureErrors.wrappedCallback
    | package:stack_trace                                            Chain.capture
    | package:pub/src/utils.dart 122:11                              captureErrors
    | package:pub/src/command.dart 183:13                            PubCommand.run
    | package:args/command_runner.dart 209:27                        CommandRunner.runCommand
    | package:pub/src/command_runner.dart 174:24                     PubCommandRunner.runCommand
    | package:pub/src/command_runner.dart 159:20                     PubCommandRunner.run
    | package:dartdev/dartdev.dart 45:56                             runDartdev
    | /b/s/w/ir/cache/builder/sdk/pkg/dartdev/bin/dartdev.dart 11:9  main
---- End log transcript ----

When I run Flutter doctor -v, I get:

[✓] Flutter (Channel stable, 3.0.0, on CentOS Linux 7 (Core) 3.10.0-1160.59.1.el7.x86_64, locale en_PH.UTF-8)
    • Flutter version 3.0.0 at /home/appadm/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ee4e09cce0 (2 weeks ago), 2022-05-09 16:45:18 -0700
    • Engine revision d1b9a6938a
    • Dart version 2.17.0
    • DevTools version 2.12.2

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.


[✓] Chrome - develop for the web
    • Chrome at google-chrome

[!] Linux toolchain - develop for Linux desktop
    • clang version 3.4.2 (tags/RELEASE_34/dot2-final)
    • cmake version 3.22.4
    • ninja version 1.10.2
    • pkg-config version 0.27.1
    ✗ pkg-config 0.29.0 or later is required.

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).

[✓] Proxy Configuration
    • HTTP_PROXY is set
    • NO_PROXY is localhost,127.0.0.1,::1,https://pub.dartlang.org
    • NO_PROXY contains localhost
    • NO_PROXY contains 127.0.0.1
    • NO_PROXY contains ::1

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • CentOS Linux 7 (Core) 3.10.0-1160.59.1.el7.x86_64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 101.0.4951.64

[!] HTTP Host Availability
    ✗ HTTP host "https://cocoapods.org/" is not reachable. Reason: An error occurred while checking the HTTP host: Proxy
      failed to establish tunnel (407 Proxy Authentication Required)
    ✗ HTTP host "https://maven.google.com/" is not reachable. Reason: An error occurred while checking the HTTP host:
      Proxy failed to establish tunnel (407 Proxy Authentication Required)
    ✗ HTTP host "https://pub.dev/" is not reachable. Reason: An error occurred while checking the HTTP host: Proxy
      failed to establish tunnel (407 Proxy Authentication Required)
    ✗ HTTP host "https://cloud.google.com/" is not reachable. Reason: An error occurred while checking the HTTP host:
      Proxy failed to establish tunnel (407 Proxy Authentication Required)

I have found one answer that said to add https://pub.dartlang.org/ to my proxy rules, though I am not sure where to find that.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source