siyuan-note/siyuan · error

symbolic attribute view is not supported

Error message

symbolic attribute view is not supported: %s

What it means

scanViews iterates the global storage/av directory of attribute-view (database) definitions. Symlinked .json definition files are rejected because relinking must operate on real in-data files; a symlink could point outside the data directory or be retargeted, breaking the invariant that scanned files are regular files inside the workspace.

Solutions

  1. Remove the symlink and replace it with a real copy of the target .json file
  2. Re-sync the workspace from the authoritative source so real files are restored
  3. Check backup/restore tooling so symlinks are dereferenced into regular files

Example fix

// before
// storage/av/20240101120000-abc123.json -> /external/db.json (symlink)
// after
os.Remove("data/storage/av/20240101120000-abc123.json")
filelock.WriteFile("data/storage/av/20240101120000-abc123.json", realContent)
Defensive patterns

Strategy: validation

Validate before calling

// detect symlinks under storage/av before relinking
entries, _ := os.ReadDir(filepath.Join(dataDir, "storage", "av"))
for _, e := range entries {
	if e.Type()&os.ModeSymlink != 0 {
		// resolve or remove the symlink first
	}
}

Prevention

When it happens

Trigger: During scan (via scanViews), a file like storage/av/20240101120000-abc123.json is a symbolic link instead of a regular file.

Common situations: A user manually symlinked AV definitions between workspaces to 'share' databases; a sync tool replaced files with symlinks; a backup/restore process materialized entries as symlinks.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


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

Appendix: source

Thrown at kernel/model/asset_relink.go:302

	entries, err := os.ReadDir(dir)
	if err != nil && !os.IsNotExist(err) {
		return err
	}
	for _, entry := range entries {
		if err := p.checkContext(); err != nil {
			return err
		}
		id := strings.TrimSuffix(entry.Name(), ".json")
		if entry.IsDir() || !strings.HasSuffix(entry.Name(), ".json") || !ast.IsNodeIDPattern(id) {
			continue
		}
		abs := filepath.Join(dir, entry.Name())
		if err = p.observe(abs); err != nil {
			return err
		}
		p.reportProgress(abs)
		if entry.Type()&os.ModeSymlink != 0 {
			return fmt.Errorf("symbolic attribute view is not supported: %s", id)
		}
		if err = validateRelinkStoragePath(abs); err != nil {
			return err
		}
		data, err := filelock.ReadFile(abs)
		if err != nil {
			return err
		}
		if util.IsCiphertext(data) {
			return fmt.Errorf("encrypted attribute view in global storage: %s", id)
		}
		if !json.Valid(data) {
			return fmt.Errorf("invalid attribute view JSON: %s", id)
		}
		if !p.mayContainReferences(data) {
			continue
		}
		p.parsedViews++

View on GitHub (pinned to 9f775e8a12)