Skip to content

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

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

Closed
tabinnorway opened this issue Sep 20, 2018 · 8 comments
Closed

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

tabinnorway opened this issue Sep 20, 2018 · 8 comments
Labels
c: new feature Nothing broken; request for a new capability tool Affects the "flutter" command-line tool. See also t: labels.

Comments

@tabinnorway
Copy link

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.

@zoechi
Copy link
Contributor

zoechi commented Sep 24, 2018

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".

I don't think this appropriate. Just because the Flutter team doesn't follow the opinion of the majority doesn't mean they are arrogant.
So please leave such offensive interpretations out of comments.

See also https://flutter.io/design-principles/#code-of-conduct

@zoechi
Copy link
Contributor

zoechi commented Sep 24, 2018

You can try this suggestion dart-lang/pub#1882 (comment)
I don't know if this actually solves your problem or even parts of your problem.

@zoechi zoechi added c: new feature Nothing broken; request for a new capability tool Affects the "flutter" command-line tool. See also t: labels. labels Sep 24, 2018
@zoechi zoechi modified the milestones: Stretch Goals, Future Sep 24, 2018
@tabinnorway
Copy link
Author

Just because the Flutter team doesn't follow the opinion of the majority doesn't mean they are arrogant.

Perhaps. Previous answers I have received on this have been arrogant though.

@tabinnorway
Copy link
Author

Closed as a duplicate of #22077 (comment)

@nehuenKC
Copy link

@tabinnorway were you able to solve this?

@tabinnorway
Copy link
Author

tabinnorway commented Oct 24, 2020 via email

@SiddharthGadekar
Copy link

We solved it by setting the company FW up to not try to decrypt traffic from my computer. That removes the self-signed certificate in certificate chain problem for me. fre. 23. okt. 2020, 22:34 skrev nehuenKC [email protected]:

@tabinnorway https://github.com/tabinnorway were you able to solve this? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#22077 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHYQNX6PZ4S5D7TS47SD6DSMHSFDANCNFSM4FWG3YWA .

Can you let me know the firewall rules you added please?
I'm facing the same issue

@github-actions
Copy link

github-actions bot commented Aug 3, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: new feature Nothing broken; request for a new capability tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

No branches or pull requests

4 participants