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

[BUG] Error on first run: "Error: Could not retrieve repository contents. Status: 404" #155

Open
liffiton opened this issue Jun 17, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@liffiton
Copy link

Describe the bug
The first time a contributor triggered the workflow (v2.4.0) on a repository, the action failed before doing much of anything. The error message is "Error: Could not retrieve repository contents. Status: 404".

Here's an example in a clean repository with the Action installed simply by copy/pasting YAML from the action's Marketplace page: https://github.com/liffiton/testrepotest/actions/runs/9551059846

The error appears to come from SetupClaCheck.ts. However, I can't tell how the error is being thrown, because if error.status is 404, which the error message says it is, then the conditional should trigger the createClaFileAndPRComment() call instead. Maybe a type issue where error.status is a string for some reason?

To Reproduce
Steps to reproduce the behavior:

  1. Create a new repository.
  2. Set up the workflow on that repository by copying the .yml file from contributor-assistant/github-action's README.
  3. Trigger the action with a new pull request on the repository.
@liffiton liffiton added the bug Something isn't working label Jun 17, 2024
@nvzkupu
Copy link

nvzkupu commented Jun 18, 2024

I'm encountering this same problem in my test repo as well:

https://github.com/nvzkupu/cla-test/actions/runs/9572474510/job/26391861486?pr=1

@tilorspace
Copy link

tilorspace commented Jun 24, 2024

same here, thanks for looking into it;
I also noticed that when I close/reopen the pull request:

  • the workflow succeeds without any messages or apparent checking for signatures, unless I also add [reopened] to the types in the cla.yml
  • when I have added [reopened], the flow manages to lock the PR, but without any messages or apparent checking for signatures

@ronald-jaepel
Copy link

Same here. It works on existing repositories and fails on new repositories.

@piyo7
Copy link

piyo7 commented Jun 26, 2024

I manually created a file for storing CLA Signatures as a workaround.
arktwin/arktwin@2d19501

@cicdguy
Copy link

cicdguy commented Jul 11, 2024

Also encountered with with v2.3.1 of the action.

michaelbromley added a commit to vendure-ecommerce/vendure that referenced this issue Jul 17, 2024
embeddedt added a commit to Nolij/Nolijium that referenced this issue Aug 3, 2024
@bosconi
Copy link

bosconi commented Aug 6, 2024

As @piyo7 mentioned, manually creating the signatures file solves the problem. The instructions specifically say not to create the file, so one possible fix would be to change the instructions.

damianlegawiec added a commit to spree/spree that referenced this issue Sep 5, 2024
fedgiac added a commit to cowprotocol/flash-loan-router that referenced this issue Jan 31, 2025
This is a workaround to make the CI action work as expected.
The CLA action failed in this PR:
#1

The error in the action log is:

```
Run contributor-assistant/[email protected]
CLA Assistant GitHub Action bot has started the process
Error: Could not retrieve repository contents: Not Found. Status: 404
Error: Cannot read properties of undefined (reading 'data')
```

See for example:
https://github.com/cowprotocol/flash-loan-wrapper-solver/actions/runs/13071434597/job/36473778174

This workaround was suggested in:
contributor-assistant/github-action#155 (comment)
fedgiac added a commit to cowprotocol/cla that referenced this issue Jan 31, 2025
I've had an issue with this action
[failing](https://github.com/cowprotocol/flash-loan-wrapper-solver/actions/runs/13071434597/job/36473778174)
with the following error:

```
Run contributor-assistant/[email protected]
CLA Assistant GitHub Action bot has started the process
Error: Could not retrieve repository contents: Not Found. Status: 404
Error: Cannot read properties of undefined (reading 'data')
```

This is a workaround to make the CI action work as expected.
The CLA action failed in [this
PR](cowprotocol/flash-loan-router#1).

This helpful workaround was suggested in
contributor-assistant/github-action#155 (comment).

I didn't add it to the standard instructions because I'm not sure it's
always necessary. I suspect the issue might be caused because the PR was
created when the repo was private and making it public still left it in
a stuck state.
fleupold pushed a commit to cowprotocol/dappnodepackage-cow-watch-tower that referenced this issue Feb 25, 2025
# Description
<!--- Describe your changes to provide context for reviewers, including
why it is needed -->
reviving watch tower dappnode package?

cla workflow is bugged, see my comment below for workaround instructions

# Changes
<!-- List of detailed changes (how the change is accomplished) -->

- [x] bumped upstream version of `watch-tower` to latest
- [x] some default linting
- [x] bump cla workflow version, although bug that we are currently
seeing in this pr might not be fixed. ref:
contributor-assistant/github-action#155

## How to test
i was able to successfully run a `dappnodesdk build`, but `dappnodesdk
publish` needs to happen from this repo's ci iiuc

## Related Issues

fixes #1; however instead of bumping automatically it pins to latest
version (for now)
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

7 participants