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

# Troubleshooting

> Fixes for the problems developers hit most often.

> [accordion] “redirect\_uri” error, or sign-in won't come back to my game
>
> The address sign-in returns to must be registered for your app, exactly. Check **Where sign-in returns** in the developer portal:
>
> * Same scheme (`https` vs `http`), host, port and path, with no `?` or `#` part.
> * Testing locally? Add `http://localhost:<port>/` too.
> * Desktop: register `http://127.0.0.1/` (any port works).
> * Mobile: register your lower-case bundle ID with `:/pass`, e.g. `com.studio.game:/pass`.

> [accordion] The popup is blocked
>
> Start sign-in and purchase from a click or tap handler, not on load or after a delay. Engine SDKs' sign-in buttons start on press for this reason. If it's blocked anyway, sign-in switches to a full-page redirect.

> [accordion] The popup stays open, or shows my game
>
> The page sign-in returns to must load the Gamavas script, which closes the popup. Put `<script src="https://gamavas.fun/sdk/pass.js"></script>` in that page's `<head>`, so it runs before your game loads.

> [accordion] 403 forbidden when unlocking an achievement
>
> The achievement is marked **only your server** in the portal. Unlock it from your server with a secret key. Or the sign-in didn't include the `progress` scope; the SDKs ask for it, so sign the player in again.

> [accordion] 401 from my server with a secret key
>
> The key is wrong or revoked, or you're verifying a player token that's expired, revoked or from another game. Check you're using a key from this app's **Keys** page, and that the token is fresh (`getAccessToken()` refreshes it).

> [accordion] 403 “secret keys only work from your server”
>
> A request with a secret key had an `Origin` header, so it came from a browser. Move the call to your server, and revoke the key if it was ever in a web page.

> [accordion] 404 “That player hasn't connected your game”
>
> Server calls only work for players who signed in to your game. Check you're using `player.id` from `verifyPlayer`, and the right key for the app.

> [accordion] I own my game in live mode but not in test mode
>
> That's expected. In test mode, only test purchases count, even for you. Make a test purchase from the test checkout.

> [accordion] My webhook isn't receiving events
>
> Press **Send test event** on the Webhooks page and look at the delivery log. Your endpoint must be a public `https://` address that answers `2xx` within 10 seconds. Check the endpoint is subscribed to the event and turned on.

> [accordion] Webhook signature check fails
>
> Verify the **raw** request body, exactly as received. Parsing and re-serialising the JSON changes it. Check you're using this endpoint's own `whsec_` secret, and that your server's clock is right (signatures expire after 5 minutes).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.