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

Failing to fetch artifact metadata since 4.0.0 #285

Closed
TheMrMilchmann opened this issue Dec 19, 2023 · 8 comments · Fixed by #288
Closed

Failing to fetch artifact metadata since 4.0.0 #285

TheMrMilchmann opened this issue Dec 19, 2023 · 8 comments · Fixed by #288
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@TheMrMilchmann
Copy link

After updating to deploy-pages@v4 and upload-pages-artifact@v3, I am running into the following error:

Fetching artifact metadata for github-pages in run 7265993097
Error: Fetching artifact metadata failed. Is githubstatus.com reporting issues with API requests, Pages or Actions? Please re-run the deployment at a later time.
Error: HttpError: Resource not accessible by integration
    at /home/runner/work/_actions/actions/deploy-pages/v4/node_modules/@octokit/request/dist-node/index.js:124:1
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at getArtifactMetadata (/home/runner/work/_actions/actions/deploy-pages/v4/src/internal/api-client.js:10:1)
    at Deployment.create (/home/runner/work/_actions/actions/deploy-pages/v4/src/internal/deployment.js:66:1)
    at main (/home/runner/work/_actions/actions/deploy-pages/v4/src/index.js:30:1)
Error: Error: Failed to create deployment (status: 403) with build version 5d6a87698b916de4c981c3373b41af57cfb2983f. Ensure GITHUB_TOKEN has permission "pages: write".

Is githubstatus.com reporting issues with API requests, Pages or Actions?

No.

Please re-run the deployment at a later time.

I've tried running this multiple times throughout the day.

Error: Failed to create deployment (status: 403) with build version 5d6a87698b916de4c981c3373b41af57cfb2983f. Ensure GITHUB_TOKEN has permission "pages: write".

Interestingly, I did not change anything about the token permissions. In fact, the pages: write permission is explicitly granted in the workflow:

name: Deploy
on:
  push:
    branches:
      - "master"


jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: actions/setup-node@v4
        with:
          node-version: "18.x"
          cache: "yarn"

      - run: yarn install

      - run: yarn generate

      - name: Upload artifact
        uses: actions/upload-pages-artifact@v3
        with:
          path: ./dist

  deploy:
    needs: build
    runs-on: ubuntu-latest
    permissions:
      pages: write
      id-token: write
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    steps:
      - name: Deploy
        id: deployment
        uses: actions/deploy-pages@v4

(This might be related to #284.)

@luizrcs
Copy link

luizrcs commented Dec 20, 2023

Same here, and it was driving me crazy until I saw these issues, as I thought I was simply missing something obvious on the setup. I checked the failed job logs and it says explicitly right at the beginning the pages write permission is given.

@JamesMGreene
Copy link
Contributor

This is probably due to your workflows missing the newly required actions: read permission for v4.

https://github.com/actions/deploy-pages/pull/283/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R33

We're going to investigate removing the need for that new permission in an in-flight follow-up PR today, so please bear with us:

But, as a short-term workaround, I believe adding the actions: read permission to your workflow/job will alleviate this blocker.

@luizrcs
Copy link

luizrcs commented Dec 20, 2023

This is probably due to your workflows missing the newly required actions: read permission for v4.

https://github.com/actions/deploy-pages/pull/283/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R33

We're going to investigate removing the need for that new permission in an in-flight follow-up PR today, so please bear with us:

But, as a short-term workaround, I believe adding the actions: read permission to your workflow/job will alleviate this blocker.

That solved the first issue for me, which was the 403 error, but now I'm getting a 400 "No artifact_url provided" like another issue mentioned.

@JamesMGreene
Copy link
Contributor

Yup, we've identified an issue on the API internal side. A fix is in progress and should be rolled out in the next few hours. Thank you all for your reporting and patience, and our apologies for the temporary inconvenience! 🙇

P.S. If anyone needs a short-term workaround, please revert to using the previous major versions of actions/upload-pages-artifact and actions/deploy-pages until we can get the fix shipped.

@JamesMGreene
Copy link
Contributor

We believe this should be resolved as of ~4 hours ago, assuming you also include the actions: read permission (for now). Please give it another try, but do let us know if you still encounter friction. 🙇

TheMrMilchmann added a commit to TheMrMilchmann/committing-crimes.com that referenced this issue Dec 21, 2023
@TheMrMilchmann
Copy link
Author

Thanks for the update! I can confirm that this is working now after adding the actions: read permission. Should this issue be kept open for now because it's technically not resolved yet (but hopefully with #288)?

@JamesMGreene
Copy link
Contributor

@TheMrMilchmann Good question. I was planning on proceeding with #288 in either case, but I've gone ahead and added a more specific bug for tracking that:

Thanks!

@JamesMGreene
Copy link
Contributor

📣 The latest release, v4.0.1, has removed the need for the actions: read permission that v4.0.0 introduced. 🪓

josetorronteras added a commit to josetorronteras/josetorronteras.github.io that referenced this issue Jan 9, 2024
josetorronteras added a commit to josetorronteras/josetorronteras.github.io that referenced this issue Jan 9, 2024
* Fix deployment action

* fix issue actions/deploy-pages#285
josetorronteras added a commit to josetorronteras/josetorronteras.github.io that referenced this issue Jan 9, 2024
* Fix deployment action

* fix issue actions/deploy-pages#285

* Update deploy.yml
kokoichi206 added a commit to kokoichi206/awesome-chat-app that referenced this issue Feb 4, 2024
kokoichi206 added a commit to kokoichi206/awesome-chat-app that referenced this issue Feb 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
3 participants