> For the complete documentation index, see [llms.txt](https://docs.realmjoin.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.realmjoin.com/ja/toraburushtinguto-faq/troubleshooting/package-installation-issues/troubleshooting-failed-craft-packages.md). Agents can also search and read this documentation through its [MCP server](https://docs.realmjoin.com/~gitbook/mcp).

# 失敗した craft パッケージのトラブルシューティング

ユーザー スコープでは tray.log、システム スコープでは realmjoin.log を読んで、失敗した craft パッケージのインストールを診断します。

craft パッケージには個別のログはありません（インストーラーが craft パッケージ内に明示的に記述した場合を除く）。\
実行されるスコープに応じて `システム` または `ユーザー`、（ごく基本的な）出力は次のファイルにあります `tray.log` （ユーザー スコープの場合）または次の `realmjoin.log` （システム スコープの場合）。

## ユーザー スコープの craft パッケージ

上記のとおり、ユーザー スコープで実行される craft パッケージの出力は、次の `tray.log` ファイルにあります。パッケージ ID の代わりに、関連する行はパッケージの設定済み表示名を使って見つけることができます:

{% code overflow="wrap" %}

```log
2023-11-07 15:37:57.7527|INFO|RealmJoin.Core.SoftwarePackaging.CraftPackageEntry|   1|craft パッケージ Microsoft Teams 1.6.0.2757300（ユーザー）をインストールしています
```

{% endcode %}

これにほぼ即座に（インストール時間によりますが）続いて次が表示されます:

{% code overflow="wrap" %}

```log
2023-11-07 15:38:51.1590|INFO|RealmJoin.Core.SoftwarePackaging.CraftPackageEntry|   1|パッケージ結果: コード = 0、出力:

2023-11-07 15:38:51.1590|INFO|RealmJoin.Core.SoftwarePackaging.CraftPackageEntry|   1|Microsoft Teams 1.6.0.2757300（Craft）パッケージのインストールに成功しました。
```

{% endcode %}

<figure><img src="https://3438325150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkrcM7cKOpXKri1kVrh%2Fuploads%2FdzUye7qk7RCTQ1YAF9f1%2Fcraft-user-install.png?alt=media&amp;token=4ee49916-b9c4-4682-ad19-595d30bcd9c7" alt=""><figcaption><p>craft ユーザー パッケージのインストール成功時の出力例</p></figcaption></figure>

## システム スコープの craft パッケージ

システム スコープで実行される craft パッケージに関する関連ログは、 `tray.log` ダウンロードおよび初期化情報用に、そして `realmjoin.log` 実際の出力と戻り値コード用に分割されます。それ以外は、ユーザー craft パッケージのインストール時と同じです。

以下の例では、パッケージの出力がログ ファイルにどのように含まれるかを示しています:

<figure><img src="https://3438325150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkrcM7cKOpXKri1kVrh%2Fuploads%2FyedjTexR79xW04oBU6nV%2Fcraft-system-install.png?alt=media&amp;token=f8c6ccc5-50ca-429f-95d3-c42204a5d116" alt=""><figcaption><p>ログ ファイルに表示される craft パッケージ スクリプトの出力。</p></figcaption></figure>

次の `tray.log` ファイルには常に、バージョン番号の後ろのかっこ内に、そのパッケージがシステム スコープで実行されるかユーザー スコープで実行されるかを示すヒントが含まれます:

{% code overflow="wrap" %}

```log
2023-11-07 15:48:58.5875|INFO|RealmJoin.Core.SoftwarePackaging.CraftPackageEntry|   1|craft パッケージ RealmJoin Set Environment Variable 2.0.0.0（システム）をインストールしています
```

{% endcode %}


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.realmjoin.com/ja/toraburushtinguto-faq/troubleshooting/package-installation-issues/troubleshooting-failed-craft-packages.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
