siyuan-note/siyuan · error

Conf.Language(77), msg: endpoint

Error message

Conf.Language(77), msg: endpoint [%s] is in workspace

What it means

Error from SetSyncProviderLocal: the configured local endpoint resolves inside the SiYuan workspace directory (or is the workspace itself), which would make sync recursively ingest workspace data; the request is rejected and wrapped with the localized template Conf.Language(77).

Solutions

  1. Choose an endpoint directory outside the workspace
  2. Move the sync data folder elsewhere and update the endpoint
  3. Use the workspace's own sync mechanism instead of pointing at the workspace
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at kernel/model/sync.go:712 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of siyuan-note/siyuan@9f775e8a12 (2026-09-19). Data as JSON: /api/errors/0d7f309ae111657d. Report an issue: GitHub.

Appendix: source

Thrown at kernel/model/sync.go:712

	local.Endpoint = util.NormalizeLocalPath(local.Endpoint)

	absPath, err := filepath.Abs(local.Endpoint)
	if nil != err {
		msg := fmt.Sprintf("get endpoint [%s] abs path failed: %s", local.Endpoint, err)
		logging.LogError(msg)
		err = fmt.Errorf(Conf.Language(77), msg)
		return
	}
	if !gulu.File.IsExist(absPath) {
		msg := fmt.Sprintf("endpoint [%s] not exist", local.Endpoint)
		logging.LogError(msg)
		err = fmt.Errorf(Conf.Language(77), msg)
		return
	}
	if util.IsAbsPathInWorkspace(absPath) || filepath.Clean(absPath) == filepath.Clean(util.WorkspaceDir) {
		msg := fmt.Sprintf("endpoint [%s] is in workspace", local.Endpoint)
		logging.LogError(msg)
		err = fmt.Errorf(Conf.Language(77), msg)
		return
	}

	if gulu.File.IsSubPath(absPath, util.WorkspaceDir) {
		msg := fmt.Sprintf("endpoint [%s] is parent of workspace", local.Endpoint)
		logging.LogError(msg)
		err = fmt.Errorf(Conf.Language(77), msg)
		return
	}

	local.Timeout = util.NormalizeTimeout(local.Timeout)
	local.ConcurrentReqs = util.NormalizeConcurrentReqs(local.ConcurrentReqs, conf.ProviderLocal)
	if Conf.Sync.Provider == conf.ProviderLocal && (Conf.Sync.Local == nil ||
		filepath.Clean(Conf.Sync.Local.Endpoint) != filepath.Clean(local.Endpoint)) {
		if err = requireCompleteAssetDownloads(); err != nil {
			return
		}
	}

View on GitHub (pinned to 9f775e8a12)