Skip to content
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

Code Node Stopped Working #12354

Open
bb-nik opened this issue Dec 23, 2024 · 2 comments
Open

Code Node Stopped Working #12354

bb-nik opened this issue Dec 23, 2024 · 2 comments
Labels
in linear Issue or PR has been created in Linear for internal review

Comments

@bb-nik
Copy link

bb-nik commented Dec 23, 2024

Bug Description

Everything was working until a few hours ago and now none of the code nodes seem to be working. Gets stuck on executing!

Code note in other Workflows have also stopped working

I did the following to try to fix the issue...

  1. I duplicated the Code node

  2. I copy/pasted the code into a new code node

  3. I duplicated the entire workflow

  4. I redid the code from scratch.

None of the above worked.

image

To Reproduce

  1. Add Code Node
  2. Add some simple code
  3. Test

My Code:
`
if (!items[0]?.json?.data) {
throw new Error("Input data is missing or invalid.");
}

let jsonData;
try {
jsonData = JSON.parse(items[0].json.data);
} catch (error) {
throw new Error("Failed to parse JSON: " + error.message);
}

// Extract the link to the .vtt file or provide a fallback
const vttLink = jsonData.link || "Link not available";

// Return the link as output
return [
{
json: {
vttLink: vttLink,
}
}
];

`

Expected behavior

Code node should execute the code.

Operating System

Online Version

n8n Version

Running version [email protected]

Node.js Version

Online Version

Database

SQLite (default)

Execution mode

main (default)

@Joffcom
Copy link
Member

Joffcom commented Dec 23, 2024

Hey @bb-nik,

We have created an internal ticket to look into this which we will be tracking as "N8N-8004"

@Joffcom Joffcom added the in linear Issue or PR has been created in Linear for internal review label Dec 23, 2024
@bb-nik
Copy link
Author

bb-nik commented Dec 23, 2024

FYI: Restarting the Workspace fixed the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in linear Issue or PR has been created in Linear for internal review
Projects
None yet
Development

No branches or pull requests

2 participants