Skip to content

Commit 4c41fbc

Browse files
committed
Trim the sign-in and Windows startup troubleshooting entries
Each keeps the symptom, including the log line someone will search for, one sentence of cause and the fix. The account of which upgrade path wrote the value wrongly, the enumeration of what the repair does not require and the full console transcript are gone.
1 parent e8d26ca commit 4c41fbc

2 files changed

Lines changed: 10 additions & 37 deletions

File tree

docs/troubleshooting/sso.mdx

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -386,37 +386,31 @@ OAUTH_SCOPES=openid email profile
386386

387387
#### Providers that add their own parameters to the ID token:
388388

389-
**Problem:** The login fails right at the callback. The browser shows `The email or password provided is incorrect`, and the backend log records the real reason:
389+
**Problem:** The login fails at the callback. The browser shows `The email or password provided is incorrect`, and the log records the real reason:
390390

391391
```
392392
OAuth callback failed: Unsupported {'app_id'} in header
393393
```
394394

395-
Some providers add a vendor-specific parameter of their own to the header of the ID token they issue, and older versions of Open WebUI rejected any parameter they did not recognize there. The name varies by provider, `app_id` and `client_id` being two of them.
395+
Some providers add a vendor-specific parameter to the ID token header, which older versions rejected. The name varies by provider.
396396

397-
**Solution:** Update Open WebUI. Unrecognized parameters are now ignored instead of ending the login, so nothing has to be changed on the provider side. The token's signature and signing algorithm are still verified as before.
397+
**Solution:** Update Open WebUI. Unrecognized parameters are ignored, so nothing changes on the provider side. The signature and signing algorithm are still verified.
398398

399399
---
400400

401401
### 12. Existing Accounts Cannot Sign In After a Long-Delayed Upgrade
402402

403-
**Problem:** An instance that had been left on a version older than v0.6.41 is upgraded, and afterwards nobody who had ever signed in through SSO can get back in. Password sign-in fails for those same accounts too, while accounts that never used SSO are fine. The backend log records:
403+
**Problem:** After upgrading an instance that had been left on a version older than v0.6.41, nobody who had signed in through SSO can get back in, and password sign-in fails for those same accounts. Accounts that never used SSO are fine. The log records:
404404

405405
```
406406
ERROR - Error during OAuth process: 1 validation error for UserModel
407407
oauth
408408
Input should be a valid dictionary [type=dict_type, input_value='{"oidc": {"sub": "..."}}', input_type=str]
409409
```
410410

411-
v0.6.41 moved each account's identity provider subject out of the old `oauth_sub` column into an `oauth` JSON field that can hold several providers per account. From v0.9.6 the step performing that copy encoded the values twice, so on a database that had not yet made the move the field ended up holding the *text* of a JSON object rather than the object itself. Every read of such an account then failed validation, and the lookup that matches an incoming SSO login to an existing account never matched it.
411+
The upgrade step that moves an account's identity provider subject into its current field encoded the value twice, so it holds the text of a JSON object rather than the object. Only databases still older than v0.6.41 at the moment they were upgraded are affected, and only accounts that had a subject stored at the time.
412412

413-
This only affects databases that were still older than v0.6.41 at the moment they were upgraded, and only the accounts that had an `oauth_sub` value at that time. An instance that had already reached v0.6.41 or newer before upgrading further was never touched, and neither were accounts created or linked after the upgrade.
414-
415-
**Solution:** Update Open WebUI. A repair migration runs on startup, rewrites the affected rows back into proper JSON objects and leaves every other row alone, so it is harmless on databases that were never affected. No manual database work is needed, no accounts have to be re-linked and nothing changes on the identity provider side.
416-
417-
:::note Settings will not work around this
418-
`OAUTH_MERGE_ACCOUNTS_BY_EMAIL` does not help, because the fallback lookup by email reads the same account and fails the same validation. Deleting and recreating the affected accounts would restore sign-in, at the cost of everything those accounts own. Upgrading is the repair.
419-
:::
413+
**Solution:** Update Open WebUI. A repair migration runs on startup and rewrites the affected rows, leaving every other row alone. No manual database work, no re-linking and nothing to change on the provider side. `OAUTH_MERGE_ACCOUNTS_BY_EMAIL` does not work around it, since the fallback lookup reads the same account and fails the same way.
420414

421415
---
422416

docs/troubleshooting/startup.mdx

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -101,41 +101,20 @@ See the [Offline Mode guide](/tutorials/maintenance/offline-mode) for the full o
101101

102102
### Symptom
103103

104-
`backend\start_windows.bat` prints a long run of the same line, once per character of the key it is trying to generate:
105-
106-
```text
107-
Generating WEBUI_SECRET_KEY
108-
The system cannot find the file specified.
109-
The system cannot find the file specified.
110-
The system cannot find the file specified.
111-
...
112-
WEBUI_SECRET_KEY generated
113-
```
114-
115-
It then claims to load the key and aborts:
104+
On a fresh installation with no key set and no key file yet, `backend\start_windows.bat` prints `The system cannot find the file specified.` repeatedly while generating the key, then aborts:
116105

117106
```text
118107
WEBUI_SECRET_KEY is not set. It is a hard requirement when authentication is enabled.
119108
```
120109

121-
This only happens on a **fresh** installation: no `.webui_secret_key` file exists yet and `WEBUI_SECRET_KEY` is not set in the environment.
122-
123110
### Cause
124111

125-
The key-generation step in older copies of `start_windows.bat` never wrote anything, so it left an **empty** `.webui_secret_key` behind. The backend then started with no key and refused to run, because a secret key is a hard requirement whenever authentication is enabled. The same copies also broke when the Open WebUI folder sat under a path containing spaces.
112+
The key-generation step in older copies of the script wrote nothing, leaving an empty `.webui_secret_key` behind. The same copies also broke on an installation path containing spaces.
126113

127114
### Fix
128115

129-
Pick one:
130-
131-
- **Update Open WebUI.** Current copies of `backend\start_windows.bat` generate the key correctly and handle paths with spaces. **Delete the empty `.webui_secret_key` file first** from the `backend` folder next to the script. The script only generates a key when that file is missing, so an empty one left over from the failed run is loaded again and you get the same abort.
132-
- **Set the key yourself**, which is the recommended configuration for anything beyond a personal machine anyway:
133-
134-
```bat
135-
set WEBUI_SECRET_KEY=your-long-random-value
136-
backend\start_windows.bat
137-
```
116+
Update Open WebUI, and **delete the empty `.webui_secret_key` file first** from the `backend` folder. The script only generates a key when that file is missing, so an empty one left over from the failed run gives you the same abort.
138117

139-
With the variable set, the script skips key generation and the key file entirely.
118+
Setting `WEBUI_SECRET_KEY` yourself also works, and is the right configuration for anything beyond a personal machine. With it set, the script skips key generation entirely.
140119

141120
See [`WEBUI_SECRET_KEY`](/reference/env-configuration#webui_secret_key) for how each start method generates and persists the key.

0 commit comments

Comments
 (0)