# ブラウザのコンソールにエラーやワーニングが出ていないか確認する

## 確認手順 <a href="#steps" id="steps"></a>

1. **デベロッパーツールを開く**\
   Google Chrome上で右クリックから「検証」もしくは「要素の検証」を開いた状態で、「Console」タブを開いてください。\
   詳しくは [Open Chrome DevTools](https://developer.chrome.com/docs/devtools/open/) をご参照ください。
2. **`karte` で検索する**\
   コンソール上部のフィルタに `karte` と入力し、Wicle関連のエラー・ワーニングが表示されていないか確認してください。

## よくあるエラーと対応 <a href="#common-errors" id="common-errors"></a>

### CSP（Content Security Policy）違反 <a href="#csp-error" id="csp-error"></a>

```
Refused to load the script 'https://cdn-edge.karte.io/...'
```

サイトのContent Security Policy設定がWicleの計測タグをブロックしています。

→ [CSPによりタグがブロックされていないか確認する](/other/troubleshoot/tag/check-csp.md)

### スクリプト読み込みエラー <a href="#script-load-error" id="script-load-error"></a>

```
ERR_BLOCKED_BY_CLIENT
```

広告ブロッカーやネットワーク制限によりスクリプトがブロックされています。

→ [広告ブロッカーやネットワーク制限によりタグがブロックされていないか確認する](/other/troubleshoot/tag/check-network-and-blocking.md)

### その他のJavaScriptエラー <a href="#other-js-error" id="other-js-error"></a>

`karte.io` を含まないJavaScriptエラーが大量に表示されている場合、サイト側のスクリプトエラーがWicleの動作に影響している可能性があります。サイト側のエラーを解消することで改善するケースがあります。

## Networkタブでの通信確認 <a href="#network-tab" id="network-tab"></a>

コンソールにエラーがない場合でも、Networkタブで通信状況を確認すると原因が分かることがあります。

1. デベロッパーツールの「Network」タブを開く
2. ページを再読み込みする
3. フィルタに `karte` と入力する
4. 以下を確認する

| 状況                       | 考えられる原因                        |
| ------------------------ | ------------------------------ |
| `karte.io` 宛のリクエストが存在しない | タグが設置されていない、またはスクリプトがブロックされている |
| リクエストのステータスが `(blocked)` | 広告ブロッカーやCSPによるブロック             |
| リクエストのステータスが `(failed)`  | ネットワーク接続の問題                    |
| リクエストのステータスが `200`       | 通信は正常。他の原因を確認してください            |


---

# Agent Instructions: 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:

```
GET https://docs.wicle.io/other/troubleshoot/tag/check-browser-console-errors.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
