Skip to content
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

Miniget 410 when checking for updates #1260

Open
bboynton97 opened this issue Nov 3, 2023 · 1 comment
Open

Miniget 410 when checking for updates #1260

bboynton97 opened this issue Nov 3, 2023 · 1 comment

Comments

@bboynton97
Copy link

When i try to use ytdl-core or any package that depends on it, it fails with the following error:

199 |     Date.now() - exports.lastUpdateCheck >= UPDATE_INTERVAL) {
200 |     exports.lastUpdateCheck = Date.now();
201 |     return miniget('https://api.github.com/repos/fent/node-ytdl-core/releases/latest', {
202 |       headers: { 'User-Agent': 'ytdl-core' },
203 |     }).text().then(response => {
204 |       if (JSON.parse(response).tag_name !== `v${pkg.version}`) {
             ^
SyntaxError: JSON Parse error: Unrecognized token 'ߋ'
      at /Users/braelynboynton/Developer/spotlight/services/api/node_modules/ytdl-core/lib/utils.js:204:10
      at processTicksAndRejections (:1:2602)
11 | // `request`, `response`, `abort`, left out, miniget will emit these.
12 | const requestEvents = ['connect', 'continue', 'information', 'socket', 'timeout', 'upgrade'];
13 | const responseEvents = ['aborted'];
14 | Miniget.MinigetError = class MinigetError extends Error {
15 |     constructor(message, statusCode) {
16 |         super(message);
            ^
error: Status code: 410
      at new MinigetError (/Users/braelynboynton/Developer/spotlight/services/api/node_modules/miniget/dist/index.js:16:8)
      at /Users/braelynboynton/Developer/spotlight/services/api/node_modules/miniget/dist/index.js:206:26
      at node:http:865:28
      at processTicksAndRejections (:1:2602)
@bboynton97
Copy link
Author

I bypassed this by setting YTDL_NO_UPDATE but I'm still running into other 410 issues with miniget in this library

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

No branches or pull requests

1 participant