Skip to content

Bug: Sporadic failure with "undefined" is not valid JSONΒ #952

Closed

Description

@Sainan

Describe the bug

We use this step in GitHub-hosted ARM MacOS runners as they do not have PHP preinstalled, and it seems to be failing every once in a while with this not very helpful error message:

Version

  • v2
  • v1

Runners

GitHub Hosted

Operating systems

MacOS 14

PHP versions

Not specified

To Reproduce

The relevant part of our workflow file:

  macos-arm64:
    runs-on: macos-14
    steps:
      - uses: shivammathur/setup-php@v2

Expected behavior

Workflow doesn't fail.

Screenshots/Logs

No response

Additional context

No response

Are you willing to submit a PR?

No

Activity

  1. shivammathur commented on May 19, 2025

    @shivammathur
    Owner

    The error is because the action might not have been able to fetch the json manifest we have to resolve versions. If no version is specified it installs the latest version and to resolve that, it needs the manifest.

    I have improved this in b595b41

  2. shivammathur commented on Jun 10, 2025

    @shivammathur
    Owner

    Released in 2.34.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions