> For the complete documentation index, see [llms.txt](https://developers.oxylabs.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.oxylabs.io/products/cn/headless-browser/troubleshooting-guide.md).

# 故障排查指南

了解在使用无头浏览器时如何处理意外行为或低成功率。

| 症状                                        | 可能原因                                      | 解决方案                                                                                               |
| ----------------------------------------- | ----------------------------------------- | -------------------------------------------------------------------------------------------------- |
| *401 无效凭据（凭据实际上是正确的）*                     | 使用 `ws://` 协议                             | 切换为 `wss://`                                                                                       |
| *401 无效凭据*                                | 仅 `用户名` 无后缀                               | 使用仪表板中的后缀令牌的完整用户名（例如， `_ab12`)                                                                     |
| *CDP\_SESSION\_RATE\_LIMIT\_REACHED*      | 你尝试每秒启动过多浏览器                              | 请保持在 `10` 每秒会话限制内，或 [联系支持](#need-a-feature-enabled-1) 以提高上限。                                       |
| *CDP\_MAX\_CONCURRENT\_SESSIONS\_REACHED* | 你的活动会话数已达到限制                              | 保持在 `100` 并发会话总数之内，或 [联系支持](#need-a-feature-enabled-1) 以提高上限。                                      |
| *会话检查（VNC）无法连接（浏览器已启动）*                   | 已达到 VNC 最大限制                              | 减少 VNC 会话数量。                                                                                       |
| *TLS / 证书错误*                              | Node.js 中的证书验证                            | 设置 `NODE_TLS_REJECT_UNAUTHORIZED="0"` 在 require Playwright 之前设置（仅用于测试）。                            |
| *CDP\_LIMIT\_REACHED：已达到配置文件限制*           | `o_profile` 数量超过 `max_profiles` （默认： `5`) | 复用一个稳定的配置文件名称，删除仪表板（`hb.oxylabs.io/dashboard`）中未使用的配置文件，或 [联系支持](#need-a-feature-enabled-1) 以提高上限。 |
| *400 session\_name 必须为 3-36 个字母数字字符或 '-'* | session\_name 中存在下划线或无效字符 `session_name`  | 仅使用字母、数字和连字符（`[A-Za-z0-9-]`).                                                                      |
| *配置文件已恢复，但 Cookie 为空*                     | 会话之间出口 IP 发生变化                            | 固定 `proxy_resi_ses_id` + `proxy_resi_ses_time` 为每次会话相同的值。                                          |
| *登录墙 / 成功率低*                              | IP 信誉、地理位置错误或引擎不匹配                        | 设置 `p_cc` (+ `p_city`），尝试其他 `p_device`，或在新会话中重试。                                                   |
| *目标完全被阻止*                                 | 受限目标类别                                    | 通过您的专属客户经理完成 KYC。                                                                                  |

{% hint style="info" %}
仍然卡住？通过在线聊天或电子邮件联系 Oxylabs 支持（<support@oxylabs.io>).
{% endhint %}

如果您遇到意外行为或成功率较低，请考虑以下步骤：

### **了解我们的 CAPTCHA 处理流程**

熟悉我们的 [CAPTCHA 处理](/products/cn/headless-browser/captcha-handling.md) 方法及其使用方式。这可以帮助判断 CAPTCHA 挑战是否是问题的来源。

### **使用国家参数**

在请求中指定国家参数可以显著提高成功率。这可确保您的请求通过来自特定地理位置的 IP 路由，并过滤掉来自随机或可能不太可靠位置的 IP。

您可以通过在连接 URL 中添加 `?p_cc` 参数来为浏览器会话指定国家。更多信息可参见 [地理位置定位](/products/cn/headless-browser/geolocation-and-proxy-selection.md).

### **使用设备类型参数**

尝试设备参数可带来更高的成功率。您可以通过使用 `?p_device` 参数来自定义浏览器模拟不同设备类型的方式。更多信息可参见 [设备类型](/products/cn/headless-browser/device-type.md) 部分。

{% hint style="info" %}
如果尝试这些步骤后问题仍然存在，请联系您的专属客户经理，并提供问题详情以及您已经采取的步骤。
{% endhint %}

## 需要启用某项功能？ <a href="#need-a-feature-enabled" id="need-a-feature-enabled"></a>

某些无头浏览器功能默认受限。要调整限制，请联系 Oxylabs 支持（[在线聊天](https://oxylabs.io/) 或 [电子邮件](mailto:support@oxylabs.io)）或您的专属客户经理：

* **更多持久化配置文件** – 提高您账户默认的 5 个已保存配置文件上限。
* **更多持久化会话** – 提高您账户默认的 5 个并发持久化会话上限。
* **受限目标** – 通过 KYC 流程解锁更多目标类别。
* **更高的速率限制** – 提升到超过 100 个并发会话 / 每秒 10 个。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers.oxylabs.io/products/cn/headless-browser/troubleshooting-guide.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
