juicedata/juicefs · error

storj: parse access grant: %w

Error message

storj: parse access grant: %w

What it means

Returned by newStorj when uplink.ParseAccess rejects the supplied access grant — the string is not a valid serialized Storj access grant (truncated, wrong encoding, or from an incompatible uplink version).

Source

Thrown at pkg/object/storj.go:351

				UploadID: item.UploadID,
				Created:  item.System.Created,
			})
		}
		return iter.Err()
	})
	if err != nil {
		return nil, "", err
	}
	return pending, "", nil
}

func newStorj(endpoint, accessGrant, _, _ string) (ObjectStorage, error) {
	if accessGrant == "" {
		return nil, fmt.Errorf("storj: access grant is required (pass via --access-key)")
	}
	access, err := uplink.ParseAccess(accessGrant)
	if err != nil {
		return nil, fmt.Errorf("storj: parse access grant: %w", err)
	}
	bucket := strings.Trim(strings.TrimPrefix(endpoint, "storj://"), "/")
	if bucket == "" {
		return nil, fmt.Errorf("storj: bucket name is required (set via --bucket)")
	}

	cfg := uplink.Config{UserAgent: UserAgent}

	ctx := context.Background()
	project, err := cfg.OpenProject(ctx, access)
	if err != nil {
		return nil, fmt.Errorf("storj: open project: %w", err)
	}
	return &storjClient{project: project, bucket: bucket}, nil
}

func init() {
	Register("storj", newStorj)

View on GitHub (pinned to c9a67b23e8)

Solutions

  1. Regenerate the access grant in the Storj console/uplink CLI and paste it fully
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at pkg/object/storj.go:351 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of juicedata/juicefs@c9a67b23e8 (2026-09-06). Data as JSON: /api/errors/0f1ad8e68755f031. Report an issue: GitHub.