Artifacts upload results in error 500 #11133

Closed
opened 2025-11-02 09:28:34 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @Fratee on GitHub (Jun 29, 2023).

Description

When running the following pipeline on act_runner, the artifacts are not uploaded due to error 500.

build.yaml
name: Runner
run-name: ${{ gitea.actor }} is building
on: [push]

defaults:
  run:
    shell: powershell

jobs:
  Build:
    runs-on: [windows, gprbuild]
    steps:
      - uses: actions/checkout@v3
        with:
        ref: gitea
      - name: Prepare folders
        run: |
          mkdir bin -ErrorAction ignore
      - name: Build
        run: echo test > file.txt
      - name: 'Upload Artifact'
        uses: actions/upload-artifact@v3
        with:
          path: |
            file.txt
Runner Log
[Runner/Build] [DEBUG] Removing C:\Users\usp00bo\.cache\act/actions-upload-artifact@v3/.gitignore before docker cp
[Runner/Build] [DEBUG] C:\Users\usp00bo\.cache\act\286b80907b4f225f\act/actions/actions-upload-artifact@v3
[Runner/Build] [DEBUG] Stripping prefix:C:\Users\usp00bo\.cache\act\actions-upload-artifact@v3\ src:C:\Users\usp00bo\.cache\act/actions-upload-artifact@v3/
[Runner/Build] [DEBUG] executing remote job container: [node C:\Users\usp00bo\.cache\act\286b80907b4f225f\act/actions/actions-upload-artifact@v3/dist/index.js]
[Runner/Build] [DEBUG] Failed to setup Pty Unsupported
[Runner/Build]   💬  ::debug::followSymbolicLinks 'true'
| ::debug::followSymbolicLinks 'true'
[Runner/Build]   💬  ::debug::implicitDescendants 'true'
| ::debug::implicitDescendants 'true'
[Runner/Build]   💬  ::debug::omitBrokenSymbolicLinks 'true'
| ::debug::omitBrokenSymbolicLinks 'true'
[Runner/Build]   💬  ::debug::followSymbolicLinks 'true'
| ::debug::followSymbolicLinks 'true'
[Runner/Build]   💬  ::debug::implicitDescendants 'true'
| ::debug::implicitDescendants 'true'
[Runner/Build]   💬  ::debug::matchDirectories 'true'
| ::debug::matchDirectories 'true'
[Runner/Build]   💬  ::debug::omitBrokenSymbolicLinks 'true'
| ::debug::omitBrokenSymbolicLinks 'true'
[Runner/Build]   💬  ::debug::Search path 'C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor\file.txt'
| ::debug::Search path 'C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor\file.txt'
[Runner/Build]   💬  ::debug::File:C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor\file.txt was found using the provided searchPath
| ::debug::File:C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor\file.txt was found using the provided searchPath
| With the provided path, there will be 1 file uploaded
[Runner/Build]   💬  ::debug::Root artifact directory is C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor
| ::debug::Root artifact directory is C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor
| Starting artifact upload
| For more detailed logs during the artifact upload process, enable step-debugging: https://docs.github.com/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging#enabling-step-debug-logging
| Artifact name is valid!
[Runner/Build]   💬  ::debug::Artifact Url: http://aeme1025/api/actions_pipeline/_apis/pipelines/workflows/48/artifacts?api-version=6.0-preview
| ::debug::Artifact Url: http://aeme1025/api/actions_pipeline/_apis/pipelines/workflows/48/artifacts?api-version=6.0-preview
[Runner/Build]   💬  ::debug::Upload Resource URL: http://aeme1025/api/actions_pipeline/_apis/pipelines/workflows/48/artifacts/3/upload
| ::debug::Upload Resource URL: http://aeme1025/api/actions_pipeline/_apis/pipelines/workflows/48/artifacts/3/upload
| Container for artifact "artifact" successfully created. Starting upload of file(s)
[Runner/Build]   💬  ::debug::File Concurrency: 2, and Chunk Size: 8388608
| ::debug::File Concurrency: 2, and Chunk Size: 8388608
[Runner/Build]   💬  ::debug::C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor\file.txt is less than 64k in size. Creating a gzip file in-memory to potentially reduce the upload size
| ::debug::C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor\file.txt is less than 64k in size. Creating a gzip file in-memory to potentially reduce the upload size
[Runner/Build]   💬  ::debug::The gzip file created for C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor\file.txt did not help with reducing the size of the file. The original file will be uploaded as-is
| ::debug::The gzip file created for C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor\file.txt did not help with reducing the size of the file. The original file will be uploaded as-is
| A 500 status code has been received, will attempt to retry the upload
| Exponential backoff for retry #1. Waiting for 4594 milliseconds before continuing the upload at offset 0
| Finished backoff for retry #1, continuing with upload
| A 500 status code has been received, will attempt to retry the upload
| Exponential backoff for retry #2. Waiting for 9357 milliseconds before continuing the upload at offset 0
| Total file count: 1 ---- Processed file #0 (0.0%)
| Finished backoff for retry #2, continuing with upload
| A 500 status code has been received, will attempt to retry the upload
| Exponential backoff for retry #3. Waiting for 18916 milliseconds before continuing the upload at offset 0
| Total file count: 1 ---- Processed file #0 (0.0%)
| Total file count: 1 ---- Processed file #0 (0.0%)
| Finished backoff for retry #3, continuing with upload
| A 500 status code has been received, will attempt to retry the upload
| Exponential backoff for retry #4. Waiting for 25252 milliseconds before continuing the upload at offset 0
| Total file count: 1 ---- Processed file #0 (0.0%)
| Total file count: 1 ---- Processed file #0 (0.0%)
| Finished backoff for retry #4, continuing with upload
| A 500 status code has been received, will attempt to retry the upload
| Exponential backoff for retry #5. Waiting for 33373 milliseconds before continuing the upload at offset 0
| Total file count: 1 ---- Processed file #0 (0.0%)
| Total file count: 1 ---- Processed file #0 (0.0%)
| Total file count: 1 ---- Processed file #0 (0.0%)
| Total file count: 1 ---- Processed file #0 (0.0%)
| Finished backoff for retry #5, continuing with upload
| A 500 status code has been received, will attempt to retry the upload
| ##### Begin Diagnostic HTTP information #####
| Status Code: 500
| Status Message: Internal Server Error
| Header Information: {
|   "cache-control": "max-age=0, private, must-revalidate, no-transform",
|   "content-type": "text/html; charset=utf-8",
|   "x-frame-options": "SAMEORIGIN",
|   "date": "Thu, 29 Jun 2023 11:23:53 GMT",
|   "transfer-encoding": "chunked"
| }
| ###### End Diagnostic HTTP information ######
| Retry limit has been reached for chunk at offset 0 to http://aeme1025/api/actions_pipeline/_apis/pipelines/workflows/48/artifacts/3/upload?itemPath=artifact%5Cfile.txt
[Runner/Build]   🚧  ::warning::Aborting upload for C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor\file.txt due to failure
| ::warning::Aborting upload for C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor\file.txt due to failure
[Runner/Build]   ❗  ::error::aborting artifact upload
| ::error::aborting artifact upload
| Total size of all the files uploaded is 0 bytes
| File upload process has finished. Finalizing the artifact upload
[Runner/Build]   💬  ::debug::Artifact Url: http://aeme1025/api/actions_pipeline/_apis/pipelines/workflows/48/artifacts?api-version=6.0-preview
| ::debug::Artifact Url: http://aeme1025/api/actions_pipeline/_apis/pipelines/workflows/48/artifacts?api-version=6.0-preview
[Runner/Build]   💬  ::debug::URL is http://aeme1025/api/actions_pipeline/_apis/pipelines/workflows/48/artifacts?api-version=6.0-preview&artifactName=artifact
| ::debug::URL is http://aeme1025/api/actions_pipeline/_apis/pipelines/workflows/48/artifacts?api-version=6.0-preview&artifactName=artifact
| Finalize artifact upload - Attempt 1 of 5 failed with error: Artifact service responded with 500
| Finalize artifact upload - Attempt 2 of 5 failed with error: Artifact service responded with 500
| Finalize artifact upload - Attempt 3 of 5 failed with error: Artifact service responded with 500
| Finalize artifact upload - Attempt 4 of 5 failed with error: Artifact service responded with 500
| Finalize artifact upload - Attempt 5 of 5 failed with error: Artifact service responded with 500

Gitea log

Gitea Version

1.20.0-rc0

Can you reproduce the bug on the Gitea demo site?

No (actions are unavailable)

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Windows 10

How are you running Gitea?

Self hosted on windows 10

Database

SQLite

Originally created by @Fratee on GitHub (Jun 29, 2023). ### Description When running the following pipeline on act_runner, the artifacts are not uploaded due to error 500. <details> <summary>build.yaml</summary> ```yaml name: Runner run-name: ${{ gitea.actor }} is building on: [push] defaults: run: shell: powershell jobs: Build: runs-on: [windows, gprbuild] steps: - uses: actions/checkout@v3 with: ref: gitea - name: Prepare folders run: | mkdir bin -ErrorAction ignore - name: Build run: echo test > file.txt - name: 'Upload Artifact' uses: actions/upload-artifact@v3 with: path: | file.txt ``` </details> <details> <summary>Runner Log</summary> ``` [Runner/Build] [DEBUG] Removing C:\Users\usp00bo\.cache\act/actions-upload-artifact@v3/.gitignore before docker cp [Runner/Build] [DEBUG] C:\Users\usp00bo\.cache\act\286b80907b4f225f\act/actions/actions-upload-artifact@v3 [Runner/Build] [DEBUG] Stripping prefix:C:\Users\usp00bo\.cache\act\actions-upload-artifact@v3\ src:C:\Users\usp00bo\.cache\act/actions-upload-artifact@v3/ [Runner/Build] [DEBUG] executing remote job container: [node C:\Users\usp00bo\.cache\act\286b80907b4f225f\act/actions/actions-upload-artifact@v3/dist/index.js] [Runner/Build] [DEBUG] Failed to setup Pty Unsupported [Runner/Build] 💬 ::debug::followSymbolicLinks 'true' | ::debug::followSymbolicLinks 'true' [Runner/Build] 💬 ::debug::implicitDescendants 'true' | ::debug::implicitDescendants 'true' [Runner/Build] 💬 ::debug::omitBrokenSymbolicLinks 'true' | ::debug::omitBrokenSymbolicLinks 'true' [Runner/Build] 💬 ::debug::followSymbolicLinks 'true' | ::debug::followSymbolicLinks 'true' [Runner/Build] 💬 ::debug::implicitDescendants 'true' | ::debug::implicitDescendants 'true' [Runner/Build] 💬 ::debug::matchDirectories 'true' | ::debug::matchDirectories 'true' [Runner/Build] 💬 ::debug::omitBrokenSymbolicLinks 'true' | ::debug::omitBrokenSymbolicLinks 'true' [Runner/Build] 💬 ::debug::Search path 'C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor\file.txt' | ::debug::Search path 'C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor\file.txt' [Runner/Build] 💬 ::debug::File:C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor\file.txt was found using the provided searchPath | ::debug::File:C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor\file.txt was found using the provided searchPath | With the provided path, there will be 1 file uploaded [Runner/Build] 💬 ::debug::Root artifact directory is C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor | ::debug::Root artifact directory is C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor | Starting artifact upload | For more detailed logs during the artifact upload process, enable step-debugging: https://docs.github.com/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging#enabling-step-debug-logging | Artifact name is valid! [Runner/Build] 💬 ::debug::Artifact Url: http://aeme1025/api/actions_pipeline/_apis/pipelines/workflows/48/artifacts?api-version=6.0-preview | ::debug::Artifact Url: http://aeme1025/api/actions_pipeline/_apis/pipelines/workflows/48/artifacts?api-version=6.0-preview [Runner/Build] 💬 ::debug::Upload Resource URL: http://aeme1025/api/actions_pipeline/_apis/pipelines/workflows/48/artifacts/3/upload | ::debug::Upload Resource URL: http://aeme1025/api/actions_pipeline/_apis/pipelines/workflows/48/artifacts/3/upload | Container for artifact "artifact" successfully created. Starting upload of file(s) [Runner/Build] 💬 ::debug::File Concurrency: 2, and Chunk Size: 8388608 | ::debug::File Concurrency: 2, and Chunk Size: 8388608 [Runner/Build] 💬 ::debug::C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor\file.txt is less than 64k in size. Creating a gzip file in-memory to potentially reduce the upload size | ::debug::C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor\file.txt is less than 64k in size. Creating a gzip file in-memory to potentially reduce the upload size [Runner/Build] 💬 ::debug::The gzip file created for C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor\file.txt did not help with reducing the size of the file. The original file will be uploaded as-is | ::debug::The gzip file created for C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor\file.txt did not help with reducing the size of the file. The original file will be uploaded as-is | A 500 status code has been received, will attempt to retry the upload | Exponential backoff for retry #1. Waiting for 4594 milliseconds before continuing the upload at offset 0 | Finished backoff for retry #1, continuing with upload | A 500 status code has been received, will attempt to retry the upload | Exponential backoff for retry #2. Waiting for 9357 milliseconds before continuing the upload at offset 0 | Total file count: 1 ---- Processed file #0 (0.0%) | Finished backoff for retry #2, continuing with upload | A 500 status code has been received, will attempt to retry the upload | Exponential backoff for retry #3. Waiting for 18916 milliseconds before continuing the upload at offset 0 | Total file count: 1 ---- Processed file #0 (0.0%) | Total file count: 1 ---- Processed file #0 (0.0%) | Finished backoff for retry #3, continuing with upload | A 500 status code has been received, will attempt to retry the upload | Exponential backoff for retry #4. Waiting for 25252 milliseconds before continuing the upload at offset 0 | Total file count: 1 ---- Processed file #0 (0.0%) | Total file count: 1 ---- Processed file #0 (0.0%) | Finished backoff for retry #4, continuing with upload | A 500 status code has been received, will attempt to retry the upload | Exponential backoff for retry #5. Waiting for 33373 milliseconds before continuing the upload at offset 0 | Total file count: 1 ---- Processed file #0 (0.0%) | Total file count: 1 ---- Processed file #0 (0.0%) | Total file count: 1 ---- Processed file #0 (0.0%) | Total file count: 1 ---- Processed file #0 (0.0%) | Finished backoff for retry #5, continuing with upload | A 500 status code has been received, will attempt to retry the upload | ##### Begin Diagnostic HTTP information ##### | Status Code: 500 | Status Message: Internal Server Error | Header Information: { | "cache-control": "max-age=0, private, must-revalidate, no-transform", | "content-type": "text/html; charset=utf-8", | "x-frame-options": "SAMEORIGIN", | "date": "Thu, 29 Jun 2023 11:23:53 GMT", | "transfer-encoding": "chunked" | } | ###### End Diagnostic HTTP information ###### | Retry limit has been reached for chunk at offset 0 to http://aeme1025/api/actions_pipeline/_apis/pipelines/workflows/48/artifacts/3/upload?itemPath=artifact%5Cfile.txt [Runner/Build] 🚧 ::warning::Aborting upload for C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor\file.txt due to failure | ::warning::Aborting upload for C:\Users\usp00bo\.cache\act\286b80907b4f225f\hostexecutor\file.txt due to failure [Runner/Build] ❗ ::error::aborting artifact upload | ::error::aborting artifact upload | Total size of all the files uploaded is 0 bytes | File upload process has finished. Finalizing the artifact upload [Runner/Build] 💬 ::debug::Artifact Url: http://aeme1025/api/actions_pipeline/_apis/pipelines/workflows/48/artifacts?api-version=6.0-preview | ::debug::Artifact Url: http://aeme1025/api/actions_pipeline/_apis/pipelines/workflows/48/artifacts?api-version=6.0-preview [Runner/Build] 💬 ::debug::URL is http://aeme1025/api/actions_pipeline/_apis/pipelines/workflows/48/artifacts?api-version=6.0-preview&artifactName=artifact | ::debug::URL is http://aeme1025/api/actions_pipeline/_apis/pipelines/workflows/48/artifacts?api-version=6.0-preview&artifactName=artifact | Finalize artifact upload - Attempt 1 of 5 failed with error: Artifact service responded with 500 | Finalize artifact upload - Attempt 2 of 5 failed with error: Artifact service responded with 500 | Finalize artifact upload - Attempt 3 of 5 failed with error: Artifact service responded with 500 | Finalize artifact upload - Attempt 4 of 5 failed with error: Artifact service responded with 500 | Finalize artifact upload - Attempt 5 of 5 failed with error: Artifact service responded with 500 ``` </details> [Gitea log](https://github.com/go-gitea/gitea/files/11905276/gitea.txt) ### Gitea Version 1.20.0-rc0 ### Can you reproduce the bug on the Gitea demo site? No (actions are unavailable) ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System Windows 10 ### How are you running Gitea? Self hosted on windows 10 ### Database SQLite
GiteaMirror added the type/bug label 2025-11-02 09:28:35 -06:00
Author
Owner

@lunny commented on GitHub (Jun 29, 2023):

I think this should be fixed by #24874

@lunny commented on GitHub (Jun 29, 2023): I think this should be fixed by #24874
Author
Owner

@myrqs commented on GitHub (Jul 17, 2023):

I have a similar problem and if it's the same it's related to a wrong path separator in the artifact URL when running on windows host runner instead of https://github.com/go-gitea/gitea/pull/24874 i think.

from my gitea logs i get:
...actions/artifacts.go:310:uploadArtifact() [E] Error checking artifact name contains invalid character
routing/logger.go:78:func1() [W] router: failed PUT /api/actions_pipeline/_apis/pipelines/workflows/185/artifacts/12/upload?itemPath=test-artifact-windows%5Ctest-artifact

i guess that %5c or '\' in the url is wrong and will be filtered by uploadArtifact. instead it should be changed to '/' probably before uploading in the upload-artifact action.

@myrqs commented on GitHub (Jul 17, 2023): I have a similar problem and if it's the same it's related to a wrong path separator in the artifact URL when running on windows host runner instead of https://github.com/go-gitea/gitea/pull/24874 i think. from my gitea logs i get: `...actions/artifacts.go:310:uploadArtifact() [E] Error checking artifact name contains invalid character` `routing/logger.go:78:func1() [W] router: failed PUT /api/actions_pipeline/_apis/pipelines/workflows/185/artifacts/12/upload?itemPath=test-artifact-windows%5Ctest-artifact` i guess that **%5c** or '\\' in the url is wrong and will be filtered by uploadArtifact. instead it should be changed to '/' probably before uploading in the upload-artifact action.
Author
Owner

@lunny commented on GitHub (Jul 26, 2023):

I think this has been resolved by #24874. And if @myrqs 's problem is not the same, a new issue could be created since it's not the same as this one I think.

@lunny commented on GitHub (Jul 26, 2023): I think this has been resolved by #24874. And if @myrqs 's problem is not the same, a new issue could be created since it's not the same as this one I think.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11133