jessehouwing / azure-pipelines-tfvc-tasks

Azure Pipelines tasks for Team Foundation Version Control
https://marketplace.visualstudio.com/items?itemName=jessehouwing.jessehouwing-vsts-tfvc-tasks
MIT License
27 stars 18 forks source link

##[error]Exception calling "CheckIn" with "1" argument(s): "TF14045: The identity ____ is not a recognized identity." #57

Closed loumachado closed 6 years ago

loumachado commented 6 years ago

I'm getting a failure using the checkin task. I have an item checked out then I'm just trying to check in even with no changes.

milaaankooo commented 6 years ago

I just bumped into same issue. I tried everything without any results. I am open to any ideas how to troubleshoot.

loumachado commented 6 years ago

Is the task not running under the local agent account?

jessehouwing commented 6 years ago

It tries to pass in the identity of the triggering user. You could try commenting out the line assigning the author property.

On Nov 22, 2017 19:18, "loumachado" notifications@github.com wrote:

Is the task not running under the local agent account?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jessehouwing/vsts-tfvc-tasks/issues/57#issuecomment-346433381, or mute the thread https://github.com/notifications/unsubscribe-auth/AD-uS5VfAj2nRkTTgjghWblZgsj2NdHhks5s5GVogaJpZM4Qmjit .

jessehouwing commented 6 years ago

This line is causing the issues, but it's only causing them with specific user names. Also, please check whether you're on the latest version of the tasks, I recently accepted a pull request that supposedly fixes this issue.

I've not been able to repro it locally.

https://github.com/jessehouwing/vsts-tfvc-tasks/blob/master/vsts-tfvc-checkin/TfvcCheckin.ps1#L263

jessehouwing commented 6 years ago

Can you both provide me with a log of the task using the System.Debug=true variable set for the build definition? Full build logs would be appreciated.

loumachado commented 6 years ago

If I just remove the line will it default to current user?

jessehouwing commented 6 years ago

No idea. This is what the tf.exe passes under the hood and I tried to mimic their behavior as closely as possible.

I still want the time to migrate this task to actually calling tf.exe instead of my powershell port. But I haven't got the time and I'm no longer at the number of users where I can afford rolling out a test version and see what happens ;)

On Nov 22, 2017 7:42 PM, "loumachado" notifications@github.com wrote:

If I just remove the line will it default to current user?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jessehouwing/vsts-tfvc-tasks/issues/57#issuecomment-346439462, or mute the thread https://github.com/notifications/unsubscribe-auth/AD-uSxJJqMlfs-0yKen_Qq5GiJQjEWnOks5s5Gr9gaJpZM4Qmjit .

jessehouwing commented 6 years ago

I do suspect you can pass in: https://github.com/jessehouwing/vsts-tfvc-tasks/blob/master/vsts-tfvc-checkin/TfvcCheckin.ps1#L196

That should use the build agent's username to record the changes and not the name of the user who caused the build to trigger.

milaaankooo commented 6 years ago

Thanks for such rapid reply. I will try tomorrow and come back with results

On Nov 22, 2017 8:18 PM, "loumachado" notifications@github.com wrote:

Is the task not running under the local agent account?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jessehouwing/vsts-tfvc-tasks/issues/57#issuecomment-346433381, or mute the thread https://github.com/notifications/unsubscribe-auth/AgVfDRw11ztgWNlI4oZI7XCIldfW2oNsks5s5GVogaJpZM4Qmjit .

milaaankooo commented 6 years ago

I can confirm that commenting this line $checkinParameters.Author = $env:BUILD_QUEUEDBYID fixed my problem.

I believe to reproduce this problem you can just trigger build with user which does not have workspace on build machine.

jessehouwing commented 6 years ago

Thats good to know. I may make that option configurable then.

I don't think it has to do with the presence or absence of a workspace, but maybe it's cause by the inability to verify the identity against AD or something.

What is the username / display name of this user and is he/she in the same domain as the tfs server?

On Nov 23, 2017 14:03, "milaaankooo" notifications@github.com wrote:

I can confirm that commenting this line $checkinParameters.Author = $env:BUILD_QUEUEDBYID fixed my problem.

I believe to reproduce this problem you can just trigger build with user which does not have workspace on build machine.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jessehouwing/vsts-tfvc-tasks/issues/57#issuecomment-346612911, or mute the thread https://github.com/notifications/unsubscribe-auth/AD-uS5PtncQhU3jfSPewFtIuspvhFHnWks5s5W0cgaJpZM4Qmjit .

milaaankooo commented 6 years ago

in TFS username is in format "domain\firstname.lastname" and display name is "FirstName Lastname" and yes domain is the same as tfs server.

Do you think you might be able to make configurable author option any time soon? :)

jessehouwing commented 6 years ago

If you want it faster, give me a pull request, otherwise I may have time to do this in the weekend. An extra if and one extra input option aren't going to be a pot of work.

On Nov 23, 2017 14:21, "milaaankooo" notifications@github.com wrote:

in TFS username is in format "domain\firstname.lastname" and display name is "FirstName Lastname" and yes domain is the same as tfs server.

Do you think you might be able to make configurable author option any time soon? :)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jessehouwing/vsts-tfvc-tasks/issues/57#issuecomment-346616629, or mute the thread https://github.com/notifications/unsubscribe-auth/AD-uS9YiMvxqHPHH7oaPEcx5jJsBiCkKks5s5XFCgaJpZM4Qmjit .

milaaankooo commented 6 years ago

Weekend sounds just fine - fingers crossed and thanks a lot for your quick support

jessehouwing commented 6 years ago

I'd like to share a test version with you folks to verify this fixes your issue. Which VSTS accounts can I share the development version of the extension to?

You'd need to uninstall the existing extension temporarily, install the devversion, confirm the fix. Then I'll trigger a new build of the public version.

milaaankooo commented 6 years ago

I appreciate your quick support. We are having TFS On Prem so we upload extension manually.

On Nov 24, 2017 20:13, "Jesse Houwing" notifications@github.com wrote:

I'd like to share a test version with you folks to verify this fixes your issue. Which VSTS accounts can I share the development version of the extension to?

You'd need to uninstall the existing extension temporarily, install the devversion, confirm the fix. Then I'll trigger a new build of the public version.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jessehouwing/vsts-tfvc-tasks/issues/57#issuecomment-346878702, or mute the thread https://github.com/notifications/unsubscribe-auth/AgVfDT6UHb0RCCZkrVE2od9R0Ws-Ynfsks5s5wdUgaJpZM4Qmjit .

jessehouwing commented 6 years ago

jessehouwing.jessehouwing-vsts-tfvc-tasksDEV-1.2.8.zip

milaaankooo commented 6 years ago

Thank you very much! I'll provide feedback on monday

On Nov 24, 2017 21:26, "Jesse Houwing" notifications@github.com wrote:

jessehouwing.jessehouwing-vsts-tfvc-tasksDEV-1.2.8.zip https://github.com/jessehouwing/vsts-tfvc-tasks/files/1502419/jessehouwing.jessehouwing-vsts-tfvc-tasksDEV-1.2.8.zip

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jessehouwing/vsts-tfvc-tasks/issues/57#issuecomment-346886453, or mute the thread https://github.com/notifications/unsubscribe-auth/AgVfDSDgf50ELJf1DGHrrsDBxghKCvhpks5s5xhsgaJpZM4Qmjit .

milaaankooo commented 6 years ago

Hello Jesse,

I finally managed to test your latest version with author set to none and I confirm it fixed my issues. Thank you very much for such quick support.

jessehouwing commented 6 years ago

Microsoft has asked me to dig a bit deeper as this suggests there is a server bug. Would you be able to turn on debug, run a build with each option using a user that causes failure and send the full build agent logs? If needed through private email or directly to Microsoft, I can get you in contact with my contact.

This should not be failing and my workaround is just that.

Glad to hear the code is working though, I'll see if I can push an update.

On Nov 28, 2017 13:38, "milaaankooo" notifications@github.com wrote:

Hello Jesse,

I finally managed to test your latest version with author set to none and I confirm it fixed my issues. Thank you very much for such quick support.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/jessehouwing/vsts-tfvc-tasks/issues/57#issuecomment-347510781, or mute the thread https://github.com/notifications/unsubscribe-auth/AD-uSyXY-CpW8OcGC1q2twY9miZ5CEFvks5s6_7JgaJpZM4Qmjit .

milaaankooo commented 6 years ago

Of course I can do it and provide logs. Unfortunatelly this was tfs 2015 update 3 on prem on customer side and I am out of office - coming back onsite next week. I'll try to get logs earlier otherwise I'll provide them next week.

On Nov 28, 2017 2:48 PM, "Jesse Houwing" notifications@github.com wrote:

Microsoft has asked me to dig a bit deeper as this suggests there is a server bug. Would you be able to turn on debug, run a build with each option using a user that causes failure and send the full build agent logs? If needed through private email or directly to Microsoft, I can get you in contact with my contact.

This should not be failing and my workaround is just that.

Glad to hear the code is working though, I'll see if I can push an update.

On Nov 28, 2017 13:38, "milaaankooo" notifications@github.com wrote:

Hello Jesse,

I finally managed to test your latest version with author set to none and I confirm it fixed my issues. Thank you very much for such quick support.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/jessehouwing/vsts-tfvc-tasks/issues/57#issuecomment- 347510781, or mute the thread https://github.com/notifications/unsubscribe-auth/AD-uSyXY- CpW8OcGC1q2twY9miZ5CEFvks5s6_7JgaJpZM4Qmjit .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jessehouwing/vsts-tfvc-tasks/issues/57#issuecomment-347513372, or mute the thread https://github.com/notifications/unsubscribe-auth/AgVfDcUtIMkqpb4hlnpYFMSY1gzsnwx2ks5s7AEtgaJpZM4Qmjit .