Skip to content

Error: Unrecognized if-no-files-found input. Provided: . Available options: warn,error,ignore #255

@zivkovic

Description

@zivkovic

Describe the bug
I'm running a self hosted runner and the workflow job is ran in a container. When a test fails and should upload the screenshots, the following error is displayed. As seen in screenshot below, I have set the if-no-files-found to ignore, but error still displays as if this was configured incorrectly.

Version

  • V1
    V2

Environment

  • self-hosted
    Linux
    Windows
    Mac

Screenshots

The displayed error message:
image

The start of the workflow:
image

If you require more info, let me know.

Activity

aljazkosir

aljazkosir commented on Oct 17, 2021

@aljazkosir

I'm also facing the same issue

vafanasy

vafanasy commented on Nov 1, 2021

@vafanasy

We have similar issue, but as warning and looks like this "if-no-files-found" isn't working.

Warning: Unexpected input(s) 'if-no-files-found', valid inputs are ['name', 'path']
with:
    name: test-results
    path: target/surefire-reports
    if-no-files-found: ignore
Error: Path does not exist /some_path/target/surefire-reports
Error: Exit code 1 returned from process: file name '/home/runner/runners/2.283.3/bin/Runner.PluginHost', arguments 'action "GitHub.Runner.Plugins.Artifact.PublishArtifact, Runner.Plugins"'.
shanepowell-ast

shanepowell-ast commented on Apr 26, 2022

@shanepowell-ast

I just want to add.. I'm experiencing this same issue. Also on a self-hosted linux based runner.
Nothing I do seems to resolve the error. I've tried leaving the if-no-files-found field out, specified an explicit value, with and with out quotes. Even tried a numerical index. Tried @v2, @V3 and @main They all seem to show the same issue.
It does appear to be related to running on a self-hosted runner.
Changing only my "runs-on" from self-hosted to ubuntu-latest fixes the issue.
For added reference, my self-hosted runner is just a set of simple ubuntu-server headless machine.

edit: update.. oddly enough, the upload succeeds! Despite the error.

Edit: Forked the main branch to try a test.
I modified input-helper.ts with the following. And it at least works now on my self-hosted runner.
For some unknown reason, the noFileBehavior value is coming in as a blank, instead of the default 'warn'.

const ifNoFilesFound = core.getInput(Inputs.IfNoFilesFound)
  var noFileBehavior: NoFileOptions = NoFileOptions[ifNoFilesFound]

  if (!noFileBehavior) {
    noFileBehavior = NoFileOptions['warn']
    core.warning(
      `Unrecognized ${
        Inputs.IfNoFilesFound
      } input. Provided: ${ifNoFilesFound}. Available options: ${Object.keys(
        NoFileOptions
      )}. Defaulting to warn.`
    )
  }

umutozd

umutozd commented on Sep 26, 2022

@umutozd

We are also experiencing this issue. Our configuration looks like the following:

- uses: actions/upload-artifact@v3
  with:
    name: <artifact-name>
    path: |
      path/to/file1
      path/to/file2
      path/to/file3

and exactly the below error is printed once this action runs:

Error: Unrecognized if-no-files-found input. Provided: . Available options: warn,error,ignore

I have tried the below configuration too, with the same error message.

- uses: actions/upload-artifact@v3
  with:
    name: <artifact-name>
    path: |
      path/to/file1
      path/to/file2
      path/to/file3
    if-no-files-found: warn

The odd thing is, the upload of files succeed. The problem is that this workflow looks to be failed because of this if-no-files-found issue.

linked a pull request that will close this issue on Sep 26, 2022
ameza

ameza commented on Mar 21, 2023

@ameza

having the same issue, is there a fix ?

raxden

raxden commented on May 15, 2023

@raxden

same here!

wind57

wind57 commented on Sep 14, 2023

@wind57

ain't this a beauty, I am already tired of countless github actions issues we are facing :) I hope it's the last time I ever use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @wind57@aljazkosir@ameza@zivkovic@raxden

      Issue actions

        Error: Unrecognized if-no-files-found input. Provided: . Available options: warn,error,ignore · Issue #255 · actions/upload-artifact