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

[error]HttpError: Not Found #16

Closed
swuecho opened this issue Aug 30, 2019 · 27 comments
Closed

[error]HttpError: Not Found #16

swuecho opened this issue Aug 30, 2019 · 27 comments
Assignees
Labels
bug Something isn't working

Comments

@swuecho
Copy link

swuecho commented Aug 30, 2019

2019-08-30T04:47:25.3784277Z Current runner version: '2.157.2'
2019-08-30T04:47:25.3803572Z Prepare workflow directory
2019-08-30T04:47:25.4369293Z Prepare all required actions
2019-08-30T04:47:25.4675219Z Download action repository 'actions/labeler@v2'
2019-08-30T04:47:27.8427078Z ##[group]Run actions/labeler@v2
2019-08-30T04:47:27.8498581Z with:
2019-08-30T04:47:27.8498775Z repo-token: ***
2019-08-30T04:47:27.8498811Z configuration-path: .github/labeler.yml
2019-08-30T04:47:27.8498846Z ##[endgroup]
2019-08-30T04:47:28.4480335Z ##[error]HttpError: Not Found
2019-08-30T04:47:28.4807300Z ##[error]Not Found
2019-08-30T04:47:28.4832078Z ##[error]Node run failed with exit code 1
2019-08-30T04:47:28.5015714Z Cleaning up orphan processes

@swuecho
Copy link
Author

swuecho commented Aug 30, 2019

totally lost. Could anyone give me a hint? thanks

@mansona
Copy link

mansona commented Aug 30, 2019

I have hit this same issue when testing out the workflow 🤔 I don't know how public this is but here is the PR that is failing: mansona/actions-intro#1

it is an empty repo that is just set up to test the action

@nfadili
Copy link

nfadili commented Sep 3, 2019

Running into this as well. I've tried every combination of refs I can think of:

  • uses: actions/labeler@v2 - 404
  • uses: actions/labeler@releases/v2 - 404
  • uses: actions/labeler@master - Doesn't have a lib folder

@gobadiah
Copy link

any news on this issue ?

@rohan-buechner
Copy link

@gobadiah I just bumped my head on this... ensure you have both the following files

.github/workflows/labeler.yml   // with the action
.github/labeler.yml        //with your labels

@gobadiah
Copy link

gobadiah commented Oct 1, 2019

Thanks @rohan-buchner I already have the two files (I renamed the workflow from label.yaml to labeler.yaml just in case). The content of the workflow is copied from the README.md, the content of the other file is just :

api: api/*

It was on a private repo, so I also tried doing this on a public repo, I get the same error.

@frextrite
Copy link

I am facing the same issue

##[error]HttpError: Resource not accessible by integration
##[error]Resource not accessible by integration
##[error]Node run failed with exit code 1

@NobbZ
Copy link

NobbZ commented Oct 3, 2019

##[error]HttpError: Resource not accessible by integration

Thats actually #12.

@gilbertsoft
Copy link

Same issue here, but I'm facing some diffs of PR's from local repo or fork repos:

  • fork repo: label gets NOT added and error is thrown
  • local repo: there are two label actions executed, on the first run the error is thrown, second run is green and the label is added

grafik

grafik

@GMNGeoffrey
Copy link

I'm experiencing the same issue: https://github.com/GMNGeoffrey/iree/pull/10/checks?check_run_id=381938064

Could someone from the team please respond??

2020-01-09T18:07:48.5514225Z ##[section]Starting: Request a runner to run this job
2020-01-09T18:07:48.7204774Z Requesting a hosted runner in current repository's account/organization with labels: 'ubuntu-18.04', require runner match: True
2020-01-09T18:07:48.7854193Z Labels matched hosted runners has been found, waiting for one of them get assigned for this job.
2020-01-09T18:07:48.8029606Z ##[section]Finishing: Request a runner to run this job
2020-01-09T18:07:55.4244546Z Current runner version: '2.163.1'
2020-01-09T18:07:55.4245499Z Prepare workflow directory
2020-01-09T18:07:55.4488152Z Prepare all required actions
2020-01-09T18:07:55.4510698Z Download action repository 'actions/labeler@v2'
2020-01-09T18:07:57.9922248Z ##[group]Run echo "$AUTHOR"
2020-01-09T18:07:57.9922628Z �[36;1mecho "$AUTHOR"�[0m
2020-01-09T18:07:57.9964363Z shell: /bin/bash -e {0}
2020-01-09T18:07:57.9964628Z env:
2020-01-09T18:07:57.9964746Z   AUTHOR: GMNGeoffrey
2020-01-09T18:07:57.9964844Z ##[endgroup]
2020-01-09T18:07:58.0075385Z GMNGeoffrey
2020-01-09T18:07:58.0205498Z ##[group]Run actions/labeler@v2
2020-01-09T18:07:58.0205648Z with:
2020-01-09T18:07:58.0205823Z   repo-token: ***
2020-01-09T18:07:58.0205927Z   configuration-path: .github/labeler.yml
2020-01-09T18:07:58.0206032Z env:
2020-01-09T18:07:58.0206138Z   AUTHOR: GMNGeoffrey
2020-01-09T18:07:58.0206241Z ##[endgroup]
2020-01-09T18:07:58.8602042Z ##[error]HttpError: Not Found
2020-01-09T18:07:58.8604796Z ##[error]Not Found
2020-01-09T18:07:58.8610911Z ##[error]Node run failed with exit code 1
2020-01-09T18:07:58.8616908Z Cleaning up orphan processes

@GMNGeoffrey
Copy link

Well I'm an idiot. I forgot to git add the untracked .github/labeler.yml file before committing 🤦. I do think a more helpful error message here would be great

@dericlima
Copy link

The issue here is that the error message is not clear enough. The problem is the .github/labeler.yml is missing, so just add it inside the .github directory and you will be fine.

@rr-paras-patel
Copy link

rr-paras-patel commented Apr 21, 2021

Posting for awareness : This error message can also be seen if you have labeler.yaml instead of labeler.yml.

@smolanoteam
Copy link

does someone has a fix. Also, not working for me. Same error

@oadam
Copy link

oadam commented Oct 14, 2021

This issue should be renamed to :

more explicit error when `labeler.yml` is not found.

@kingb
Copy link

kingb commented Jan 22, 2022

Doh. I had created .github/labeler.yaml [WRONG] instead of .github/labeler.yml [Correct].

Suggestion:

  1. Support .yaml as a valid extension
  2. and/or make it explicit that no file was found at .github/labeler.yml

@Gornoka
Copy link
Contributor

Gornoka commented Jun 20, 2022

I have run into this error when copying workflows from one repo to another ( and forgetting the labeler.yml in the process).

It would be great if the error message for a the missing config file was a little more explicit.

@sasankaweera123
Copy link

When I add the Create CODE_OF_CONDUCT.md then merge it. I'm getting this error also. Can anyone help

Error: HttpError: Not Found
Error: Not Found

@Gornoka
Copy link
Contributor

Gornoka commented Sep 15, 2022

When I add the Create CODE_OF_CONDUCT.md then merge it. I'm getting this error also. Can anyone help

Error: HttpError: Not Found Error: Not Found

I have seen this error when this action fails to find a file it requires, for me it was the config file (labeler.yaml) at the wrong location. I would make sure that you did not accidentaly moved / deleted / renamed that or any other file this action relies on.

@Shankar-CodeJunkie
Copy link

I too experience the same error, and I have created this preconfigured github action from the Github UI .

Run actions/labeler@v4
  with:
    repo-token: ***
    configuration-path: .github/labeler.yml
    sync-labels: false
##[debug]fetching changed files for pr #2
##[debug]found changed files:
##[debug]  README.md
Error: HttpError: Not Found
Error: Not Found

@Gornoka
Copy link
Contributor

Gornoka commented Sep 27, 2022

I too experience the same error, and I have created this preconfigured github action from the Github UI .

Run actions/labeler@v4
  with:
    repo-token: ***
    configuration-path: .github/labeler.yml
    sync-labels: false
##[debug]fetching changed files for pr #2
##[debug]found changed files:
##[debug]  README.md
Error: HttpError: Not Found
Error: Not Found

please make sure that the file .github/labeler.yml exists

@thiago-scherrer
Copy link

thiago-scherrer commented Dec 30, 2022

Below, I'm running a cat using the workspace environment variable. And the file exits:

Sem título

@Gornoka
Copy link
Contributor

Gornoka commented Dec 30, 2022

Below, I'm running a cat using the workspace environment variable. And the file exits:

Sem título

As far as I see it the action fetches the config directly from the github API through the client.rest.repos.getContent(...) function, I think the location should not use the '${GITHUB_WORKSPACE}'.
to validate that the not found error is related to the config file you could try to use my fork branch, which returns another error message in case that this specific file is not found.

@mac2000
Copy link

mac2000 commented Mar 12, 2023

The last few messages and examples are indeed correct

Here is an short reproduction:

- run: printf 'bug:\n- *\n' > /tmp/labeler.yml
- uses: actions/labeler@v4
  with:
    configuration-path: /tmp/labeler.yml

And because in code we have this it indeed will never ever work because even so it accepts the file path, it expects it to be committed

async function fetchContent(
  client: ClientType,
  repoPath: string
): Promise<string> {

  // add me to fix an issue
  if (fs.existsSync(repoPath)) {
    return Promise.resolve(fs.readFileSync(repoPath, 'utf8'));
  }

  const response: any = await client.rest.repos.getContent({
    owner: github.context.repo.owner,
    repo: github.context.repo.repo,
    path: repoPath,
    ref: github.context.sha
  });

  return Buffer.from(response.data.content, response.data.encoding).toString();
}

And it seems that there is already an pull request with similar fix - #394 so hopefully it will be merged somewhere in the future but for now it seems that there is no workarounds except of running some github script action and doing things by hands

@ret708
Copy link

ret708 commented Apr 7, 2023

Running into this as well. I've tried every combination of refs I can think of:

  • uses: actions/labeler@v2 - 404
  • uses: actions/labeler@releases/v2 - 404
  • uses: actions/labeler@master - Doesn't have a lib folder

@ret708
Copy link

ret708 commented Apr 7, 2023

The last few messages and examples are indeed correct

Here is an short reproduction:

- run: printf 'bug:\n- *\n' > /tmp/labeler.yml
- uses: actions/labeler@v4
  with:
    configuration-path: /tmp/labeler.yml

And because in code we have this it indeed will never ever work because even so it accepts the file path, it expects it to be committed

async function fetchContent(
  client: ClientType,
  repoPath: string
): Promise<string> {

  // add me to fix an issue
  if (fs.existsSync(repoPath)) {
    return Promise.resolve(fs.readFileSync(repoPath, 'utf8'));
  }

  const response: any = await client.rest.repos.getContent({
    owner: github.context.repo.owner,
    repo: github.context.repo.repo,
    path: repoPath,
    ref: github.context.sha
  });

  return Buffer.from(response.data.content, response.data.encoding).toString();
}

And it seems that there is already an pull request with similar fix - #394 so hopefully it will be merged somewhere in the future but for now it seems that there is no workarounds except of running some github script action and doing things by hands

@MaksimZhukov
Copy link
Contributor

Hello everyone!
We improved error handling and released a new action version (v4.3.0).
I am closing the issue. Please let us know if you have any questions.
Thank you for your patience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests