m1k1o/neko · error
cannot select user in noauth mode
Error message
cannot select user in noauth mode
What it means
Returned by MemberProviderCtx.Select in the noauth member provider when any code attempts to look up a user profile by ID. In noauth mode there is no user database, so select operations are unsupported and always fail with this error.
Source
Thrown at server/internal/member/noauth/provider.go:66
provider.profile.Name = username
return id, provider.profile, nil
}
func (provider *MemberProviderCtx) Insert(username string, password string, profile types.MemberProfile) (string, error) {
return "", errors.New("new user is created on first login in noauth mode")
}
func (provider *MemberProviderCtx) UpdateProfile(id string, profile types.MemberProfile) error {
return nil
}
func (provider *MemberProviderCtx) UpdatePassword(id string, password string) error {
return errors.New("noauth mode does not have password")
}
func (provider *MemberProviderCtx) Select(id string) (types.MemberProfile, error) {
return types.MemberProfile{}, errors.New("cannot select user in noauth mode")
}
func (provider *MemberProviderCtx) SelectAll(limit int, offset int) (map[string]types.MemberProfile, error) {
return map[string]types.MemberProfile{}, nil
}
func (provider *MemberProviderCtx) Delete(id string) error {
return errors.New("cannot delete user in noauth mode")
}
View on GitHub (pinned to b0f01cedea)
Solutions
- Do not perform per-ID member lookups in noauth mode; use the shared anonymous profile.
- Switch to multiuser or another dynamic provider if profile lookup is required.
- Guard client code to skip Select calls when provider is noauth.
Example fix
// before
profile, err := memberClient.Select(id)
// after
if memberProvider == "noauth" {
return errors.New("no per-user lookup in noauth mode")
}
profile, err := memberClient.Select(id) Defensive patterns
Strategy: validation
Validate before calling
if memberProvider == "noauth" {
return errors.New("no per-user profiles exist in noauth mode")
}
profile, err := memberClient.Select(id) Type guard
func isNoauthSelectErr(err error) bool {
return err != nil && strings.Contains(err.Error(), "cannot select user in noauth")
} Try / catch
profile, err := memberClient.Select(id)
if err != nil {
if isNoauthSelectErr(err) {
profile = types.MemberProfile{Name: "anonymous"} // shared noauth profile
} else {
return err
}
} Prevention
- Use the shared anonymous profile instead of per-ID lookups in noauth mode.
- Gate profile-dependent features on the member provider type.
- Do not build admin user listings against noauth deployments (SelectAll is empty).
- Choose a multiuser/dynamic provider when profile lookup is needed.
When it happens
Trigger: Any call to the member Select API (fetch member profile by ID) while the member provider is 'noauth'.
Common situations: Admin or client code tries to look up a user profile by ID against a noauth deployment; the lookup always fails because only the implicit anonymous user exists and has no selectable record.
Related errors
- cannot select user in multiuser mode
- new user is created on first login in noauth mode
- noauth mode does not have password
- cannot delete user in noauth mode
- new user is created on first login in multiuser mode
AI-assisted analysis of m1k1o/neko@b0f01cedea (2026-09-01).
Data as JSON: /api/errors/4d92be9e0328a1a7.
Report an issue: GitHub.