mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #2313] ERRO[0001] Error while evaluating matrix: Invalid JSON: invalid character '\'' looking for beginning of value #1074
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#1074
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @text-adi on GitHub (May 2, 2024).
Original GitHub issue: https://github.com/nektos/act/issues/2313
Bug report info
Command used with act
Describe issue
The following error occurs when running a github workflow locally:
Similarly, when running a workflow on github, there are no errors with such a workflow. Github Action dynamically converts an array represented as a string to an array for matrix using the
fromJsonfunction.I expect the following value:
will be successfully converted by the
fromJsonfunction and used as a dynamic list for matrix.Link to GitHub repository
https://github.com/text-adi/ansible-playbook/tree/add_test_playbook
Workflow content
Relevant log output
Additional information
You can make sure that such a workflow really works correctly at link.
The workflow itself, which was launched.
@EricBishton commented on GitHub (Jun 23, 2024):
Technically, this is not a bug: Single-quote strings are not valid JSON.
That said, if GitHub allows it, perhaps act should allow it, too.
@skeet70 commented on GitHub (Aug 2, 2024):
I think I'm running into a similar issue, but I'm using double quoted strings. This is in a reusable workflow that needs to be passed array parameters (which are only supported via string in GH actions right now):
The error I get is this (where 103-108 are the matrix lines above).
Not the same exact
', but a similar issue of a difference in whatfromJSONin the runner will accept and whatactdoes.@ChristopherHX commented on GitHub (Sep 26, 2024):
Newtonsoft.Json is shining here:
Found this: https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/migrate-from-newtonsoft?pivots=dotnet-9-0#table-of-differences
Those cases could be approximated by using yaml.v3 for go, but yaml allows much more and we are even more far away from reality.
I expect this issue will come up starting with 2024/12 for real GitHub Actions when GitHub starts finalizes migrating production to go services
I confirm this defect, but this is not on my planning board for act
@LoaderB0T commented on GitHub (Dec 17, 2024):
I think I ran into the same issue with my matrix configuration and a reusable workflow.
I have this reusable workflow:
which results in
As you can see I even tried with escaped double quotes, but the error log still mentions
\'.