siyuan-note/siyuan · warning

Conf.Language(34)

Error message

Conf.Language(34)

What it means

EnsureOnboarding refuses to run the first-run onboarding flow when the workspace is in read-only mode or publish mode is enabled, returning a localized error (Conf.Language(34), 'This operation is not supported in read-only mode'). Onboarding needs to create a notebook and document, which read-only/publish mode forbids.

Source

Thrown at kernel/model/onboarding.go:109

	onboarding := Conf.Onboarding
	if !onboarding.NewUser || onboarding.Dismissed {
		return cloneOnboarding(onboarding), false, nil
	}

	boxes, listErr := ListNotebooks()
	if listErr != nil {
		return cloneOnboarding(onboarding), false, listErr
	}
	documentExists := onboarding.NotebookID != "" && onboarding.DocumentID != "" && filelock.IsExist(filepath.Join(
		util.DataDir, onboarding.NotebookID, onboarding.DocumentID+".sy"))
	if reconcileOnboarding(onboarding, boxes, documentExists) {
		Conf.Save()
	}
	if !onboarding.NewUser || onboarding.State == conf.OnboardingCompleted {
		return cloneOnboarding(onboarding), false, nil
	}
	if util.ReadOnly || Conf.Publish.Enable {
		return cloneOnboarding(onboarding), false, errors.New(Conf.Language(34))
	}

	if onboarding.NotebookID == "" {
		if len(boxes) > 0 {
			if len(boxes) == 1 && boxes[0].Name == Conf.Language(342) {
				onboarding.NotebookID = boxes[0].ID
				onboarding.State = conf.OnboardingNotebookCreated
				Conf.Save()
			} else {
				onboarding.State = conf.OnboardingCompleted
				onboarding.NewUser = false
				Conf.Save()
				return cloneOnboarding(onboarding), false, nil
			}
		}

		if onboarding.NotebookID == "" {
			onboarding.NotebookID, err = CreateBox(Conf.Language(342))

View on GitHub (pinned to 8641553a1f)

Solutions

  1. Open the workspace in normal (writable) mode to complete onboarding, then switch back to read-only/publish if needed
  2. Disable publish mode (Settings - Publish) or start the kernel without the read-only constraint
  3. If the workspace should never onboard (shared/replica workspace), mark the user as non-new or set onboarding state to completed so the guard is never reached
  4. Verify the data directory is writable; read-only mode may have been auto-activated because the disk or files are not writable
Defensive patterns

Strategy: validation

Validate before calling

if util.ReadOnly || conf.Conf.Publish.Enable {
    // skip or defer onboarding instead of calling EnsureOnboarding
    return
}
onboarding, created, err := EnsureOnboarding()

Try / catch

onboarding, created, err := EnsureOnboarding()
if err != nil {
    // localized read-only notice; not fatal - continue without onboarding UI
    log.Printf("onboarding skipped: %s", err.Error())
    return
}

Prevention

When it happens

Trigger: Calling EnsureOnboarding (via ensureOnboarding at startup) when util.ReadOnly is true or Conf.Publish.Enable is true while the onboarding state says a new-user walkthrough is still pending (onboarding.NewUser and State != OnboardingCompleted).

Common situations: Starting SiYuan with the workspace opened read-only (e.g. on read-only media or with the read-only flag) as a brand-new user; serving the workspace in publish mode where writes are disabled; automated/headless first launch under a read-only constraint.

Related errors


AI-assisted analysis of siyuan-note/siyuan@8641553a1f (2026-09-11). Data as JSON: /api/errors/b31fcab70dd1d09c. Report an issue: GitHub.