siyuan-note/siyuan · error
You have already used a free trial subscription. Duplicate t
Error message
You have already used a free trial subscription. Duplicate trial subscriptions are not supported.
What it means
In StartFreeTrial, returned when the cloud server responds with requestResult.Code == -2, the documented code for 'this account has already used a free trial subscription'. Conf.Language(298) resolves to 'You have already used a free trial subscription. Duplicate trial subscriptions are not supported.' This is a one-time-per-account business rule enforced server-side.
Source
Thrown at kernel/model/cloud_service.go:122
return errors.New(Conf.Language(31))
}
requestResult := gulu.Ret.NewResult()
request := httpclient.NewCloudRequest30s()
resp, err := request.
SetSuccessResult(requestResult).
SetCookies(&http.Cookie{Name: "symphony", Value: Conf.GetUser().UserToken}).
Post(util.GetCloudServer() + "/apis/siyuan/user/startFreeTrial")
if err != nil {
logging.LogErrorf("start free trial failed: %s", err)
return ErrFailedToConnectCloudServer
}
if http.StatusOK != resp.StatusCode {
logging.LogErrorf("start free trial failed: %d", resp.StatusCode)
return ErrFailedToConnectCloudServer
}
if -2 == requestResult.Code { // 已经试用订阅过
return errors.New(Conf.Language(298))
}
if 0 != requestResult.Code {
return errors.New(requestResult.Msg)
}
return
}
func DeactivateUser() (err error) {
requestResult := gulu.Ret.NewResult()
request := httpclient.NewCloudRequest30s()
resp, err := request.
SetSuccessResult(requestResult).
SetCookies(&http.Cookie{Name: "symphony", Value: Conf.GetUser().UserToken}).
Post(util.GetCloudServer() + "/apis/siyuan/user/deactivate")
if err != nil {
logging.LogErrorf("deactivate user failed: %s", err)
return ErrFailedToConnectCloudServer
}View on GitHub (pinned to 251596fc0d)
Solutions
- Inform the user that the free trial is one-time-only and cannot be renewed.
- Offer a paid subscription as the alternative path.
- Use a fresh account only if a legitimate new trial is intended (not to circumvent the rule).
Example fix
// before
err := StartFreeTrial()
if err != nil { showGenericError(err) }
// after
err := StartFreeTrial()
if err != nil && strings.Contains(err.Error(), Conf.Language(298)) {
showTrialAlreadyUsedHelp()
} else if err != nil { showError(err) } Defensive patterns
Strategy: validation
Validate before calling
// Track prior trial use locally to avoid a redundant round trip
if userAlreadyTriedTrial() { showTrialAlreadyUsedHelp(); return } Type guard
func isTrialAlreadyUsed(err error) bool {
return err != nil && strings.Contains(err.Error(), model.Conf.Language(298))
} Try / catch
if err := model.StartFreeTrial(); err != nil {
if isTrialAlreadyUsed(err) { showUpgradePrompt() } else { showError(err) }
} Prevention
- Cache the 'trial used' state locally after the first -2 response to avoid repeat attempts.
- Offer a paid subscription as the fallback when the trial was already consumed.
- Do not attempt to bypass the one-trial-per-account rule with multiple logins.
When it happens
Trigger: The user already activated a free trial on this account in the past and attempts to start another. The server returns Code -2 specifically for this condition, distinct from other non-zero codes.
Common situations: User forgot they previously trialed; account shared across devices where trial was consumed elsewhere; testing environment reusing a real account that already trialed.
Related errors
- Account authentication failed, please login again
- failed to connect cloud server
- requestResult.Msg
- result["msg"].(string)
- --id is required
AI-assisted analysis of siyuan-note/siyuan@251596fc0d (2026-08-12).
Data as JSON: /api/errors/eb3d76fbcda9aef0.
Report an issue: GitHub.