{"record":{"id":"bd1f136be0d41ecc","repo":"anomalyco/sst","slug":"errlocknotfound","errorCode":"ErrLockNotFound","errorMessage":"Lock not found","messagePattern":"Lock not found","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"info","filePath":"pkg/project/provider/provider.go","lineNumber":69,"sourceCode":"\nfunc (dt *DevTransport) Publish(input interface{}) error {\n\tjsonBytes, err := json.Marshal(input)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdt.Out <- string(jsonBytes)\n\treturn nil\n}\n\ntype DevSession interface {\n\tCleanup() error\n\tPublish(json string) error\n}\n\nconst SSM_NAME_BOOTSTRAP = \"/sst/bootstrap\"\n\nvar ErrLockExists = fmt.Errorf(\"Concurrent update detected, run `sst unlock --stage=<stage>` to delete lock file and retry.\")\nvar ErrLockNotFound = fmt.Errorf(\"Lock not found\")\nvar passphraseCache = map[Home]map[string]string{}\n\nfunc Copy(from Home, to Home, app, stage string) error {\n\treader, err := from.getData(\"app\", app, stage)\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = to.putData(\"app\", app, stage, reader)\n\tif err != nil {\n\t\treturn err\n\t}\n\treader, err = from.getData(\"secret\", app, stage)\n\tif err != nil {\n\t\treturn err\n\t}\n\tto.putData(\"secret\", app, stage, reader)\n\treturn nil\n}","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/anomalyco/sst/blob/a0bd20f762883e72a35caccb4896c42ce5b3f707/pkg/project/provider/provider.go#L51-L87","documentation":"`ErrLockNotFound` is a sentinel error returned when SST tries to release/operate on a stage lock that does not exist. It is typically used internally to detect that no lock is held — e.g. `sst unlock` on an unlocked stage.","triggerScenarios":"Running `sst unlock --stage=<stage>` when no lock exists; internal unlock/cleanup paths invoked after the lock was already removed (e.g. a concurrent process released it first).","commonSituations":"Running unlock defensively after a deploy that actually completed; two processes racing to unlock the same stage.","solutions":["Nothing to fix — the stage is already unlocked; proceed with your deploy","If this blocks you unexpectedly, check for another sst process that already released the lock"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"# only unlock if a lock is actually present\naws ssm get-parameter --name /sst/lock/<app>/<stage> --query Parameter.Value","typeGuard":null,"tryCatchPattern":"err := sstUnlock(ctx, stage)\nif errors.Is(err, sst.ErrLockNotFound) {\n    // stage already unlocked — safe to proceed with deploy\n    return nil\n}","preventionTips":["Check for an existing lock before running unlock","Treat this as a no-op success in scripts","Avoid racing concurrent unlock commands"],"tags":["state","lock","unlock"],"backgroundTag":"lock-not-found","analyzedSha":"a0bd20f762883e72a35caccb4896c42ce5b3f707","analyzedAt":"2026-08-30T11:26:00.383Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}