没有不值得去解决的问题,也没有不值得去学习的技术!

Fixing a Blank Page When Toutiao Opens in Google Chrome

Checking the Console shows an error: Access to XMLHttpRequest at 'https://verify.snssdk.com/reportError' from origin 'https://www.toutiao.com' has been blocked by CORS policy: Request header field ra-ver is not allowed by Access-Control-Allow-Headers in preflight response.

1. In the Google Chrome browser, after opening Toutiao, the page is completely blank, as shown in Figure 1.

In the Google Chrome browser, after opening Toutiao, the page is completely blank
Figure 1
Plaintext

Request URL: https://verify.snssdk.com/reportError
Referrer Policy: no-referrer-when-downgrade

2. Checking the Console shows an error: Access to XMLHttpRequest at ‘https://verify.snssdk.com/reportError’ from origin ‘https://www.toutiao.com’ has been blocked by CORS policy: Request header field ra-ver is not allowed by Access-Control-Allow-Headers in preflight response. As shown in Figure 2.

Checking the Console shows an error: Access to XMLHttpRequest at 'https://verify.snssdk.com/reportError' from origin 'https://www.toutiao.com' has been blocked by CORS policy: Request header field ra-ver is not allowed by Access-Control-Allow-Headers in preflight response.
Figure 2

3. After clearing browsing data, including both basic and advanced options, the page is still completely blank, as shown in Figure 3.

After clearing browsing data, including both basic and advanced options, the page is still completely blank
Figure 3

4. Opening a new Incognito window, Toutiao loads normally. Checking the Console shows no errors, as shown in Figure 4.

Opening a new Incognito window, Toutiao loads normally. Checking the Console shows no errors
Figure 4
Plaintext
version:0.1.7
pc_text.js:1 version:0.1.7
(index):1 A cookie associated with a cross-site resource at http://i.snssdk.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
vendor.e2caf4792c6de5bf3950.js:112 [tea-sdk][default]已禁止默认上报predefine_pageview事件,需手动上报。
VM15:1 
raven.js:1 [tea-sdk][default]看到本提示,意味着用户信息已完全就绪,上报通道打开。用户标识如下:
raven.js:1 [tea-sdk][default] {
  "user_unique_id": "6799972943449261575",
  "web_id": "6799972943449261575",
  "ssid": "e58f1dbf-0ff2-4702-94b4-6cc59d325369"
}
raven.js:1 [tea-sdk] SDK已经初始化过了!请检查是否多次引入了SDK文件
e. @ raven.js:1
2p3.pstatp.com/list/240x240/6799949924902619915:1 Failed to load resource: the server responded with a status of 400 (Bad Request)
(index):1 A cookie associated with a cross-site resource at https://xxbg.snssdk.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
p3.pstatp.com/list/240x240/6799949924902619915:1 Failed to load resource: the server responded with a status of 400 (Bad Request)

5. Comparing the responses for the request to https://verify.snssdk.com/reportError, one has no response and the other has a response. As shown in Figure 5.

Comparing the responses for the request to https://verify.snssdk.com/reportError, one has no response and the other has a response.
Figure 5
JSON

{"code":"200","data":null,"msg":""}

6. I noticed that in Incognito mode, new links for downloading the APP and registering a Toutiao account have been added, which I vaguely remember not being there before. Therefore, the reason for the completely blank page this time might be an incompatibility caused by Toutiao upgrading to a new version. As shown in Figure 6.

I noticed that in Incognito mode, new links for downloading the APP and registering a Toutiao account have been added, which I vaguely remember not being there before. Therefore, the reason for the completely blank page this time might be an incompatibility caused by Toutiao upgrading to a new version.
Figure 6

7. Finally, I uninstalled the Google Chrome browser using the 360 Software Manager, as shown in Figure 7.

Finally, I uninstalled the Google Chrome browser using the 360 Software Manager
Figure 7

8. During uninstallation, I checked the option to also delete my browsing data, as shown in Figure 8.

During uninstallation, I checked the option to also delete my browsing data
Figure 8

9. After reinstalling the Google Chrome browser, I opened Toutiao again, and it displayed normally, as shown in Figure 9.

After reinstalling the Google Chrome browser, I opened Toutiao again, and it displayed normally
Figure 9

关于作者 · 持续学习与技术实践

我是一名拥有 15 年以上开发经验的技术从业者,自 2013 年起持续运营个人技术博客,记录工作与个人项目中遇到的真实问题,以及解决问题过程中的探索、实践和思考。

除了技术写作,我也在持续开发和维护自己的独立项目,探索新技术和新工具在实际场景中的应用。我始终相信,没有不值得去解决的问题,也没有不值得去学习的技术。

如果这篇文章对你有所帮助,欢迎浏览博客中的其他文章,也欢迎交流技术经验与想法。

关于我  ·  GitHub  ·  邮件联系