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: Create Artifact Container failed: The artifact name is not valid #214

Open
Revisto opened this issue Jan 31, 2025 · 10 comments
Open

Comments

@Revisto
Copy link

Revisto commented Jan 31, 2025

I am getting this issue with the flatpak/flatpak-github-actions in my CI GitHub Actions workflow. The error occurs during the artifact upload process. This issue started occurring randomly, and even rerunning previously successful CI builds now results in failure.

Link to an example of this issue on my project: https://github.com/Revisto/drum-machine/actions/runs/13075794457

Link to rerun version of successful CI that failed now: https://github.com/Revisto/drum-machine/actions/runs/12893920065

Image

Error Details:

###### End Diagnostic HTTP information ######
##### Begin Diagnostic HTTP information #####
Status Code: 400
Status Message: Bad Request
Header Information: {
  "content-length": "268",
  "content-type": "application/json; charset=utf-8",
  "date": "Fri, 31 Jan 2025 15:34:27 GMT",
  "server": "Kestrel",
  "cache-control": "no-store,no-cache",
  "pragma": "no-cache",
  "strict-transport-security": "max-age=2592000",
  "x-tfs-processid": "ae3442f3-8b6b-4f86-995b-5ac23c250211",
  "activityid": "7149e809-1877-4343-a76c-75de1546581f",
  "x-tfs-session": "7149e809-1877-4343-a76c-75de1546581f",
  "x-vss-e2eid": "7149e809-1877-4343-a76c-75de1546581f",
  "x-vss-senderdeploymentid": "d8e2ca4d-fc49-4fde-de7b-4a7ca9dd6aba",
  "x-frame-options": "SAMEORIGIN"
}
###### End Diagnostic HTTP information ######
Error: Build failed: Error: Create Artifact Container failed: The artifact name drum-machine-devel-x86_64 is not valid. Request URL https://pipelinesghubeus8.actions.githubusercontent.com/PxTyoUFY0CZbRFiHHJkCsv41Me121rzPZC0yZOva6yd4MDfYZ2/_apis/pipelines/workflows/13075794457/artifacts?api-version=6.0-preview```
@jochumdev
Copy link

Until this is fixed use jochumdev/flatpak-github-actions/flatpak-builder@builder-update-deps:

jobs:
  build-linux-flatpak:
    needs: build-linux
    name: "Build Linux flatpak"
    runs-on: ubuntu-latest
    container:
      image: bilelmoussaoui/flatpak-github-actions:freedesktop-22.08
      options: --privileged
    permissions: write-all
    timeout-minutes: 10
    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

    steps:
      - uses: actions/checkout@v4
        with:
          submodules: 'true'

      - name: Download binary from build-linux
        uses: actions/download-artifact@v4
        with:
          name: linux_x86_64_binary

      - name: Extract binary
        run: mkdir -p ./build/linux/x64/release/bundle && cd ./build/linux/x64/release/bundle && tar -x -f ../../../../../letscheck-linux-x86_64-${{ github.event.release.tag_name }}.tar.xz .

      - name: Build flatpak
        uses: jochumdev/flatpak-github-actions/flatpak-builder@builder-update-deps
        with:
          bundle: letscheck.flatpak
          manifest-path: ./flathub/dev.jochum.letscheck.yml
          cache-key: flatpak-builder-${{ github.sha }}
          upload-artifact: "false"

@jochumdev
Copy link

jochumdev commented Jan 31, 2025

Workaround could be

   - name: Build flatpak
     uses: flatpak/flatpak-github-actions/flatpak-builder@v6
     with:
       upload-artifact: "false"

EDIT: Doesn't work.

@vpelss
Copy link

vpelss commented Jan 31, 2025

Same here. In previous runs io.github.vpelss.snis_flatpak-x86_64 was a valid name.


Creating a bundle...
/usr/bin/flatpak build-bundle repo io.github.vpelss.snis_flatpak --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo --arch=x86_64 io.github.vpelss.snis_flatpak master
Uploading artifact...
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!
Create Artifact Container - Error is not retryable

Begin Diagnostic HTTP information

Status Code: 400
Status Message: Bad Request
Header Information: {
"content-length": "268",
"content-type": "application/json; charset=utf-8",
"date": "Fri, 31 Jan 2025 22:21:27 GMT",
"server": "Kestrel",
"cache-control": "no-store,no-cache",
"pragma": "no-cache",
"strict-transport-security": "max-age=2592000",
"x-tfs-processid": "d333d9a9-afb7-48e2-bc59-57c3fc3bb012",
"activityid": "dd3d75d1-98e3-4c24-af5c-c250b90e5492",
"x-tfs-session": "dd3d75d1-98e3-4c24-af5c-c250b90e5492",
"x-vss-e2eid": "dd3d75d1-98e3-4c24-af5c-c250b90e5492",
"x-vss-senderdeploymentid": "744dbee7-4a20-affb-6b9b-ecd612b3b335",
"x-frame-options": "SAMEORIGIN"
}

End Diagnostic HTTP information
Begin Diagnostic HTTP information

Status Code: 400
Status Message: Bad Request
Header Information: {
"content-length": "268",
"content-type": "application/json; charset=utf-8",
"date": "Fri, 31 Jan 2025 22:21:27 GMT",
"server": "Kestrel",
"cache-control": "no-store,no-cache",
"pragma": "no-cache",
"strict-transport-security": "max-age=2592000",
"x-tfs-processid": "d333d9a9-afb7-48e2-bc59-57c3fc3bb012",
"activityid": "dd3d75d1-98e3-4c24-af5c-c250b90e5492",
"x-tfs-session": "dd3d75d1-98e3-4c24-af5c-c250b90e5492",
"x-vss-e2eid": "dd3d75d1-98e3-4c24-af5c-c250b90e5492",
"x-vss-senderdeploymentid": "744dbee7-4a20-affb-6b9b-ecd612b3b335",
"x-frame-options": "SAMEORIGIN"
}

End Diagnostic HTTP information

Error: Build failed: Error: Create Artifact Container failed: The artifact name io.github.vpelss.snis_flatpak-x86_64 is not valid. Request URL https://pipelinesghubeus11.actions.githubusercontent.com/CKXs3k5qqK6YfH3W04iVjN8lwk3VkgkwusFqTkNnHuBkkUptLi/_apis/pipelines/workflows/130[81](https://github.com/vpelss/snis_flatpak/actions/runs/13081700674/job/36506454079#step:4:82)700674/artifacts?api-version=6.0-preview

@sodevel
Copy link

sodevel commented Feb 2, 2025

The error message is quite misleading but the reason is, due to outdated dependencies, this Action uses an upload endpoint which GitHub finally disabled at the end of january, this Action will now always fail until it gets finally updated.

@vpelss
Copy link

vpelss commented Feb 2, 2025

As per above, replacing

  • uses: flatpak/flatpak-github-actions/flatpak-builder@v6
    with
  • uses: jochumdev/flatpak-github-actions/flatpak-builder@builder-update-deps

and then adding
upload-artifact: "false"

is working for me now.

So I believe the fix mentioned above should be:

 - name: Build flatpak
     uses: jochumdev/flatpak-github-actions/flatpak-builder@builder-update-deps
     with:
       upload-artifact: "false"

@sodevel
Copy link

sodevel commented Feb 2, 2025

If you disable uploading of artifacts then of course this Action does not access a disabled upload endpoint anymore...

@Revisto
Copy link
Author

Revisto commented Feb 2, 2025

If you disable uploading of artifacts then of course this Action does not access a disabled upload endpoint anymore...

actually, I did that (only adding the upload-artifact: "false") and I still got the error, here is the link:
https://github.com/Revisto/drum-machine/actions/runs/13082194656/job/36507882587

@sodevel
Copy link

sodevel commented Feb 2, 2025

Well, my bad, i stand corrected then. If you are looking for a variant with a working upload, i suggest the fork flathub-infra/flatpak-github-actions, my build just finished and the artifact got uploaded successfully.

@vpelss
Copy link

vpelss commented Feb 3, 2025

If you disable uploading of artifacts then of course this Action does not access a disabled upload endpoint anymore...

actually, I did that (only adding the upload-artifact: "false") and I still got the error, here is the link: https://github.com/Revisto/drum-machine/actions/runs/13082194656/job/36507882587

For me I needed to change both:

 - name: Build flatpak
     uses: jochumdev/flatpak-github-actions/flatpak-builder@builder-update-deps
     with:
       upload-artifact: "false"

@mijorus
Copy link

mijorus commented Feb 3, 2025

Same issue here

vjousse added a commit to vjousse/pomodorolm that referenced this issue Feb 7, 2025
vjousse added a commit to vjousse/pomodorolm that referenced this issue Feb 7, 2025
* docs: add macOS troubleshooting section

* fix: smaller screenshot image

* fix: uploading the artifact results in a 400 error

* ci: try to fix upload artifact problem

flatpak/flatpak-github-actions#184

* ci: specify latest action version by hand

* fix: flatpak build

See flatpak/flatpak-github-actions#214
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

5 participants