[GH-ISSUE #1314] Setup-python fails when using cache options #713

Closed
opened 2026-03-01 21:45:44 +03:00 by kerem · 5 comments
Owner

Originally created by @dariocurr on GitHub (Aug 24, 2022).
Original GitHub issue: https://github.com/nektos/act/issues/1314

Bug report info

act version:            0.2.30
GOOS:                   linux
GOARCH:                 amd64
NumCPU:                 8
Docker host:            DOCKER_HOST environment variable is unset/empty.
Sockets found:
        /var/run/docker.sock
Config files:           
        /home/<user>/.actrc:
                -P ubuntu-latest=catthehacker/ubuntu:act-latest
                -P ubuntu-22.04=catthehacker/ubuntu:act-22.04
                -P ubuntu-20.04=catthehacker/ubuntu:act-20.04
                -P ubuntu-18.04=catthehacker/ubuntu:act-18.04
Build info:
        Go version:            go1.18.4
        Module path:           command-line-arguments
        Main version:          
        Main path:             
        Main checksum:         
        Build settings:
                -compiler:            gc
                -ldflags:             -X main.version=0.2.30
                CGO_ENABLED:          1
                CGO_CFLAGS:           
                CGO_CPPFLAGS:         
                CGO_CXXFLAGS:         
                CGO_LDFLAGS:          
                GOARCH:               amd64
                GOOS:                 linux
                GOAMD64:              v1
Docker Engine:
        Engine version:        20.10.17
        Engine runtime:        runc
        Cgroup version:        1
        Cgroup driver:         cgroupfs
        Storage driver:        overlay2
        Registry URI:          https://index.docker.io/v1/
        OS:                    Ubuntu 20.04.4 LTS
        OS type:               linux
        OS version:            20.04
        OS arch:               x86_64
        OS kernel:             5.15.0-41-generic
        OS CPU:                8
        OS memory:             15705 MB
        Security options:
                name=apparmor
                name=seccomp,profile=default

Command used with act

act

Describe issue

When using setup-python cache options, I get:

[Testing/test] ::error::Unexpected end of JSON input
[Testing/test] Failure - Post Set up Python 3

No response

Workflow content

name: Testing

on:
  push:
    branches:
      - main

  pull_request:
    branches:
      - main

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3

      - name: Set up Python 3
        uses: actions/setup-python@v4
        with:
          python-version: "3.10"
          cache: pip
          cache-dependency-path: "**/pyproject.toml"

Relevant log output

...
[Testing/test]   🚧  ::warning::The runner was not able to contact the cache service. Caching will be skipped
[Testing/test]##[add-matcher]/run/act/actions/actions-setup-python@v4/.github/python.json
[Testing/test]   ✅  Success - Main Set up Python 3
[Testing/test] ⭐ Run Post Set up Python 3
[Testing/test]   🐳  docker exec cmd=[node /var/run/act/actions/actions-setup-python@v4/dist/cache-save/index.js] user= workdir=
[Testing/test]   ❗  ::error::Unexpected end of JSON input
[Testing/test]   ❌  Failure - Post Set up Python 3
[Testing/test] 🏁  Job succeeded


### Additional information

_No response_
Originally created by @dariocurr on GitHub (Aug 24, 2022). Original GitHub issue: https://github.com/nektos/act/issues/1314 ### Bug report info ```plain text act version: 0.2.30 GOOS: linux GOARCH: amd64 NumCPU: 8 Docker host: DOCKER_HOST environment variable is unset/empty. Sockets found: /var/run/docker.sock Config files: /home/<user>/.actrc: -P ubuntu-latest=catthehacker/ubuntu:act-latest -P ubuntu-22.04=catthehacker/ubuntu:act-22.04 -P ubuntu-20.04=catthehacker/ubuntu:act-20.04 -P ubuntu-18.04=catthehacker/ubuntu:act-18.04 Build info: Go version: go1.18.4 Module path: command-line-arguments Main version: Main path: Main checksum: Build settings: -compiler: gc -ldflags: -X main.version=0.2.30 CGO_ENABLED: 1 CGO_CFLAGS: CGO_CPPFLAGS: CGO_CXXFLAGS: CGO_LDFLAGS: GOARCH: amd64 GOOS: linux GOAMD64: v1 Docker Engine: Engine version: 20.10.17 Engine runtime: runc Cgroup version: 1 Cgroup driver: cgroupfs Storage driver: overlay2 Registry URI: https://index.docker.io/v1/ OS: Ubuntu 20.04.4 LTS OS type: linux OS version: 20.04 OS arch: x86_64 OS kernel: 5.15.0-41-generic OS CPU: 8 OS memory: 15705 MB Security options: name=apparmor name=seccomp,profile=default ``` ### Command used with act ```sh act ``` ### Describe issue When using `setup-python` cache options, I get: [Testing/test] ❗ ::error::Unexpected end of JSON input [Testing/test] ❌ Failure - Post Set up Python 3 ### Link to GitHub repository _No response_ ### Workflow content ```yml name: Testing on: push: branches: - main pull_request: branches: - main jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Set up Python 3 uses: actions/setup-python@v4 with: python-version: "3.10" cache: pip cache-dependency-path: "**/pyproject.toml" ``` ### Relevant log output ```sh ... [Testing/test] 🚧 ::warning::The runner was not able to contact the cache service. Caching will be skipped [Testing/test] ❓ ##[add-matcher]/run/act/actions/actions-setup-python@v4/.github/python.json [Testing/test] ✅ Success - Main Set up Python 3 [Testing/test] ⭐ Run Post Set up Python 3 [Testing/test] 🐳 docker exec cmd=[node /var/run/act/actions/actions-setup-python@v4/dist/cache-save/index.js] user= workdir= [Testing/test] ❗ ::error::Unexpected end of JSON input [Testing/test] ❌ Failure - Post Set up Python 3 [Testing/test] 🏁 Job succeeded ``` ``` ### Additional information _No response_
kerem 2026-03-01 21:45:44 +03:00
  • closed this issue
  • added the
    kind/bug
    label
Author
Owner

@RafayAK commented on GitHub (Aug 31, 2022):

yep, seeing the same effect

<!-- gh-comment-id:1232756031 --> @RafayAK commented on GitHub (Aug 31, 2022): yep, seeing the same effect
Author
Owner

@github-actions[bot] commented on GitHub (Oct 1, 2022):

Issue is stale and will be closed in 14 days unless there is new activity

<!-- gh-comment-id:1264149783 --> @github-actions[bot] commented on GitHub (Oct 1, 2022): Issue is stale and will be closed in 14 days unless there is new activity
Author
Owner

@dariocurr commented on GitHub (Oct 2, 2022):

Would it be fixed?

<!-- gh-comment-id:1264582956 --> @dariocurr commented on GitHub (Oct 2, 2022): Would it be fixed?
Author
Owner

@KnisterPeter commented on GitHub (Oct 2, 2022):

Please search for other cache issues. There are answers already.

<!-- gh-comment-id:1264591447 --> @KnisterPeter commented on GitHub (Oct 2, 2022): Please search for other cache issues. There are answers already.
Author
Owner

@dariocurr commented on GitHub (Oct 3, 2022):

See #1034

<!-- gh-comment-id:1265057702 --> @dariocurr commented on GitHub (Oct 3, 2022): See #1034
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#713
No description provided.