Skip to content

Flutter doesn't work when self-signed certificate in chain #22077

Closed
@tabinnorway

Description

@tabinnorway

After having played with Flutter a bit from my home computer, I have decided that it is a great tool for developing Enterprise mobile apps for a client. The client has all its users behind a firewall, and they use a self-signed certificate on the inside of said firewall.

This means flutter doesn't work. You get the following output

flutter doctor -v
Updating flutter tool...
Got TLS error trying to find package archive at https://pub.dartlang.org.
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds...
timeout: invalid time interval '/t'

Now, this is quite a common problem, and there is no possible way you can convince some of the companies and government agencies using this method that they are wrong. Whether they are or not is also debatable. The self-signed certificate is only a "voulnerability" on the inside of the firewall, and if you have a bad actor on the inside of your firewall, a man in the middle attack is the least of your worries.

All other teams in the OSS community has solved this problem by allowing their tools to bypass this kind of certificate checking during installation. In npm you can set the environment variable NODE_TLS_REJECT_UNAUTHORIZED=0 and you are fine.

Is this crazy? Certainly not. The only "danger" area is if there is a bad actor somewhere between my computer and the firewall, and as I said, then I have far more severe problems

When previously reporting this I have received a response along the lines of "we will never allow this with flutter since the flutter team of developers are the only sane developers in the world, and all others are blithering idiots, particularly the node and git teams who have no problems with enabling word-destroying, no, universe-melting insane solutions like this".

Also, in my previous report of this issue, it was said it was solved because you can download the flutter tools entirely, removing the need for... I have not been able to do anything to solve this, and have not found any information on flutter.io that explains how I can get around this. My inability may certainly be a result of me being a blithering idiot, a lot of my problems are, but is there a solution for this? I would like to know.

Steps to Reproduce

  1. Sit behind a firewall where self-signed certificates are used on the inside
  2. Download and install flutter
    3a. Run flutter doctor -v or
    3b. Run flutter create -v flutter_test_app

Logs

flutter create -v flutter_test_app
Updating flutter tool...
Got TLS error trying to find package archive at https://pub.dartlang.org.
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds...

flutter doctor -v
Updating flutter tool...
Got TLS error trying to find package archive at https://pub.dartlang.org.
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds...
timeout: invalid time interval '/t'
Try 'timeout --help' for more information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: new featureNothing broken; request for a new capabilitytoolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions