Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Internal error [item 0] #4

Open
drorengel opened this issue Oct 26, 2024 · 8 comments
Open

Internal error [item 0] #4

drorengel opened this issue Oct 26, 2024 · 8 comments

Comments

@drorengel
Copy link

I just installed it on local n8n instance and got the following error on the 1st run

NodeOperationError: Internal error at Object.execute (/.n8n/nodes/node_modules/n8n-nodes-youtube-transcript/nodes/YoutubeTranscriptNode/YoutubeTranscriptNode.node.ts:129:12) at processTicksAndRejections (node:internal/process/task_queues:95:5) at Workflow.runNode (/usr/lib/node_modules/n8n/node_modules/n8n-workflow/src/Workflow.ts:1382:8) at /usr/lib/node_modules/n8n/node_modules/n8n-core/src/WorkflowExecute.ts:1167:27 at /usr/lib/node_modules/n8n/node_modules/n8n-core/src/WorkflowExecute.ts:1887:11

@drorengel
Copy link
Author

{
"errorMessage": "Internal error",
"errorDetails": {},
"n8nDetails": {
"nodeName": "Youtube Transcript1",
"nodeType": "n8n-nodes-youtube-transcript.youtubeTranscriptNode",
"nodeVersion": 1,
"itemIndex": 0,
"time": "10/26/2024, 1:56:59 PM",
"n8nVersion": "1.63.4 (Self Hosted)",
"binaryDataMode": "default",
"stackTrace": [
"NodeOperationError: Internal error",
" at Object.execute (/.n8n/nodes/node_modules/n8n-nodes-youtube-transcript/nodes/YoutubeTranscriptNode/YoutubeTranscriptNode.node.ts:129:12)",
" at processTicksAndRejections (node:internal/process/task_queues:95:5)",
" at Workflow.runNode (/usr/lib/node_modules/n8n/node_modules/n8n-workflow/src/Workflow.ts:1382:8)",
" at /usr/lib/node_modules/n8n/node_modules/n8n-core/src/WorkflowExecute.ts:1167:27",
" at /usr/lib/node_modules/n8n/node_modules/n8n-core/src/WorkflowExecute.ts:1887:11"
]
}
}

@hapheus
Copy link
Owner

hapheus commented Oct 27, 2024

Please note that a new version v0.8.2 is available. This update includes more descriptive error messages, which might help in diagnosing the issue further.

Additionally, ensure that Chromium and Puppeteer are installed, as these dependencies are required for the node to function correctly.

If the problem persists after updating and verifying the dependencies, feel free to provide further details for additional troubleshooting.

@drorengel
Copy link
Author

I upgraded to v0.8.2. Here is the error message. I just simply put video link and executed.

{
"errorMessage": "Internal error",
"errorDetails": {},
"n8nDetails": {
"nodeName": "Youtube Transcript1",
"nodeType": "n8n-nodes-youtube-transcript.youtubeTranscriptNode",
"nodeVersion": 1,
"itemIndex": 0,
"time": "10/27/2024, 12:36:02 AM",
"n8nVersion": "1.63.4 (Self Hosted)",
"binaryDataMode": "default",
"stackTrace": [
"NodeOperationError: Internal error",
" at Object.execute (/.n8n/nodes/node_modules/n8n-nodes-youtube-transcript/nodes/YoutubeTranscriptNode/YoutubeTranscriptNode.node.ts:129:12)",
" at processTicksAndRejections (node:internal/process/task_queues:95:5)",
" at Workflow.runNode (/usr/lib/node_modules/n8n/node_modules/n8n-workflow/src/Workflow.ts:1382:8)",
" at /usr/lib/node_modules/n8n/node_modules/n8n-core/src/WorkflowExecute.ts:1167:27",
" at /usr/lib/node_modules/n8n/node_modules/n8n-core/src/WorkflowExecute.ts:1887:11"
]
}
}

@hapheus
Copy link
Owner

hapheus commented Oct 27, 2024

It looks like the update might not have completed successfully, as this seems to be the old version. Could you please try restarting your n8n instance to ensure the changes take effect? Sometimes, a restart is needed for updates to fully apply.

@drorengel
Copy link
Author

ok - I am on v.0.8.2 and now got different error. I installed both puppeteer and chromium (npm install). let me know if I am doing something wrong?

{
"errorMessage": "Failed to launch the browser before processing.",
"errorDetails": {},
"n8nDetails": {
"nodeName": "Youtube Transcript1",
"nodeType": "n8n-nodes-youtube-transcript.youtubeTranscriptNode",
"nodeVersion": 1,
"time": "10/27/2024, 12:44:49 AM",
"n8nVersion": "1.64.3 (Self Hosted)",
"binaryDataMode": "default",
"stackTrace": [
"NodeOperationError: Failed to launch the browser before processing.",
" at Object.execute (/.n8n/nodes/node_modules/n8n-nodes-youtube-transcript/nodes/YoutubeTranscriptNode/YoutubeTranscriptNode.node.ts:118:10)",
" at processTicksAndRejections (node:internal/process/task_queues:95:5)",
" at Workflow.runNode (/usr/lib/node_modules/n8n/node_modules/n8n-workflow/src/Workflow.ts:1382:8)",
" at /usr/lib/node_modules/n8n/node_modules/n8n-core/src/WorkflowExecute.ts:1167:27",
" at /usr/lib/node_modules/n8n/node_modules/n8n-core/src/WorkflowExecute.ts:1887:11"
]
}
}

@hapheus
Copy link
Owner

hapheus commented Oct 27, 2024

It looks like there might be an issue with Puppeteer and Chromium not launching correctly. This often happens when Puppeteer cannot find or start Chromium. Here are a few steps you can try to debug and test this on your server:

  1. Test Puppeteer directly:
    You can create a simple script to see if Puppeteer can launch Chromium:

    const puppeteer = require('puppeteer');
    
    (async () => {
      try {
        const browser = await puppeteer.launch();
        console.log('Puppeteer launched successfully!');
        await browser.close();
      } catch (error) {
        console.error('Error launching Puppeteer:', error);
      }
    })();

    Save this code in a file (e.g., testPuppeteer.js) and run it with:

    node testPuppeteer.js

    If this script fails, it will give you more detailed error messages to help diagnose the issue.
    Note: If Puppeteer is not installed in your project, you may need to run npm install puppeteer in the same directory where testPuppeteer.js is located.

  2. Check Environment Variables:
    Make sure that any required environment variables for Puppeteer are set. For example, sometimes PUPPETEER_EXECUTABLE_PATH might need to be set if Chromium isn't in a standard location:

    export PUPPETEER_EXECUTABLE_PATH=/path/to/chromium

Please try these steps and see if any of them resolve the issue.

@hapheus
Copy link
Owner

hapheus commented Oct 27, 2024

You might find some helpful hints and instructions in the following resources:

These pages often provide detailed guidance and common solutions for issues with Puppeteer.

@drorengel
Copy link
Author

we are making progress :)

the file could not run due to missing dependencies. I had to run the following command

sudo apt-get install ca-certificates fonts-liberation libappindicator3-1 libasound2 libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 lsb-release wget xdg-utils
then I was able to execute the js successfully. I also set the path according to your recommendation.

However, the plugin in n8n is still not working. I restarted the container multiple times to rule out other issues.

here is the error from n8n

{
"errorMessage": "Failed to launch the browser before processing.",
"errorDetails": {},
"n8nDetails": {
"nodeName": "Youtube Transcript1",
"nodeType": "n8n-nodes-youtube-transcript.youtubeTranscriptNode",
"nodeVersion": 1,
"time": "10/27/2024, 1:15:06 AM",
"n8nVersion": "1.64.3 (Self Hosted)",
"binaryDataMode": "default",
"stackTrace": [
"NodeOperationError: Failed to launch the browser before processing.",
" at Object.execute (/.n8n/nodes/node_modules/n8n-nodes-youtube-transcript/nodes/YoutubeTranscriptNode/YoutubeTranscriptNode.node.ts:118:10)",
" at processTicksAndRejections (node:internal/process/task_queues:95:5)",
" at Workflow.runNode (/usr/lib/node_modules/n8n/node_modules/n8n-workflow/src/Workflow.ts:1382:8)",
" at /usr/lib/node_modules/n8n/node_modules/n8n-core/src/WorkflowExecute.ts:1167:27",
" at /usr/lib/node_modules/n8n/node_modules/n8n-core/src/WorkflowExecute.ts:1887:11"
]
}
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants