microsoft / azure-pipelines-tasks

Tasks for Azure Pipelines
https://aka.ms/tfbuild
MIT License
3.49k stars 2.61k forks source link

[BUG]: PublishTestResults@2 fails when searching folder with emojis since v.2.233.2 #19645

Open yy-2020 opened 6 months ago

yy-2020 commented 6 months ago

New issue checklist

Task name

PublishTestResults@2

Task version

2.233.2

Issue Description

The pipeline runs well in v2.233.1. Since 2.233.2 it fails with the error:

[error]Error: Failed find: ENOENT: no such file or directory, lstat 'J:\azure-agent_work\1\s.git\logs\refs\remotes\origin\wonderland🦄🍭'

Environment type (Please select at least one enviroment where you face this issue)

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

3.236.1

Operation system

windows-2019

Relevant log output

##[error]Error: Failed find: ENOENT: no such file or directory, lstat 'J:\azure-agent\_work\1\s\.git\logs\refs\remotes\origin\wonderland🦄🍭'

Full task logs with system.debug enabled

2024-03-15T12:21:20.9857720Z ##[debug] D:\a\1\s\.git\logs\refs\remotes\origin\release\32.0 (file) 2024-03-15T12:21:20.9858260Z ##[debug] D:\a\1\s\.git\logs\refs\remotes\origin\release\32.1 (file) 2024-03-15T12:21:20.9877966Z ##[debug]task result: Failed 2024-03-15T12:21:20.9924075Z ##[error]Error: Failed find: ENOENT: no such file or directory, lstat 'D:\a\1\s\.git\logs\refs\remotes\origin\wonderland🦄🍭' 2024-03-15T12:21:20.9935935Z ##[debug]Processed: ##vso[task.issue type=error;]Error: Failed find: ENOENT: no such file or directory, lstat 'D:\a\1\s\.git\logs\refs\remotes\origin\wonderland🦄🍭' 2024-03-15T12:21:20.9937519Z ##[debug]Processed: ##vso[task.complete result=Failed;]Error: Failed find: ENOENT: no such file or directory, lstat 'D:\a\1\s\.git\logs\refs\remotes\origin\wonderland🦄🍭' 2024-03-15T12:21:20.9939178Z ##[debug]Release.ReleaseUri=undefined 2024-03-15T12:21:20.9951305Z ##[debug]Release.ReleaseId=undefined

Repro steps

No response

DmitriiBobreshev commented 6 months ago

Hi @yy-2020 thank you for reaching us. We've released a fix, can you please confirm that the error is fixed and could you please specify your current task version?

qianz2 commented 6 months ago

Thanks for reaching out to us, looks that we'll need to update node version to 20.11.0 which includes a fix to this emoji issue in node library.

yy-2020 commented 3 months ago

@DmitriiBobreshev Sorry for the late reply.

Thank you for the fix. but since Task version 2.240.1, this bug is there again. Could you please have a look? Thank you.

DmitriiBobreshev commented 3 months ago

HI @yy-2020, could you please specify an agent version? The error itself is node20 problem which was fixed in 20.12.0. If you're using the agent from the started topic(3.236.1) it distributes with node 20.11.1. Could you please try to use latest agent 3.240.1 with node 20.13.1?

BTW, checked with the latest agent and seems like everything works well image

yy-2020 commented 3 months ago

@DmitriiBobreshev. Yes, after upgraded agents to 3.240.1, pipeline runs well. Thank you.

Interesting is the combination: agent version 3.236.1 + task version 1.238.0 works well too.

DmitriiBobreshev commented 3 months ago

@yy-2020, Task version 1.238.0 runs on node16 which does not have such problems, but, unfortunatelly, this version is EOL so we're migrating the tasks to node20 now, that's why the error started to happen