-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
YoutubeLoader does not work on production environment. #6915
Comments
The error you're encountering is related to the YouTube transcript being disabled for the video in question. This issue has been discussed in a similar thread: TypeError: Cannot read properties of undefined (reading 'transcriptBodyRenderer') using YoutubeLoader. The error message indicates that the transcript is disabled, which can happen if the video owner has not enabled transcripts. Here's a suggested workaround:
If the issue persists, consider checking any differences in network permissions or API rate limits between your local and production environments, as these can sometimes affect API interactions. |
@dosu No, that is not the issue because in the development environment I can get the transcript using the same video. So transcript is not disabled. |
If the transcript works in development but not in production, consider these possibilities:
These steps should help identify the root cause of the issue. |
Scraping is generally a bit janky unfortunately - perhaps Vercel's IP is getting blocked? |
Thanks @jacoblee93. I think now I will use the real youtube api to get the transcript. Is there a way to do this in langchain. Perhaps it would be great if this feature was implemented. |
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
Error: Failed to get YouTube video transcription: [YoutubeTranscript] 🚨 Transcript is disabled on this video (ejVMXu-u1hs)
at IW.load (/var/task/.next/server/chunks/6531.js:365:290354)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async y (/var/task/.next/server/chunks/1201.js:97:6103)
at async /var/task/.next/server/chunks/6531.js:368:24443
at async eg (/var/task/.next/server/chunks/6531.js:368:24270)
at async /var/task/node_modules/.pnpm/next@14.2.5_@babel+core@7.24.5_@opentelemetry[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:16:418
at async rR (/var/task/node_modules/.pnpm/next@14.2.5_@babel+core@7.24.5_@opentelemetry[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:15:7978)
at async r7 (/var/task/node_modules/.pnpm/next@14.2.5_@babel+core@7.24.5_@opentelemetry[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:18:1144)
at async es (/var/task/node_modules/.pnpm/next@14.2.5_@babel+core@7.24.5_@opentelemetry[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/server.runtime.prod.js:16:26324)
at async en.responseCache.get.routeKind (/var/task/node_modules/.pnpm/next@14.2.5_@babel+core@7.24.5_@opentelemetry[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/server.runtime.prod.js:17:1026) {
digest: '2995320257'
}
Description
I am using Next JS and Langchain JS. And hosting my app on Vercel.
I am trying to build a rag app where I can also upload data form youtube videos. But I am facing one issue right now.
When ever I run this code on my local server it works and I can successfully get the transcript data from youtube. But whenever I try do the same things in the production server than I get the above error.
The same video works in development and not on the production.
There is no any environment variable that is required for this so I don't think there is any difference between production and development.
So what is the issue here.
Can anyone help me ?
System Info
Next Js 14.2.5
Vercel
Local Server : Windows 11
Node 20.10.0
The text was updated successfully, but these errors were encountered: