Back

[SOLVED] PasswordHistory error

  • 0
  • Web
BloodThermic
4 May, 2023, 02:18

I am getting a weird error when I am trying to create an account

TypeScript
[Error] URL: /v1/account
[Error] Type: Utopia\Database\Exception\Structure
[Error] Message: Invalid document structure: Unknown attribute: "passwordHistory"
[Error] File: /usr/src/code/vendor/utopia-php/database/src/Database/Database.php
[Error] Line: 2504```

Here is the code that is running
```import "../../app.css";
  import loginimg from "$lib/assets/login.jpg";
  import { Client, Account, ID } from "appwrite";

  const client = new Client();
  const account = new Account(client);

  client
    .setEndpoint("http://localhost:3080/v1") // Your API Endpoint
    .setProject("63db6c4c0a25ec0b287d"); // Your project ID

  async function handleSubmit() {
    const formData = new FormData(event.target);
    const name = formData.get("name");
    const email = formData.get("email");
    const password = formData.get("password");

    const response = await account.create(ID.unique(), email, password, name);
    console.log(response); // Success
  }```
TL;DR
Users are experiencing an error related to the "passwordHistory" attribute when trying to create an account. It seems to be caused by a recent upgrade. The error message suggests that the document structure is invalid. One user mentions not having properly migrated. The suggested solution is to follow the upgrade instructions provided in the CMD link. Importantly, the issue has been marked as solved.
Drake
4 May, 2023, 02:22

Did you recently upgrade? What exactly did you do as part of the upgrade?

BloodThermic
4 May, 2023, 02:23

About an hour ago. I followed CMD https://appwrite.io/docs/upgrade

BloodThermic
4 May, 2023, 02:24

I might not have migrated

Drake
4 May, 2023, 02:24

That would be the problem

BloodThermic
4 May, 2023, 02:24

Sorry! Thank you Steven your amazing!

Guille
4 May, 2023, 14:31

Hey @BloodThermic if your issue is solved, can you set this topic as [SOLVED]?

santiihoyos
4 May, 2023, 17:58

me too

santiihoyos
4 May, 2023, 17:59

ok, i see

BloodThermic
4 May, 2023, 20:39

[SOLVED] PasswordHistory error

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more