Skip to content

fix(editor): "Trigger node not found" error when chat message is entered #14954

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

Merged
merged 8 commits into from
Apr 29, 2025

Conversation

autologie
Copy link
Contributor

@autologie autologie commented Apr 28, 2025

Summary

This PR implements a fix of the bug described in the title, along with some stylistic tweaks and bugfixes to the new logs view.

To test locally, set environment variable N8N_ENABLE_LOGS_VIEW to true when starting the server.

Related Linear tickets, Github issues, and Community forum posts

https://linear.app/n8n/issue/SUG-41/bug-trigger-node-not-found-error-when-chat-message-is-entered

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

Copy link

codecov bot commented Apr 28, 2025

Codecov Report

Attention: Patch coverage is 92.85714% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...omponents/CanvasChat/composables/useChatTrigger.ts 66.66% 2 Missing and 1 partial ⚠️
...end/editor-ui/src/composables/usePushConnection.ts 88.00% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@n8n-assistant n8n-assistant bot added the n8n team Authored by the n8n team label Apr 28, 2025
watch(
() => allConnections.value,
() => {
if (canvasStore.isLoading) return;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the condition that caused the "Chat Trigger not found" error. The new implementation uses computed() in useChatTrigger to ensure latest workflow in the store is read when the value is referenced.

@autologie autologie marked this pull request as ready for review April 29, 2025 08:15
@autologie autologie requested review from a team and r00gm April 29, 2025 08:17
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mrge found 4 issues across 9 files. View them in mrge.io

// eslint-disable-next-line @typescript-eslint/no-explicit-any
const objectIterator = (input: any): any => {
if (seen.has(input)) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Objects that are part of a circular reference are returned without converting nested Vue reactive objects to raw

@@ -505,6 +505,13 @@ export function usePushConnection({ router }: { router: ReturnType<typeof useRou
}

workflowsStore.executingNode.length = 0;

if (receivedData.type === 'executionFinished') {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This condition should be expanded to also handle 'executionRecovered' type since both types execute the same code block afterwards and likely need the same cleanup

@autologie autologie requested review from OlegIvaniv and removed request for r00gm April 29, 2025 08:23
Copy link
Contributor

@OlegIvaniv OlegIvaniv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

Copy link
Contributor

✅ All Cypress E2E specs passed

@autologie autologie merged commit 8981e22 into master Apr 29, 2025
35 checks passed
@autologie autologie deleted the sug-41-chat-trigger-not-found branch April 29, 2025 11:45
@github-actions github-actions bot mentioned this pull request May 5, 2025
@janober
Copy link
Member

janober commented May 5, 2025

Got released with [email protected]

ozcangungor pushed a commit to ozcangungor/n8n that referenced this pull request May 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
n8n team Authored by the n8n team Released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants