v2.5.0 Error when retrieving streaming data
See original GitHub issueSteps to reproduce
This happened inside Next.js API routes that I build, following the guide in the Docs to get video info and retrieve streaming data.
const info = await yt.getBasicInfo('somevideoid');
const url = info.streaming_data?.formats[0].decipher(yt.session.player);
Failure Logs
*When I tried to resolve it by upgrading acorn package, the error pointed out to jintr package instead.
SyntaxError: Unexpected token (1:52)
at Parser.pp$4.raise (<project-path>/node_modules/acorn/dist/acorn.js:3459:15)
at Parser.pp$9.unexpected (<project-path>/node_modules/acorn/dist/acorn.js:760:10)
at Parser.pp$9.semicolon (<project-path>/node_modules/acorn/dist/acorn.js:737:68)
at Parser.pp$8.parseVarStatement (<project-path>/node_modules/acorn/dist/acorn.js:1168:10)
at Parser.pp$8.parseStatement (<project-path>/node_modules/acorn/dist/acorn.js:915:19)
at Parser.pp$8.parseBlock (<project-path>/node_modules/acorn/dist/acorn.js:1236:23)
at Parser.pp$5.parseFunctionBody (<project-path>/node_modules/acorn/dist/acorn.js:3285:24)
at Parser.pp$8.parseFunction (<project-path>/node_modules/acorn/dist/acorn.js:1358:10)
at Parser.pp$8.parseFunctionStatement (<project-path>/node_modules/acorn/dist/acorn.js:1058:17)
at Parser.pp$8.parseStatement (<project-path>/node_modules/acorn/dist/acorn.js:903:19) {
pos: 52,
loc: Position { line: 1, column: 52 },
raisedAt: 53
}
}
Expected behavior
Retrieving stream data from video info should be working just fine.
Current behavior
Its working fine when I tried to access info.with getBasicInfo, but when I tried to retrieve streaming data by invoking info.streaming_data?.formats[0].decipher(yt.session.player) the error happened.
Maybe be related to decipher algorithm error?
Version
Default
Anything else?
No response
Checklist
- I am running the latest version.
- I checked the documentation and found no answer.
- I have searched the existing issues and made sure this is not a duplicate.
- I have provided sufficient information.
Issue Analytics
- State:
- Created 10 months ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
401 Error when retrieving Twitter data using Tweepy
If an API request to authenticate comes from a server that claims it is a time that is outside of 15 minutes of...
Read more >Troubleshooting Kinesis Data Streams Consumers
This error occurs when a consumer application reads from an encrypted stream without permissions on the KMS master key. To assign permissions to...
Read more >Troubleshooting Streaming - Oracle Help Center
This error is related to the client. The Streaming service doesn't send it, which means that the request never made it to the...
Read more >Live streaming error messages - YouTube Help
The Live Dashboard and Live Control Room checks for errors in the stream you're sending to YouTube. The messages are displayed next to...
Read more >Azure Stream Analytics resource log data errors
This article explains the different input and output data errors that can occur when using Azure Stream Analytics.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Should be fixed now, see #249. You can use the default client again if you want/need.
I see got it, thanksss @LuanRT