appwrite icon indicating copy to clipboard operation
appwrite copied to clipboard

🐛 Bug Report: Error attribute "Factor" must be an array when updating MFA

Open losfroger opened this issue 7 months ago • 6 comments

👟 Reproduction steps

  1. Log in with a user through a web app
  2. Generate MFA Recovery codes
  3. Add authenticator
  4. Use the updateMFA(true) function from the appwrite sdk store

👍 Expected behavior

A 200 response as indicated in the docs

👎 Actual Behavior

Giving the following htpp response:

{
  "message":"Invalid document structure: Attribute \"factors\" must be an array",
  "code":400,
  "type":"document_invalid_structure",
  "version":"1.5.7"
}

And the following inside the docker logs:

appwrite                           | [Error] Timestamp: 2024-07-18T18:46:03+00:00
appwrite                           | [Error] Method: PATCH
appwrite                           | [Error] URL: /v1/account/mfa
appwrite                           | [Error] Type: Utopia\Database\Exception\Structure
appwrite                           | [Error] Message: Invalid document structure: Attribute "factors" must be an array
appwrite                           | [Error] File:
appwrite                           | [Error] Line: 0

It seems to still activate MFA, but not sure if this error is something I should pay attention to, or ignore it

🎲 Appwrite version

Version 1.5.x

💻 Operating system

Linux

🧱 Your Environment

I'm using a self-hosted docker instance.

I've tried using docker compose down -v as a suggestion from the discord server. And it fixed it temporarily, but the issue popped up again

👀 Have you spent some time to check if this issue has been raised before?

  • [X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

losfroger avatar Jul 18 '24 19:07 losfroger