cal.com icon indicating copy to clipboard operation
cal.com copied to clipboard

[CAL-3056] avatarapi.com not prefilling

Open PeerRich opened this issue 1 year ago • 11 comments

i tried [email protected] and got no avatar:

CleanShot 2024-01-30 at 15 23 20@2x

CleanShot 2024-01-30 at 15 23 44@2x

From SyncLinear.com | CAL-3056

PeerRich avatar Jan 30 '24 15:01 PeerRich

PR that added avatarapi.com: https://github.com/calcom/cal.com/pull/13185

I made sure to add production keys to vercel

PeerRich avatar Jan 30 '24 15:01 PeerRich

@Amit91848 or @infiniteloopltd can you help?

PeerRich avatar Jan 30 '24 15:01 PeerRich

@PeerRich Just checked, it is working fine for me.

Screenshot (12)

https://github.com/calcom/cal.com/assets/74371312/7e405675-82a8-4f95-ac53-6e17bda732e0

Amit91848 avatar Jan 31 '24 12:01 Amit91848

can you try this on production? of course with an email you own

PeerRich avatar Jan 31 '24 13:01 PeerRich

@PeerRich it is not working on production. Did you check how many credits you have?

Amit91848 avatar Jan 31 '24 13:01 Amit91848

we have enough credits

PeerRich avatar Feb 04 '24 19:02 PeerRich

these are correct .env variables right?

CleanShot 2024-02-04 at 19 26 45@2x

PeerRich avatar Feb 04 '24 19:02 PeerRich

or does it need to be NEXT_PUBLIC prefix?

PeerRich avatar Feb 04 '24 19:02 PeerRich

Hi,

Our company operates AvatarAPI.com - so I'll offer what I can in terms of diagnistics here;

Here is the history of requests for the use [email protected]

id email username dateRequested
529010 [email protected] v0ltZz 2024-01-31 12:50:56.187
529008 [email protected] v0ltZz 2024-01-31 12:46:23.603
515773 [email protected] calcom 2024-01-18 22:35:35.193
460063 [email protected] grandprix 2023-11-10 22:48:23.110

The account has enough credit, and the username and password (as supplied by emal) were correct. The user account "calcom" would have been expected to have made more than just 1 request.

So, A question, can anyone see any exception coming back from "AvatarAPI" ? are the errors logged anywhere within your system?

i.e.

    "Success": false,
    "Error": "Login failure"
}

would indicate that the credentials are incorrect , or

    "Success": false,
    "Error": "Failed Due to XYZ"
}

would indicate perhaps a mis-formatting of the email

infiniteloopltd avatar Feb 05 '24 09:02 infiniteloopltd

my prediction is, something is wrong with the .env variables on our vercel. investigating

PeerRich avatar Feb 05 '24 09:02 PeerRich

or does it need to be NEXT_PUBLIC prefix?

I don't think so, we are only using it in server to there is no need for any prefix.

Hi,

Our company operates AvatarAPI.com - so I'll offer what I can in terms of diagnistics here;

Here is the history of requests for the use [email protected]

id email username dateRequested 515773 [email protected] calcom 2024-01-18 22:35:35.193

Also request reached to avatarapi.com so env variables seems to be working fine. Could be authentication error?

So, A question, can anyone see any exception coming back from "AvatarAPI" ? are the errors logged anywhere within your system?

  if (!info.Success) {
    console.log("Error from avatar api: ", info.Error);
    return null;
  }

https://github.com/calcom/cal.com/blob/296a3679558646946c55756eb616fd48fcf041c0/packages/features/auth/signup/utils/prefillAvatar.ts#L78C1-L81C4

Errors should be logged here.

Amit91848 avatar Feb 09 '24 13:02 Amit91848

Is this still an issue?

keithwillcode avatar Sep 25 '24 15:09 keithwillcode

Fixed April 20 in https://github.com/calcom/cal.com/pull/14675

emrysal avatar Sep 25 '24 17:09 emrysal