> For the complete documentation index, see [llms.txt](https://bohd4nx.gitbook.io/pyfragment/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bohd4nx.gitbook.io/pyfragment/advanced/troubleshooting.md).

# Troubleshooting

When something breaks, start here. Most issues are caused by cookies, session state, or wallet balance.

## Auth/session errors

Symptoms:

* Fragment page hash cannot be extracted,
* bad status loading Fragment pages,
* missing request IDs.

Actions:

* re-login on fragment.com,
* refresh cookies,
* ensure all `stel_*` keys are present.
* verify constructor payload in [Library and Configuration](/pyfragment/setup-guide/configuration.md).

**Re-login + fresh cookies solves the majority of auth errors.**

## Cookie extraction errors

Symptoms:

* browser not supported,
* cannot read browser profile,
* required cookies not found.

Actions:

* install `pyfragment[browser]`,
* close locked browser profiles,
* use manual cookies if needed.

## Balance/transaction failures

Symptoms:

* low TON/USDT balance errors,
* broadcast failures,
* duplicate seqno retries.

Actions:

* keep GRAM (ex TON) reserve for fees,
* ensure USDT is on the **Fragment-linked wallet**,
* retry after short delay when seqno collisions happen.
* check operation constraints in Stars/Premium/Ads method pages.

## SSL-related broadcast failures

If you get SSL-related transaction errors:

```bash
pip install --upgrade certifi
```

On macOS, also run Python's `Install Certificates.command` if needed.


---

# 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://bohd4nx.gitbook.io/pyfragment/advanced/troubleshooting.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.
