lfanew
lfanew7mo ago

Some parts of flow fails when parent_job is set

I'm currently dealing with an issue where a flow run will fail if the parent_job is set. If I don't pass a parent_job then the flow runs just fine. Why might this be happening? Is this expected? Here's a snippet of the step and the result. It seems like the items, which are set to the result of a previous step, are null (which they shouldn't be as the step returned results, see image below).
const items = results.b
let titles = []

items.forEach(function(e) {
titles.push(`"[${e.title}](${e.link})`)
});
let result =
`List these titles & links in Markdown. Make sure they are hyperlinked.
Add an emoji at the end of each one that matches the title as best as possible.
See an EXAMPLE for how to format.
---
EXAMPLE:
1. [Example 1](https://example1.com) 👨‍💻
2. [Example 2](https://example2.com) 🕰️
...
...
---
INPUT:
${titles.join("\n")}`
return result;
const items = results.b
let titles = []

items.forEach(function(e) {
titles.push(`"[${e.title}](${e.link})`)
});
let result =
`List these titles & links in Markdown. Make sure they are hyperlinked.
Add an emoji at the end of each one that matches the title as best as possible.
See an EXAMPLE for how to format.
---
EXAMPLE:
1. [Example 1](https://example1.com) 👨‍💻
2. [Example 2](https://example2.com) 🕰️
...
...
---
INPUT:
${titles.join("\n")}`
return result;
{
"error": {
"name": "InternalErr",
"message": "Error during isolated evaluation of expression `const items = results.b\r\nlet titles = []\r\n\r\nitems.forEach(function(e) {\r\n titles.push(`\"[${e.title}](${e.link})`)\r\n});\r\nlet result = \r\n`List these titles & links in Markdown. Make sure they are hyperlinked.\r\nAdd an emoji at the end of each one that matches the title as best as possible.\r\nSee an EXAMPLE for how to format.\r\n---\r\nEXAMPLE:\r\n1. [Example 1](https://example1.com) :man_technologist:\r\n2. [Example 2](https://example2.com) :clock:\r\n...\r\n...\r\n---\r\nINPUT:\r\n${titles.join(\"\\n\")}`\r\nreturn result;`:\nTypeError: Cannot read properties of null (reading 'forEach')\n at <anon>:48:7\n at eventLoopTick (ext:core/01_core.js:153:7)"
}
}
{
"error": {
"name": "InternalErr",
"message": "Error during isolated evaluation of expression `const items = results.b\r\nlet titles = []\r\n\r\nitems.forEach(function(e) {\r\n titles.push(`\"[${e.title}](${e.link})`)\r\n});\r\nlet result = \r\n`List these titles & links in Markdown. Make sure they are hyperlinked.\r\nAdd an emoji at the end of each one that matches the title as best as possible.\r\nSee an EXAMPLE for how to format.\r\n---\r\nEXAMPLE:\r\n1. [Example 1](https://example1.com) :man_technologist:\r\n2. [Example 2](https://example2.com) :clock:\r\n...\r\n...\r\n---\r\nINPUT:\r\n${titles.join(\"\\n\")}`\r\nreturn result;`:\nTypeError: Cannot read properties of null (reading 'forEach')\n at <anon>:48:7\n at eventLoopTick (ext:core/01_core.js:153:7)"
}
}
No description
8 Replies
rubenf
rubenf7mo ago
Do you have a minimal reproduction you can share with us
lfanew
lfanew7mo ago
Yes I'll get you one today. Simplest reproduction (step fails but flow good?) - CE v1.305.0
lfanew
lfanew7mo ago
w/ parent_job
No description
lfanew
lfanew7mo ago
w/o parent_job
No description
lfanew
lfanew7mo ago
Hey @rubenf, were you able to reproduce on your side? I can follow up with an issue if it's not just me doing something silly
rubenf
rubenf7mo ago
Hi @lfanew , could you share a flow exported that I can import
lfanew
lfanew7mo ago
Ah of course. I'll DM you one here in a minute
rubenf
rubenf7mo ago
@lfanew I cannot reproduce, the flow you sent me tseems to work