# Häufige Fehlerquellen

### APP\_URL ist falsch in der .env

Auf dem Server gibt es eine .env Datei, wo eine wichtige URL bei der Variable `APP_URL` gespeichert ist. Diese URL wird benutzt, damit die externe App eine URL von deinem Shopware-Shop für die Kommunikation zurück enthält (es handelt sich hier um eine externe Shopware Cloud-App). Leider wird diese URL bei Self-Hosted-Shops fast immer falsch gesetzt - bereits vom Installer.

Die URL könnte ähnlich falsch stehen wie hier

```
APP_URL="http://127.0.0.1"
```

Wichtig bei der Korrektur ist es die URL des Shops zu verwenden. Unbedingt auch http & https beachten. In einigen Fällen kann es auch eine abweichende URL zum Admin des Shops sein (z.B. Shopware PWA oder mehrere Shop-Domains innerhalb einer Installation). Richtig wäre z.B.

```
APP_URL="https://www.mein-shop.de"
```

Nach der Änderung einmal die Datei speichern und den Shop Cache leeren. Nun wird im Admin ein neues Fenster erscheinen, da sich die URL geändert hat. Hier wäre eine Möglichkeit allen externen Cloud-Apps mitzuteilen, dass sich die URL geändert hat, weil der Shop "umgezogen" ist. Etwas mehr steht an dieser Stelle: <https://developer.shopware.com/docs/guides/plugins/apps/app-base-guide#handling-the-migration-of-shops>

Als Letztes nochmal die App neu installieren. Danach sollte alles soweit funktionieren.


---

# 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.shop-studio.io/shopware/de/erweiterungen/tree-per-order/haufige-fehlerquellen.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.
