[GH-ISSUE #330] cannot unmarshal error #233

Closed
opened 2026-03-01 21:41:39 +03:00 by kerem · 14 comments
Owner

Originally created by @shinhyo on GitHub (Aug 4, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/330

Originally assigned to: @catthehacker on GitHub.

https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#fromjson

name: build
on: push
jobs:
  job1:
    runs-on: ubuntu-latest
    outputs:
      matrix: ${{ steps.set-matrix.outputs.matrix }}
    steps:
      - id: set-matrix
        run: echo "::set-output name=matrix::{\"include\":[{\"project\":\"foo\",\"config\":\"Debug\"},{\"project\":\"bar\",\"config\":\"Release\"}]}"
  job2:
    needs: job1
    runs-on: ubuntu-latest
    strategy:
      matrix: ${{fromJson(needs.job1.outputs.matrix)}}
    steps:
      - run: echo ${{ matrix.project }}
Error: yaml: unmarshal errors:
  line 15: cannot unmarshal !!str `${{from...` into map[string][]interface {}

fromjson Not supported?

Originally created by @shinhyo on GitHub (Aug 4, 2020). Original GitHub issue: https://github.com/nektos/act/issues/330 Originally assigned to: @catthehacker on GitHub. https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#fromjson ``` yml name: build on: push jobs: job1: runs-on: ubuntu-latest outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - id: set-matrix run: echo "::set-output name=matrix::{\"include\":[{\"project\":\"foo\",\"config\":\"Debug\"},{\"project\":\"bar\",\"config\":\"Release\"}]}" job2: needs: job1 runs-on: ubuntu-latest strategy: matrix: ${{fromJson(needs.job1.outputs.matrix)}} steps: - run: echo ${{ matrix.project }} ``` ``` Error: yaml: unmarshal errors: line 15: cannot unmarshal !!str `${{from...` into map[string][]interface {} ``` fromjson Not supported?
kerem 2026-03-01 21:41:39 +03:00
Author
Owner

@ElderOrb commented on GitHub (Aug 5, 2020):

I do see similar issue on Windows. Any workarounds?

<!-- gh-comment-id:669334175 --> @ElderOrb commented on GitHub (Aug 5, 2020): I do see similar issue on Windows. Any workarounds?
Author
Owner

@github-actions[bot] commented on GitHub (Oct 5, 2020):

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

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

@niclascarlstedt commented on GitHub (Nov 4, 2020):

👋
Any possibility to re-open this issue?
I see the same problem and it seems that this possibly is patched in the runner.
https://github.com/actions/runner/issues/751

<!-- gh-comment-id:721536859 --> @niclascarlstedt commented on GitHub (Nov 4, 2020): 👋 Any possibility to re-open this issue? I see the same problem and it seems that this possibly is patched in the runner. [https://github.com/actions/runner/issues/751](https://github.com/actions/runner/issues/751)
Author
Owner

@Nuru commented on GitHub (Nov 19, 2020):

Looks to me like this is a duplicate of #284

<!-- gh-comment-id:730132554 --> @Nuru commented on GitHub (Nov 19, 2020): Looks to me like this is a duplicate of #284
Author
Owner

@frezbo commented on GitHub (Jan 12, 2021):

I can confirm the fromJson is not working in version 0.2.18. My example is similar to https://github.com/nektos/act/issues/330#issue-672533677

<!-- gh-comment-id:758723743 --> @frezbo commented on GitHub (Jan 12, 2021): I can confirm the `fromJson` is not working in version `0.2.18`. My example is similar to https://github.com/nektos/act/issues/330#issue-672533677
Author
Owner

@github-actions[bot] commented on GitHub (Feb 12, 2021):

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

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

@Nuru commented on GitHub (Feb 12, 2021):

This was not fixed by #352. Is there something tricky about this?

<!-- gh-comment-id:777888294 --> @Nuru commented on GitHub (Feb 12, 2021): This was not fixed by #352. Is there something tricky about this?
Author
Owner

@github-actions[bot] commented on GitHub (Mar 16, 2021):

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

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

@dprotaso commented on GitHub (Apr 11, 2021):

I'd re-open this - I just encountered this with

github.com/knative-sandbox/knobots@dd204c1b08/.github/workflows/auto-updates.yaml (L126-L127)

  line 126: cannot unmarshal !!str `${{from...` into []interface {}
  line 127: cannot unmarshal !!str `${{from...` into []interface {}
<!-- gh-comment-id:817237274 --> @dprotaso commented on GitHub (Apr 11, 2021): I'd re-open this - I just encountered this with https://github.com/knative-sandbox/knobots/blob/dd204c1b08700da564ffab1808982a618b9b7e18/.github/workflows/auto-updates.yaml#L126-L127 ``` line 126: cannot unmarshal !!str `${{from...` into []interface {} line 127: cannot unmarshal !!str `${{from...` into []interface {} ```
Author
Owner

@tigattack commented on GitHub (Apr 18, 2021):

I'm also seeing this error on a brand new install on macOS.

<!-- gh-comment-id:821978378 --> @tigattack commented on GitHub (Apr 18, 2021): I'm also seeing this error on a brand new install on macOS.
Author
Owner

@evilr00t commented on GitHub (May 1, 2021):

I have similar issue using https://github.com/dflook/terraform-plan in my CI

[PR Plan/Create terraform plan] ⭐  Run Checkout
[PR Plan/Create terraform plan]   ✅  Success - Checkout
[PR Plan/Create terraform plan] ⭐  Run terraform plan
[PR Plan/Create terraform plan]   ☁  git clone 'https://github.com/dflook/terraform-plan' # ref=v1
[PR Plan/Create terraform plan]   ❌  Failure - terraform plan
Error: yaml: unmarshal errors:
  line 49: cannot unmarshal !!str `/entryp...` into []string

Looks like

runs:
  using: docker
  image: docker://danielflook/terraform-github-actions:v1.9.1
  entrypoint: /entrypoints/plan.sh

First slash in entrypoint is causing an issue.

<!-- gh-comment-id:830625229 --> @evilr00t commented on GitHub (May 1, 2021): I have similar issue using https://github.com/dflook/terraform-plan in my CI ``` [PR Plan/Create terraform plan] ⭐ Run Checkout [PR Plan/Create terraform plan] ✅ Success - Checkout [PR Plan/Create terraform plan] ⭐ Run terraform plan [PR Plan/Create terraform plan] ☁ git clone 'https://github.com/dflook/terraform-plan' # ref=v1 [PR Plan/Create terraform plan] ❌ Failure - terraform plan Error: yaml: unmarshal errors: line 49: cannot unmarshal !!str `/entryp...` into []string ``` Looks like ``` runs: using: docker image: docker://danielflook/terraform-github-actions:v1.9.1 entrypoint: /entrypoints/plan.sh ``` First slash in entrypoint is causing an issue.
Author
Owner

@dprotaso commented on GitHub (Jun 11, 2021):

woot thanks @catthehacker for landing the fix 🎉

<!-- gh-comment-id:859799764 --> @dprotaso commented on GitHub (Jun 11, 2021): woot thanks @catthehacker for landing the fix 🎉
Author
Owner

@stevengonsalvez commented on GitHub (Nov 11, 2021):

I have similar issue using https://github.com/dflook/terraform-plan in my CI

[PR Plan/Create terraform plan] ⭐  Run Checkout
[PR Plan/Create terraform plan]   ✅  Success - Checkout
[PR Plan/Create terraform plan] ⭐  Run terraform plan
[PR Plan/Create terraform plan]   ☁  git clone 'https://github.com/dflook/terraform-plan' # ref=v1
[PR Plan/Create terraform plan]   ❌  Failure - terraform plan
Error: yaml: unmarshal errors:
  line 49: cannot unmarshal !!str `/entryp...` into []string

Looks like

runs:
  using: docker
  image: docker://danielflook/terraform-github-actions:v1.9.1
  entrypoint: /entrypoints/plan.sh

First slash in entrypoint is causing an issue.

@evilr00t Is this working for you

with 0.2.24 it is still failing

[Webapp Stack - Plan/Validate terraform configuration]   ❌  Failure - terraform fmt
Error: yaml: unmarshal errors:
  line 14: cannot unmarshal !!str `/entryp...` into []string
<!-- gh-comment-id:966352146 --> @stevengonsalvez commented on GitHub (Nov 11, 2021): > I have similar issue using https://github.com/dflook/terraform-plan in my CI > > ``` > [PR Plan/Create terraform plan] ⭐ Run Checkout > [PR Plan/Create terraform plan] ✅ Success - Checkout > [PR Plan/Create terraform plan] ⭐ Run terraform plan > [PR Plan/Create terraform plan] ☁ git clone 'https://github.com/dflook/terraform-plan' # ref=v1 > [PR Plan/Create terraform plan] ❌ Failure - terraform plan > Error: yaml: unmarshal errors: > line 49: cannot unmarshal !!str `/entryp...` into []string > ``` > > Looks like > > ``` > runs: > using: docker > image: docker://danielflook/terraform-github-actions:v1.9.1 > entrypoint: /entrypoints/plan.sh > ``` > > First slash in entrypoint is causing an issue. @evilr00t Is this working for you with 0.2.24 it is still failing ```INFO[0078] ☁ git clone 'https://github.com/dflook/terraform-fmt-check' # ref=v1.19 [Webapp Stack - Plan/Validate terraform configuration] ❌ Failure - terraform fmt Error: yaml: unmarshal errors: line 14: cannot unmarshal !!str `/entryp...` into []string ```
Author
Owner

@catthehacker commented on GitHub (Nov 13, 2021):

@evilr00t @stevengonsalvez this is different issue

#875

<!-- gh-comment-id:968113143 --> @catthehacker commented on GitHub (Nov 13, 2021): @evilr00t @stevengonsalvez this is different issue #875
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#233
No description provided.