0

Issue

I constantly see a message when running my Flutter projects on web:

You are using unsupported command-line flag; --disable-web-security. Stability and security will suffer.

This issue started from this answer, because I set this flag on development (later it turned out it's only working on dev, but not on production).

What I tried

Undoing the changes discussed here

  • restore the deleted file named flutter_tools.stamp at flutter\bin\cache
  • remove the added line from flutter\packages\flutter_tools\lib\src\web: '--disable-web-security'
  • dart pub cache repair
  • flutter clean
  • restart computer / Vscode

None of the things worked that I tried. Should I reinstall the whole flutter or is there something simpler I can try?

sideshowbarker
  • 81,827
  • 26
  • 193
  • 197
Havlik Miki
  • 41
  • 1
  • 5

1 Answers1

1

1- Go to flutter\packages\flutter_tools\lib\src\web and open the file chrome.dart. 2 - Remove '--disable-web-security' 3 - Go to flutter\bin\cache and remove a file named: flutter_tools.stamp

Worked for me, had exactly the same problem.

Lloyd
  • 21
  • 6