Troubleshooting
Five failures operators hit most often, each with the symptom, the cause, and the fix.
Sign-in loop on the OIDC callback
Symptom: the user clicks sign in, Bunyip authenticates them, the browser redirects back, and the client immediately redirects to sign in again. The loop repeats until the user closes the tab.
Cause: the redirect URI the client sent to Bunyip does not match the redirect URI Bunyip has registered for this client, or the client id in MOKOSH_OIDC_CLIENT_ID does not match the client Bunyip registered.
Fix:
- In Bunyip, open the OIDC client and check both the Client id and the Redirect URIs.
- In the operator’s compose file or the desktop
config.json, checkMOKOSH_OIDC_CLIENT_IDandMOKOSH_OIDC_REDIRECT_URImatch what Bunyip has. - For a desktop install, confirm Bunyip accepts
http://127.0.0.1/auth/callbackas a loopback redirect (any port on the registered URI is allowed per RFC 8252). - Restart the container after an environment change so
_mokosh_config.jsis regenerated.
The browser console shows the exact redirect URI the client sent, which is the fastest way to compare against Bunyip’s registered value.
Desktop app cannot find config on first run
Symptom: the desktop app launches, shows a blank home shell with a “Server not reachable” notice, and signs the user out immediately. The logs name a missing MOKOSH_API_BASE or a connection error to http://localhost:8080.
Cause: the desktop app has no browser origin to derive from, so the first launch falls through to the compile-time default (http://localhost:8080/api/v1), which is right for local development and wrong everywhere else. No config.json was created or the file is in the wrong directory.
Fix:
- Create
config.jsonin the per-user config directory. On Linux this is~/.config/mokosh-apps/config.json; on macOS,~/Library/Application Support/mokosh-apps/config.json; on Windows,%APPDATA%\mokosh-apps\config.json. - Fill in at least
api_base,oidc_issuer, andoidc_client_id. See Installation for the minimal shape. - Restart the app.
An operator rolling the desktop binary to many users ships a per-OS installer that drops config.json in the right path with the deployment’s values pre-filled, so the user does not edit the file.
SPA shows stale data after a server-side change
Symptom: an admin changes a user’s role in Bunyip or mokosh-server, the user refreshes, and the UI still reflects the old role until the user signs out and back in.
Cause: the client caches the bearer’s claims and the user profile for the lifetime of the session. A role change on the server does not revoke the client’s cached copy; the cache clears on the next sign-in.
Fix:
- Ask the user to sign out from the account menu and sign back in.
- On the server side, revoking the user’s refresh token through Bunyip forces the client to re-authenticate on its next refresh, which picks up the new role without the user signing out manually.
A deployment that needs role changes to take effect without a sign-out configures mokosh-server to issue short-lived access tokens (for example, 10 minutes) so the role is refreshed at least once every ten minutes. The tradeoff is more token exchanges.
MOKOSH_API_BASE misconfigured
Symptom: the sign-in screen loads but every network request fails with a CORS error, a “Server not reachable” notice, or a 404 on /api/v1/....
Cause: one of three variants.
- Unreachable: the configured URL does not resolve or the server is not running.
- Wrong scheme: HTTP configured where HTTPS is required (or vice versa). Cookies with the
Secureflag are refused on HTTP. - Wrong path: the configured URL includes or omits the
/api/v1suffix in a way the server does not match.
Fix:
- From the operator’s shell, fetch the health endpoint:
curl -I https://api.msp.example.com/api/v1/healthshould answer 200. If it does not, the issue is on mokosh-server or in DNS, not in the client. - If the health check works, compare the URL to
MOKOSH_API_BASE. The client suffixes/api/v1to the base; set the base to the host without the suffix. - For a browser deployment, check the browser console for the exact URL and the CORS error message. mokosh-server’s
CORS_ORIGINmust list the client origin verbatim, no wildcard. - For a desktop deployment, check that
CORS_ORIGINon the server lists the desktop webview’s origin per OS; see Installation.
Update check fails
Symptom: the desktop app logs “Update check failed” repeatedly. The web client’s update banner never fires even after a new image is deployed.
Cause:
- Desktop: the update URL is unreachable, returns a non-JSON body, or the installer-download URL is not writable by the running process.
- Web: the container was not restarted after the image bump, so
_mokosh_config.jsstill carries the old build revision; the running tab compares its revision against the stale shim and sees no change.
Fix (desktop):
- Fetch the update URL from the operator’s shell:
curl https://downloads.msp.example.com/mokosh-apps/updates.jsonshould return the JSON shape documented in Upgrades. - If the fetch works but the app still logs a failure, check the app’s log for the next line: a permission error on the install directory, a signature check failure, or a disk-full condition.
- On Linux, confirm the AppImage path is writable by the user running the app.
Fix (web):
- On the host serving
mokosh-www, rundocker compose up --detachto restart the container; the entrypoint rewrites_mokosh_config.jswith the new build revision. - Reload the tab; the update banner fires.
A deployment that pins a release tag in the compose file does not see the banner even after a main push, because the container is still serving the pinned tag. Bump the tag in the compose file and restart to roll forward.