> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superun.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# WeChat QR login troubleshooting

> Common WeChat QR login problems: no QR code, redirect_uri parameter errors, sign-in failing after a scan, and login breaking after publishing — diagnose callback domain and credential issues by symptom.

This page supplements [WeChat QR login](/superun/skills/wechat-open-web-login). When QR sign-in misbehaves, the cause is almost always configuration on the WeChat Open Platform side (authorized callback domain, application review status) or the credentials you entered. Work through the symptoms below and most problems resolve in a few minutes.

<Note>
  The callback domain to use right now is shown on the **WeChat QR login → Config** page in your superun project: the preview domain before you publish, the production domain afterwards.
</Note>

## The QR area shows a `redirect_uri` parameter error

WeChat checks two things before generating a code; failing either shows this error instead of a QR code:

1. **The authorized callback domain is missing or does not match the live domain.** On WeChat Open Platform, go to **Management center → Website application → Development config → Development info → Domain info** and enter the callback domain exactly as shown on the **WeChat QR login → Config** page. Domain only — no `https://`, no port, no path.
2. **The website application has not passed review.** QR login does not work before approval; check the review status on WeChat Open Platform.

## The QR area stays blank

The QR script is served from a WeChat domain (`res.wx.qq.com`), so a permanently blank area usually means the script failed to load:

* Check the device's network and reload the page.
* If the page offers a reload button, use it to retry.

## It reports missing credentials or cannot initialize the QR code

The AppID / AppSecret have not been saved to superun yet. On the **WeChat QR login → Config** page, choose **Edit credentials** and save the AppID and AppSecret from your WeChat Open Platform **website application**.

<Warning>
  The AppSecret is a 32-character key and does not start with `wx`. Entering the AppID or a mini program secret by mistake is the most common error and makes sign-in fail after a scan.
</Warning>

## The scan succeeds but sign-in fails

* **Security check failed**: the code sat too long or the page was reused. Go back to the login page and scan again.
* **Authorization code invalid or already used**: WeChat codes last about 10 minutes and are single-use. Scan again for a fresh code.
* **Failing repeatedly**: usually a wrong AppSecret (see above). Save the credentials again and retry.

## WeChat login breaks right after publishing

Publishing switches the site from the preview domain to the production domain, while WeChat Open Platform still has the old one registered. Copy the current callback domain from the **WeChat QR login → Config** page, update it on WeChat Open Platform, and login recovers.

## Still stuck

Describe the symptom directly in your project conversation (for example "the QR code doesn't show" or "sign-in fails after scanning") and superun will dig further using the project logs.
