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

502 error on github enterprise #326

Closed
deejonz opened this issue Mar 20, 2024 · 5 comments
Closed

502 error on github enterprise #326

deejonz opened this issue Mar 20, 2024 · 5 comments

Comments

@deejonz
Copy link

deejonz commented Mar 20, 2024

When deploying on github enterprise I get this error. Any idea if this is an issue on GHE or the plugin is not handling this situation? On GHE it seems it's all configured correctly.
Thanks.

Artifact URL: https://github.xxxxx
.com/_services/pipelines/0crWsQT4VCSHQUTIJr3PpF2QokZdbrxXA3BZf6htZBiXh/_apis/pipelines/workflows/98902/artifacts?api-version=6.0-preview
{"count":1,"value":[{"containerId":203127,"size":81920,"signedContent":null,"fileContainerResourceUrl":"https://github.xxxxx
.com/_services/pipelines/0crWsQT4VCSHQUTIJr3PpF2QoTgOhLkZdbrxXA3BZf6htZBiXh/_apis/resources/Containers/2031627","type":"actions_storage","name":"github-pages","url":"https://github.xxxxx
.com/_services/pipelines/0crWsQT4VCSHQUTIJr3PpF2QoTgOhLkZdbrxXA3BZf6htZBiXh/_apis/pipelines/1/runs/874/artifacts?artifactName=github-pages","expiresOn":"2024-03-20T09:20:40.8215809Z","items":null}]}
Creating deployment with payload:
{
	"artifact_url": "https://github.xxxxx
.com/_services/pipelines/0crWsQT4VCSHQUTIJr3PpF2QoTgOhLkZdbrxXA36htZBiXh/_apis/pipelines/1/runs/874/artifacts?artifactName=github-pages&%24expand=SignedContent",
	"pages_build_version": "f39c190dc7a5e0ba95b6c59816e64ccb69b42a8",
	"oidc_token": "***"
}
Error: Request failed with status code 502
    at createError (/opt/SP/apps/actions-runner/_work/_actions/actions/deploy-pages/v1/webpack:/deploy-pages/node_modules/axios/lib/core/createError.js:16:1)
    at settle (/opt/SP/apps/actions-runner/_work/_actions/actions/deploy-pages/v1/webpack:/deploy-pages/node_modules/axios/lib/core/settle.js:17:1)
    at IncomingMessage.handleStreamEnd (/opt/SP/apps/actions-runner/_work/_actions/actions/deploy-pages/v1/webpack:/deploy-pages/node_modules/axios/lib/adapters/http.js:293:1)
    at IncomingMessage.emit (node:events:402:35)
    at endReadableNT (node:internal/streams/readable:1343:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
Error: Failed to create deployment (status: 502) with build version f39c190dc7e04ba95b6c59816e64ccb69b42a8. Server error, is githubstatus.com reporting a Pages outage? Please re-run the deployment at a later time.

if I open any of those urls I get this:

{
$id: "1",
innerException: null,
message: "The user 'System:PublicAccess;aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa' is not authorized to access this resource.",
typeName: "Microsoft.TeamFoundation.Framework.Server.UnauthorizedRequestException, Microsoft.TeamFoundation.Framework.Server",
typeKey: "UnauthorizedRequestException",
errorCode: 0,
eventId: 3000
}
@yoannchaudet
Copy link
Collaborator

👋

Can you share your workflow (or parts of it if it contains sensitive things)?

Also what version of GHES are you running on?

This action is supported on GHES but not all versions of GHES (or of the actions).

@deejonz
Copy link
Author

deejonz commented Mar 22, 2024

Hello @yoannchaudet my workflow is still a hello world workflow:

name: Deploy GitHub Pages

on:
  workflow_dispatch:

permissions:
  contents: read
  pages: write
  id-token: write

concurrency:
  group: "pages"
  cancel-in-progress: true

jobs:
  build:
    runs-on: [ self-hosted ]
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Setup Pages
        uses: actions/configure-pages@v2
      - run: |
          mkdir test
          touch test/test.html
      - name: Build with Jekyll
        uses: actions/jekyll-build-pages@v1
        with:
          source: ./test
          destination: ./_site
      - name: Upload artifact
        uses: actions/upload-pages-artifact@v1

  # Deployment job
  deploy:
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: [ self-hosted ]
    needs: build
    steps:
      - run: "echo ${{ steps.deployment.outputs.page_url }}"
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v1

@yoannchaudet
Copy link
Collaborator

I don't see anything wrong with your workflow, which is promising!

Wondering if you are hitting #185.

Does the branch you run the workflow_dispatch on contains non ascii characters by any chance?

I believe this is something we have just fixed for GitHub.com but that did not reach GHES yet.

@Tarow
Copy link

Tarow commented Oct 7, 2024

Did you ever figure out what caused the issue?
We are running GHES 3.12.8 and i am currently having the same issue using the deploy-pagesaction (tried using v1, v2 and v3).

Also our branch name does not contain any special characters (running on main).

@deejonz
Copy link
Author

deejonz commented Oct 7, 2024

No, I haven't found out yet. If you find a solution please let me know :)

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

3 participants