Back

migration: "Failed to transfer resource 'xxxxxx:user' with message 'Password hash is missing'"

  • 0
  • Self Hosted
  • Web
Meldiron
19 Dec, 2023, 07:00

cc @bradleySchofield

TL;DR
The user is encountering an error message during migration that says "Failed to transfer resource 'xxxxxx:user' with message 'Password hash is missing'". They discuss the issue and examine the user's data, finding that the password and hash options are missing. The user asks for help in obtaining complete user information, including passwords and hashes. The support team suggests using the users API and confirms that it should be possible to obtain the necessary information. They also mention that the unexpected response may be due to the avatar attribute, which is not recognized. The user provides additional information and the support team requests the JSON of the user's data. The support
bradleySchofield
19 Dec, 2023, 08:07

Is that user an OAuth user?

WildAnimal
19 Dec, 2023, 12:47

Yes it is.

bradleySchofield
19 Dec, 2023, 12:52

Ah, I see

bradleySchofield
19 Dec, 2023, 12:53

in that case it should even attempt to assign a password hash

bradleySchofield
19 Dec, 2023, 12:54

I'm currently working on quite a few things for migrations to fix it up and make it alot better, hopefully I'll have an early version of the library soon and I'll whip up a small script you can run

WildAnimal
20 Dec, 2023, 01:51

Thank you, hoping to complete it as soon as possible.

bradleySchofield
20 Dec, 2023, 10:28

Sorry, is there any chance you can send me the JSON of what the user looks like? Please remove all the personal information. I just need to see the schema and whatever is null/undefined

WildAnimal
21 Dec, 2023, 06:51

From browser developer tool internet panel, I just got these information:

TypeScript
{
    "$id": "64b38f96879f2d4b3254",
    "$createdAt": "2023-07-16T06:35:02.867+00:00",
    "$updatedAt": "2023-12-21T06:44:12.240+00:00",
    "name": "",
    "registration": "2023-07-16T06:35:02.867+00:00",
    "status": true,
    "passwordUpdate": "2023-07-27T08:15:33.299+00:00",
    "email": "myemail@gmail.com",
    "phone": "",
    "emailVerification": true,
    "phoneVerification": false,
    "prefs": {},
    "avatar": "https://xxx"
}
WildAnimal
21 Dec, 2023, 06:54

This is my personal infomation, some other users may had not updated their password, so "passwordUpdate" field may be null.

Drake
21 Dec, 2023, 19:33

What request are you getting this response from? this is kind of unexpected...I expect to see hash, password, and hashOptions

Also, avatar isn't one of our attributes 🧐

Here's the expected structure: https://github.com/appwrite/appwrite/blob/1.3.7/src/Appwrite/Utopia/Response/Model/User.php

WildAnimal
22 Dec, 2023, 02:42

It may not be possible to obtain complete information through the API, but it can be confirmed that almost all users complete identity authentication through oauth2, so they have not set or changed passwords, and there may not have a password and hash.

Drake
22 Dec, 2023, 02:44

You should be able to with the users API... Appwrite uses the same APIs for the migration

WildAnimal
22 Dec, 2023, 02:48

I am using the nodejs version of SDK, how to obtain complete user information, including passwords and hashes.

Drake
22 Dec, 2023, 02:49

What version of the node SDK?

WildAnimal
22 Dec, 2023, 04:09

"node-appwrite": "^9.0.0"

Drake
22 Dec, 2023, 04:23
WildAnimal
22 Dec, 2023, 05:16

There:

TypeScript
{
    "$id": "65796258d6ece0f7435f",
    "$createdAt": "2023-12-13T07:50:48.880+00:00",
    "$updatedAt": "2023-12-13T07:51:27.800+00:00",
    "name": "",
    "password": null,
    "hash": "argon2",
    "hashOptions": {
        "type": "argon2",
        "memoryCost": 2048,
        "timeCost": 4,
        "threads": 3
    },
    "registration": "2023-12-13T07:50:48.880+00:00",
    "status": true,
    "passwordUpdate": "",
    "email": "mailname@domainname.com",
    "phone": "",
    "emailVerification": true,
    "phoneVerification": false,
    "prefs": {
        "quotas": "{}"
    }
}
Drake
22 Dec, 2023, 05:16

Cc @bradleySchofield

bradleySchofield
22 Dec, 2023, 10:14

thats, uhhh, unusual. You shouldn't have any hash options or hash at all for that matter if there isn't a password

bradleySchofield
22 Dec, 2023, 10:14

how does this user sign in?

bradleySchofield
22 Dec, 2023, 15:45

Ah, I see looks like I make an asumption here where I shouldn't

WildAnimal
25 Dec, 2023, 05:25

Hello heroic men, Is there any progress now πŸ™‚

bradleySchofield
27 Dec, 2023, 10:23

Sorry, we've been off for the Christmas holidays but please rest assured I'm still working on it

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