google-chrome-stable打开空白页面,需要手动刷新

xbp102n0  于 2023-09-28  发布在  Go
关注(0)|答案(1)|浏览(140)

在我的centos Linux环境中,我运行一个gunicorn flask web服务器,随后在同一个端口上通过Chrome浏览器启动客户端。当我想用这些设置启动客户端时,页面无法正常打开。

google-chrome-stable \
  --no-first-run \
  --password-store=basic \
  --disable-gpu \
  --new-window \
  --no-default-browser-check \
  --no-default-browser-setting \
  --user-data-dir="$user_data_dir" \
  --disk-cache-dir="$user_data_dir/cache" \
  "http://localhost:$port" &

--user-data-dir="$user_data_dir”\是导致错误行为的原因,但它仍然是必要的,因为我想让用户能够打开多个客户端,这些客户端将本地文件存储在不同的会话目录中。
假设端口被确定为5000,然后Chrome浏览器打开并在地址栏中显示localhost:5000,但页面保持空白。当我刷新浏览器时,页面加载,但地址更改为auto:blank,这没有意义。
保留带有用户数据的设置并仅使用单个会话可以提供所需的行为,因为浏览器打开页面并在地址栏中显示正确的链接。
我尝试了所有其他可能影响这种Chrome。此问题发生在版本114上,但不是在装有Chrome 94的计算机上。对我来说,不可能改变版本。
在空白页面上单击F12+正确的URL将正确的URL变为about:blank,然后单击F5不会给予我正确的页面。没有控制台错误,也没有可见的网络条目。
创建user-data-dir目录并在google-chrome-stable之前睡眠也没有效果。
使用--enable-logging记录所有内容,并将它们输入chatgpt进行解释,得到这些结果。我没有看到这些错误的电脑上与旧的Chrome:

The log errors you provided indicate several areas where Chrome is experiencing issues. Let's break down these issues:

DBus Issue:

[15081:15081:0809/145748.532428:ERROR:object_proxy.cc(590)] Failed to call method: org.freedesktop.portal.Settings.Read: object_path= /org/freedesktop/portal/desktop: org.freedesktop.DBus.Error.UnknownMethod: No such interface 'org.freedesktop.portal.Settings' on object at path /org/freedesktop/portal/desktop
This error is related to the DBus service. It indicates that Chrome is trying to interact with a service through DBus and failing because the service doesn't recognize the method being called.

Manifest Fetching Error:

[15081:15081:0809/145748.555489:VERBOSE1:extension_downloader.cc(732)] Failed to fetch manifest ...
This error suggests that Chrome couldn't fetch an extension manifest from Google's servers. This could be due to a network issue, or perhaps this particular installation of Chrome is trying to fetch something that doesn't exist or is not accessible.

Gaia Authentication Error:

[15081:15081:0809/145748.555730:VERBOSE1:gaia_auth_fetcher.cc(816)] Got authentication error
[15081:15081:0809/145748.555815:VERBOSE1:gaia_auth_fetcher.cc(817)] net_error: net::ERR_FAILED
Gaia is Google's authentication service. This suggests there's an issue with authentication, but it might not be directly related to your issue of a blank page. It might just be a side effect of running Chrome in a scripted manner without a proper user session.

Network Service Crashed:

[15081:15081:0809/145748.566833:ERROR:network_service_instance_impl.cc(558)] Network service crashed, restarting service.
This is a significant error. The network service crashing could very well result in pages not loading, as Chrome's network service is essential for making web requests.

Account Reconcilor Errors:

[15081:15081:0809/145749.975742:VERBOSE1:account_reconcilor.cc(555)] ...
These errors seem related to account management within Chrome. Like the Gaia error, it may not be directly related to your issue but rather a side effect of the environment in which you're running Chrome.

相关问题