<@U04UQ68083H> When does the following occur? ``...
# ory-copilot
q
@chilly-king-10285 When does the following occur?
Copy code
"messages": [
      {
        "id": 4010005,
        "text": "Could not find a strategy to recover your account with. Did you fill out the form correctly?",
        "type": "error"
      }
    ]
c
A message from kapa.ai
The error message
Copy code
{
  "id": 4010005,
  "text": "Could not find a strategy to recover your account with. Did you fill out the form correctly?",
  "type": "error"
}
occurs when Ory Kratos is unable to find a suitable account recovery strategy for the request. This typically means that either the recovery method is not configured, the form was not filled out correctly, or the input does not match any enabled recovery strategies in your configuration. In other words, the system cannot proceed with account recovery because it doesn't know how to handle the request based on the current setup or user input&nbsp;[Could not find a strategy to recover your account with. Did you fill out the form correctly? (4010005)](https://www.ory.sh/docs/kratos/concepts/ui-user-interface#could-not-find-a-strategy-to-recover-your-account-with-did-you-fill-out-the-form-correctly-4010005).
q
This is the form I rendered where they have to input the email, what's missing? <form class="form" method="POST" action="http://localhost:4433/self-service/recovery?flow=99269a73-8eb5-4bd6-9951-efdd125efecf"> <input type="hidden" value="EKA21vzo/x5arAaonxFWsbkKytkL/veumVnPO18m36p+ZG7bq28dHmCy8zUyEvE8uOFZqTljTwLEeKW9GlubCQ==" name="csrf_token"> <input data-slot="input" class="file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 darkaria invalidring-destructive/40 aria-invalid:border-destructive" placeholder="Email" required="" type="email" name="email" value=""> <button type="submit" class="submit">Continue</button> </form>
@chilly-king-10285 This is the form I rendered where they have to input the email, what's missing? <form class="form" method="POST" action="http://localhost:4433/self-service/recovery?flow=99269a73-8eb5-4bd6-9951-efdd125efecf"> <input type="hidden" value="EKA21vzo/x5arAaonxFWsbkKytkL/veumVnPO18m36p+ZG7bq28dHmCy8zUyEvE8uOFZqTljTwLEeKW9GlubCQ==" name="csrf_token"> <input data-slot="input" class="file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 darkaria invalidring-destructive/40 aria-invalid:border-destructive" placeholder="Email" required="" type="email" name="email" value=""> <button type="submit" class="submit">Continue</button> </form>
c
A message from kapa.ai
Based on the knowledge sources, your form is missing the required field to specify the recovery method. Ory Kratos expects a field named
method
with the value set to the recovery strategy you are using (typically
"code"
for the recommended one-time code method). Without this field, Kratos cannot determine which recovery strategy to use, resulting in the error: > "Could not find a strategy to recover your account with. Did you fill out the form correctly?" (4010005) To fix this, add a hidden input to your form:
Copy code
html <input type="hidden" name="method" value="code">
Your form should look like this (simplified):
Copy code
html <form method="POST" action="http://localhost:4433/self-service/recovery?flow=99269a73-8eb5-4bd6-9951-efdd125efecf">   <input type="hidden" name="csrf_token" value="EKA21vzo/x5arAaonxFWsbkKytkL/veumVnPO18m36p+ZG7bq28dHmCy8zUyEvE8uOFZqTljTwLEeKW9GlubCQ==">   <input type="hidden" name="method" value="code">   <input type="email" name="email" placeholder="Email" required>   <button type="submit">Continue</button> </form>
This matches the expected payload for the recovery flow as shown in the documentation&nbsp;[Submit recovery flow](https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-basic-integration#submit-recovery-flow).