Skip to content
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

File not found Issue and attach a file #49

Open
seetuaccn opened this issue Nov 6, 2020 · 5 comments
Open

File not found Issue and attach a file #49

seetuaccn opened this issue Nov 6, 2020 · 5 comments

Comments

@seetuaccn
Copy link

Hi,

I added email report extension recently but I'm getting "File not found: '/home/vsts/work/_tasks/EmailReport_36fd41b1-8024-4ce9-a5a0-53c3e54ed105/1.1.8/Index.js'" error.
Can you please help me here. Also, can you please let me know if I can attach any file with email notification with the same extensions.
I'm getting default notification when my job gets failed/success so; do I need to setup smtp also to use this email extensions.
Details screen shot is here -

==============================================================================
Task : Email Report
Description : Send rich email report for test results and for tasks in this stage
Version : 1.1.8
Author : Microsoft Corporation
Help : Sets 'EmailReportTask.EmailSent' variable to true if it sent email successfully. Learn More

##[error]File not found: '/home/vsts/work/_tasks/EmailReport_36fd41b1-8024-4ce9-a5a0-53c3e54ed105/1.1.8/Index.js'
Finishing: EmailReport

@fpaterour
Copy link

Hi,

I added email report extension recently but I'm getting "File not found: '/home/vsts/work/_tasks/EmailReport_36fd41b1-8024-4ce9-a5a0-53c3e54ed105/1.1.8/Index.js'" error.
Can you please help me here. Also, can you please let me know if I can attach any file with email notification with the same extensions.
I'm getting default notification when my job gets failed/success so; do I need to setup smtp also to use this email extensions.

Hi,

I had the same error using a job running on an ubuntu-20.04 agent. It worked when using a windows-2019 agent.

I figured out that the task was searching for a file named Index.js and that one named index.js was present in the directory.
This is probably due to how windows and linux deal with case. Windows is case insensitive when it comes to file names whereas linux is case sensitive so on linux the task couldn't find the correct file.

@Mithras
Copy link

Mithras commented Jun 5, 2021

I'm having the same issue. Using windows agent is not an option for me.

@Mithras
Copy link

Mithras commented Jun 5, 2021

Dirty workaround I came up with:
Just add this Bash task before EmailReport task

  - bash: |
      cd /mnt/vss/_work/_tasks/EmailReport_36fd41b1-8024-4ce9-a5a0-53c3e54ed105/1.1.8
      cp ./index.js ./Index.js
      sed -i -e "s~\\\\\\\\~/~" ./htmlreport/HTMLReportCreator.js
      sed -i -e "s~\\\\\\\\~/~" ./model/helpers/LinkHelper.js
    displayName: EmailReport fix
    continueOnError: true

(you might need to fix cd <path> to match your EmailReport version)

@Mithras Mithras mentioned this issue Jun 5, 2021
@calrom-jtejero
Copy link

hi @Mithras seems you and me found and solved the same issue with the file.

my PR is here #51 but seems the repo owners are not reviewing this repo for a long time.

@calrom-jtejero
Copy link

cannot be bothered to wait for Microsoft to fix this one, I am using now my own extension:
https://marketplace.visualstudio.com/items?itemName=calrom-jtejero.CalromEmailReportExtension

the code is in my fork:
https://github.com/calrom-jtejero/azure-devops-engineering-extensions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants