2

I wanted to disable web security for my flutter web application. I tried:

  1. Set export CHROME_EXECUTABLE=/path/to/google-chrome-unsafe.sh in $HOME/.zshrc
  2. Create google-chrome-unsafe.sh with the content /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --disable-web-security --user-data-dir="tmp-dir" $*
  3. Make it executable with chmod a+x google-chrome-unsafe.sh

At first this is how it worked. However, now there is always an error message. Does anyone have any idea how to solve the problem?

Android Studio: error message

1 Answer 1

2

Even though you have a google chrome app in your system. It may have command like google-chrome-stable or chrome or any name to open chrome browser from terminal. Just duplicate the file with google-chrome name in /usr/bin/

Eg: I have google-chrome-stable as executable so my approach is like

cp /usr/bin/google-chrome-stable /usr/bin/google-chrome

You may have bin in snap folder or some other folder depending on your installation way

If you're not having chrome as executable from terminal then create a symbolic link. Find you chrome binary file and use this command

ln -s $PATH/[google-chrome-bin] /usr/bin/google-chrome

Replace [google-chrome-bin] with your binary file name

Sign up to request clarification or add additional context in comments.

1 Comment

Out of all other solutions, this was the only fix that worked for me! Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.