-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Cannot read property 'avatar_url' or null #4
Comments
@mpconte, do you have a user that is making commits that doesn't have an avatar? I can test this myself, but curious whether you're seeing any consistency from the users who commit who are seeing this issue? |
Yes, I'm performing the commit and I don't have an avatar in Microsoft Teams and I think someone else makes commits too but does have one. Does an avatar have to be necessary? |
Thanks! I will take a look at this before the end of the week. |
@mpconte, this is referencing the |
@jdcargile My gihub workflow using this action doesn't run on commits (sorry), I have it set as a workflow_dispatch to checkout changes, build and package it and notify microsoft teams at the end if the previous steps succeed. |
It looks like the issue is reproduced, when the last commit is made by the user, whose email is not registered in GitHub |
@jdcargile , I see, that the author is taken from commit here ms-teams-notification/dist/index.js Line 2958 in a94290d
|
Hey, I am running into the same issue....any good news? |
I'm also running into this issue, is there any progress on a fix? |
Thank you all for your comments and questions. What would you suggest we use for the author if it is not found? Should I do a default avatar image or omit the image altogether? |
He JD,
Cheers and thanks again! |
Sounds good to me. |
This is fixed in #7. To pick up the new version, update your action version to use v1.3. See snippet below for more information.
|
I updated to 1.3 but I still received the same error. |
@tsposato, can you try using |
Will do. Not sure I'll get to test this until Monday as 5pm has rolled around but I'll let you know the outcome as soon as I can. |
The other weird thing is that the person in question does actually have an avatar set. Unless I'm misunderstanding the way it retrieves an avatar. Is there something strange about how GitHub does things avatar wise I'm not getting? |
This might not be fixed then. Perhaps I need to query the user directly before trying to grab their information. I can look into this more tomorrow. |
Slightly different error when using master now @jdcargile : TypeError: Cannot read property 'login' of null |
Ok, so after some more digging it turns out the user had incorrectly spelt their email in their git user.email settings on one of their clients, hence why the user isn't being linked to their github account correctly. I think it should still probably be 'caught' instead of just failing completely though. Maybe just grab the name from the commit message and use that default avatar. |
Hi @jdcargile, Getting the below error when using "uses: jdcargile/ms-teams-notification" instead of uses: jdcargile/[email protected]. Kindly suggest. |
@jdcargile can you release a v1.4 that includes this commit - 3e536e0? |
@jdcargile facing same issue - using v1.3 TypeError: Cannot read property 'avatar_url' of null |
We experienced this exact problem. When I dug in further, it appears that the author, was different than who committed... that author wasn't registered in GitHub from Name and email, but SSH keys are.. so he is a valid contributor on the repository, but GitHub doesn't recognize the email he committed with (because he didn't add that in his profile), yet his SSH key's re valid to commit. I propose that if avatar_url fails, you put in a default avatar image, instead of failing the job. |
Hi mate, have you got a pull request that shows how to fix this? Most of our users do not have avatars. |
Is there a fix for this issue yet ? |
same here, started having this issue since yesterday! all was good until suddenly it stopped! |
Having this issue since last week. Looks like 3e536e0 fixes it |
anibody fixed this issue already? |
Any news on this bug ? |
This started appearing today. Any news on the fix? |
I looked at the forks and searched for a fix, one fixed the bug in this pre-release https://github.com/TBCTSystems/ms-teams-notification/releases/tag/v1.3.1 |
Maybe someone can create a pull request if it works for you too. |
try this, for me it works! Only this, and remove other parameters.
|
You have to have git user configured globally. I was using custom configuration without global settings. Adding as follows fixed the issue. git config --global user.name "your_username" |
this is still not fixed in 1.3 getting the same error, i think the owner of code does not continue to support this code TypeError: Cannot read property 'avatar_url' of null |
Was this avatar_url issue ever fixed? We're still getting this error with v1.3... |
same here |
@bkagan98 @kimbalabhay Confirming that we are seeing the |
Hello,
I can't reproduce this all the time, but maybe every other time I get the following error:
TypeError: Cannot read property 'avatar_url' of null at Object.createMessageCard (C:\Users\rdbot\Desktop\action-runners\pdp_utils\_work\_actions\jdcargile\ms-teams-notification\v1.2\dist\index.js:2341:39) at C:\Users\rdbot\Desktop\action-runners\pdp_utils\_work\_actions\jdcargile\ms-teams-notification\v1.2\dist\index.js:2959:54 at Generator.next (<anonymous>) at fulfilled (C:\Users\rdbot\Desktop\action-runners\pdp_utils\_work\_actions\jdcargile\ms-teams-notification\v1.2\dist\index.js:2906:58) at processTicksAndRejections (internal/process/task_queues.js:93:5) ##[error]Cannot read property 'avatar_url' of null
The text was updated successfully, but these errors were encountered: