question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

v2.5.0 Error when retrieving streaming data

See original GitHub issue

Steps 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:closed
  • Created 10 months ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
LuanRTcommented, Nov 30, 2022

Should be fixed now, see #249. You can use the default client again if you want/need.

0reactions
hydego17commented, Nov 30, 2022

I see got it, thanksss @LuanRT

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found