【求助】Mac 使用sudo mode启动chrome后,报SSl handshake failed相关错误,且无法打开https网页

问题描述

环境:

  • Mac;
  • chrome版本:81.0.4044.138(正式版本) (64 位)

问题复述:

  • 使用sudo mode参数启动chrome:
sudo /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222

解决方案

  • 使用以下命令,正常打开Chrom且不会报上述截图中的错误:
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222  

踩坑原因:

  • 上面带sudo的命令是在百度上查到的,我的电脑上,使用sudo是可以打开chrome的,但是无法对chrome进行读写,也无法打开网页。

为啥要sudo 呢,正常启动就行了呀

使用:/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 这个命令正常打开页面了,并且没有报上面截图报的错了。

请问老师,为什么加sudo就会报错呢?

sudo 是管理员权限呀,不要乱用呢。 会有奇奇怪怪的bug

好的,问题已解决,谢谢老师!