laurent22/joplin · error · Error
No URL for SAML authentication set.
Error message
No URL for SAML authentication set.
What it means
Thrown by SamlShared.openLoginPage() when the SAML server URL setting (sync.11.path, i.e. the Joplin Server (SAML) sync target path) is empty. Without a server URL the SSO login page URL cannot be constructed, so the user is shown an error dialog and the function throws to halt the login flow.
Source
Thrown at packages/lib/components/shared/SamlShared.ts:15
import { _ } from '../../locale';
import Setting from '../../models/Setting';
import shim from '../../shim';
import { authenticateWithCode } from '../../SyncTargetJoplinServerSAML';
import prefixWithHttps from '../../utils/prefixWithHttps';
import SsoScreenShared from './SsoScreenShared';
export default class SamlShared implements SsoScreenShared {
public openLoginPage() {
const samlUrl = Setting.value('sync.11.path');
if (!samlUrl) {
const message = _('No URL for SAML authentication set.');
void shim.showErrorDialog(message);
throw new Error(message);
}
shim.openUrl(`${prefixWithHttps(samlUrl)}/login/sso-saml-app`);
return Promise.resolve();
}
public processLoginCode(code: string) {
if (this.isLoginCodeValid(code)) {
return authenticateWithCode(this.cleanCode(code));
} else {
return Promise.resolve(false);
}
}
public isLoginCodeValid(code: string) {
const cleanedCode = this.cleanCode(code);
return !isNaN(+cleanedCode) && cleanedCode.length === 9;
}View on GitHub (pinned to 2654b33620)
Solutions
- Set the Joplin Server (SAML) URL in the sync settings (sync.11.path) before attempting SSO login.
- Verify the URL is correct and reachable in a browser.
- If the setting won't persist, check for a config/profile write permission issue.
Example fix
// before — no URL configured, openLoginPage throws
// after — ensure the setting is present before opening login
import Setting from '../../models/Setting';
if (!Setting.value('sync.11.path')) {
// prompt the user to enter the SAML server URL first
return;
} Defensive patterns
Strategy: validation
Validate before calling
import Setting from './models/Setting';
const samlUrl = Setting.value('sync.11.path');
if (!samlUrl) {
// prompt the user to configure the SAML server URL before login
return;
}
samlShared.openLoginPage(); Try / catch
try {
samlShared.openLoginPage();
} catch (error) {
if (/No URL for SAML/.test(error.message)) {
// guide the user to set sync.11.path
showConfigPrompt();
return;
}
throw error;
} Prevention
- Require sync.11.path to be set before enabling the SAML login button in the UI.
- Validate the URL is reachable before attempting SSO.
- Centralise the presence check so all entry points guard consistently.
When it happens
Trigger: The user picks the 'Joplin Server (SAML)' sync target but has not entered a server URL in sync.11.path, then clicks the SSO/SAML login button. openLoginPage reads Setting.value('sync.11.path'), finds it falsy, and throws.
Common situations: First-time SAML setup where the server URL field was skipped; the setting was cleared/reset; misconfigured deployment where the SAML target was selected without a path.
Understand the failure class
- Authentication and authorization failures — expired tokens, bad credentials, and missing scopes.
Related errors
- Could not access data on server "${options.path()}"
- Note not published: %s
- AWS S3 bucket not found: ${SyncTargetAmazonS3.s3BucketName()
- User is not authenticated
- User is not authenticated
AI-assisted analysis of laurent22/joplin@2654b33620 (2026-08-12).
Data as JSON: /api/errors/d5317a96881d6bcc.
Report an issue: GitHub.