Flutter app behind corporate firewall throws TLS error during packages get

后端 未结 4 1942
Happy的楠姐
Happy的楠姐 2021-01-01 02:38

Recently have installed Flutter and exploring hello-world app. Followed all steps mentioned at https://flutter.io/get-started/ and was able to run

:: flutt

相关标签:
4条回答
  • 2021-01-01 03:20

    You might need to setup a self-signed certificate to make it work correctly by setting the following enviroment variables:

    On Linux:

    export DART_VM_OPTIONS="--root-certs-file={path.to.certificate.file}"

    On Windows:

    set https_proxy="--root-certs-file={path.to.certificate.file}"

    0 讨论(0)
  • 2021-01-01 03:23

    I had the same issue. I am working in a company and I had to use https_proxy env variable to get connection.

    Open cmd on Windows

    set https_proxy=USERNAME:PASSWORD@hostname:port

    flutter create

    flutter run

    flutter packages get

    This worked for me, hope it helps!

    0 讨论(0)
  • 2021-01-01 03:25

    Do this for windows environment

    set https_proxy=USERNAME:PASSWORD@hostname:port
    set http_proxy=USERNAME:PASSWORD@hostname:port
    set NO_PROXY=localhost,127.0.0.1
    

    before calling flutter create <flutter_project>

    0 讨论(0)
  • 2021-01-01 03:30

    I was successful after setting the following windows environment variable.

    Variable name: DART_VM_OPTIONS Variable value: --root-certs-file=path_to_cert

    Where path_to_cert is the fully qualified path.

    0 讨论(0)
提交回复
热议问题