Skip to content

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

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

Open
1 of 2 tasks
Sainan opened this issue May 18, 2025 · 1 comment
Open
1 of 2 tasks

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

Sainan opened this issue May 18, 2025 · 1 comment
Assignees
Labels
awaiting-release Added/Fixed and tested, awaiting release bug Something isn't working

Comments

@Sainan
Copy link

Sainan commented May 18, 2025

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

@Sainan Sainan added the bug Something isn't working label May 18, 2025
@shivammathur
Copy link
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

@shivammathur shivammathur added the awaiting-release Added/Fixed and tested, awaiting release label May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-release Added/Fixed and tested, awaiting release bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants