museofficial / muse

🎧 a self-hosted midwestern Discord music bot that doesn't suck
MIT License
916 stars 241 forks source link

Bot returning with errors and join joining voice #897

Closed kezzkezzkezz closed 1 year ago

kezzkezzkezz commented 1 year ago

What's happening? (ope: Request failed with status code 403) and ope:no songs found while requesting song from either youtube or spotify

Logs

LOG Number 1

- Applying database migrations...
✔ Database migrations applied.
- 📡 connecting to Discord...
✔ Ready! Invite the bot with https://discordapp.com/linkremoved
yarn run v1.22.19
$ npm run env:set-database-url -- tsx src/scripts/migrate-and-start.ts

> muse@2.1.9 env:set-database-url
> tsx src/scripts/run-with-database-url.ts

========================================
========================================
================= muse =================
========================================
=========== Made with 🎶 by ============
==== https://github.com/codetheweb =====
========================================
========================================

Running version 2.1.9 built on 2/15/2023 (commit b27b095400d50d388e6f923fb27a202115932827)

🔧 Need help? https://github.com/codetheweb/muse/discussions/new
🐛 Bug? https://github.com/codetheweb/muse/issues/new
✨ New feature? https://github.com/codetheweb/muse/issues/new
☕ Discussion? https://github.com/codetheweb/muse/discussions/new
💰 Help me? https://www.paypal.me/codetheweb https://github.com/sponsors/codetheweb

/usr/app/node_modules/ytsr/lib/parseItem.js:355
    .reelPlayerOverlayRenderer.reelPlayerHeaderSupportedRenderers.reelPlayerHeaderRenderer;
                                                                  ^

TypeError: Cannot read properties of undefined (reading 'reelPlayerHeaderRenderer')
    at parseShort (/usr/app/node_modules/ytsr/lib/parseItem.js:355:67)
    at parseItem (/usr/app/node_modules/ytsr/lib/parseItem.js:28:14)
    at <anonymous> (/usr/app/node_modules/ytsr/lib/parseItem.js:409:30)
    at Array.map (<anonymous>)
    at parseShelf (/usr/app/node_modules/ytsr/lib/parseItem.js:409:21)
    at parseItem (/usr/app/node_modules/ytsr/lib/parseItem.js:32:14)
    at catchAndLogFunc (/usr/app/node_modules/ytsr/lib/parseItem.js:88:12)
    at module.exports (/usr/app/node_modules/ytsr/lib/parseItem.js:111:46)
    at <anonymous> (/usr/app/node_modules/ytsr/lib/main.js:53:34)
    at Array.map (<anonymous>)

/********************************************************************************************************************************************************************************************************
failed at func parseItem: Cannot read properties of undefined (reading 'reelPlayerHeaderRenderer')
pls post the the files in /usr/app/node_modules/ytsr/dumps to https://github.com/TimeForANinja/node-ytsr/issues
os: linux-x64, node.js: v18.7.0, ytsr: 3.8.0
********************************************************************************************************************************************************************************************************\

Screenshots image image image image

Additional context Add any other context about the problem here.

Runtime I'm running Muse:

Versions

kezzkezzkezz commented 1 year ago

Have tried replacing API keys too

codetheweb commented 1 year ago

Could you try re-creating the container with the env var DEBUG set to * and see if it logs anything useful?

kezzkezzkezz commented 1 year ago
    createdAt: asc
  }
]
take: 50

) { hash bytes accessedAt createdAt updatedAt } }

2023-02-25T04:11:04.631Z prisma:client:libraryEngine sending request, this.libraryStarted: false 2023-02-25T04:11:04.631Z prisma:client:libraryEngine library starting 2023-02-25T04:11:04.633Z prisma:client:libraryEngine library started 2023-02-25T04:11:04.679Z muse Evicting oldest files... 2023-02-25T04:11:04.680Z prisma:client Prisma Client call: 2023-02-25T04:11:04.680Z prisma:client prisma.fileCache.aggregate({ select: { _sum: { select: { bytes: true } } } }) 2023-02-25T04:11:04.680Z prisma:client Generated request: 2023-02-25T04:11:04.680Z prisma:client query { aggregateFileCache { _sum { bytes } } }

2023-02-25T04:11:04.680Z prisma:client:libraryEngine sending request, this.libraryStarted: true 2023-02-25T04:11:04.693Z superagent POST https://accounts.spotify.com/api/token 2023-02-25T04:11:04.695Z superagent POST https://accounts.spotify.com/api/token 2023-02-25T04:11:04.698Z superagent POST https://accounts.spotify.com/api/token

Opus Libraries

Encryption Libraries

FFmpeg

codetheweb commented 1 year ago

I deleted a prior message that exposed your YouTube key, but using it looks like you might need to add billing to your Google Cloud project:

Screenshot 2023-02-25 at 5 32 22 PM

kezzkezzkezz commented 1 year ago

Woops, thought i cleaned all the keys out. i'll just change that key. how and why does billing need to be added?

kezzkezzkezz commented 1 year ago

Actived billing on my Project but still getting this error

key: "[\"shahmen mangroves\",{\"limit\":10}]"

}) { key value expiresAt createdAt updatedAt } }

2023-02-26T03:03:02.378Z prisma:client:libraryEngine sending request, this.libraryStarted: true 2023-02-26T03:03:02.379Z muse Cache hit: ["shahmen mangroves",{"limit":10}] 2023-02-26T03:03:02.379Z prisma:client Prisma Client call: 2023-02-26T03:03:02.379Z prisma:client prisma.keyValueCache.findUnique({ where: { key: '["VocedhcPDW4"]' } }) 2023-02-26T03:03:02.379Z prisma:client Generated request: 2023-02-26T03:03:02.379Z prisma:client query { findUniqueKeyValueCache(where: { key: "[\"VocedhcPDW4\"]" }) { key value expiresAt createdAt updatedAt } }

2023-02-26T03:03:02.380Z prisma:client:libraryEngine sending request, this.libraryStarted: true 2023-02-26T03:03:02.380Z muse Cache miss: ["VocedhcPDW4"] 2023-02-26T03:03:02.391Z follow-redirects options { protocol: 'https:', maxRedirects: 21, maxBodyLength: 10485760, path: '/youtube/v3/videos?expiresIn=3600&id=---------------------&part=id,+player,+snippet,+contentDetails,+status,+statistics', method: 'GET', headers: { Accept: 'application/json, text/plain, /', 'User-Agent': 'axios/0.19.2' }, agent: undefined, agents: { http: undefined, https: undefined }, auth: undefined, hostname: 'www.googleapis.com', port: null, nativeProtocols: { 'http:': { _connectionListener: [Function: connectionListener], METHODS: [Array], STATUS_CODES: [Object], Agent: [Function], ClientRequest: [Function: ClientRequest], IncomingMessage: [Function: IncomingMessage], OutgoingMessage: [Function: OutgoingMessage], Server: [Function: Server], ServerResponse: [Function: ServerResponse], createServer: [Function: createServer], validateHeaderName: [Function: nodeinternal], validateHeaderValue: [Function: nodeinternal], get: [Function: get], request: [Function: request], maxHeaderSize: [Getter], globalAgent: [Getter/Setter] }, 'https:': { Agent: [Function: Agent], globalAgent: [Agent], Server: [Function: Server], createServer: [Function: createServer], get: [Function: get], request: [Function: request] } } } 2023-02-26T03:03:02.705Z muse /usr/app/node_modules/axios/lib/core/createError.js:16 var error = new Error(message); ^

Error: Request failed with status code 403 at module.exports (/usr/app/node_modules/axios/lib/core/createError.js:16:15) at module.exports (/usr/app/node_modules/axios/lib/core/settle.js:17:12) at IncomingMessage. (/usr/app/node_modules/axios/lib/adapters/http.js:236:11) at IncomingMessage.emit (node:events:525:35) at endReadableNT (node:internal/streams/readable:1359:12) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) 2023-02-26T03:03:08.089Z muse [WS => Shard 0] [HeartbeatTimer] Sending a heartbeat. 2023-02-26T03:03:08.325Z muse [WS => Shard 0] Heartbeat acknowledged, latency of 236ms. 2023-02-26T03:03:25.047Z prisma:client Prisma Client call: 2023-02-26T03:03:25.047Z prisma:client prisma.keyValueCache.findUnique({ where: { key: 'autocomplete:s' } }) 2023-02-26T03:03:25.047Z prisma:client Generated request: 2023-02-26T03:03:25.047Z prisma:client query { findUniqueKeyValueCache(where: { key: "autocomplete:s" }) { key value expiresAt createdAt updatedAt } }

2023-02-26T03:03:25.047Z prisma:client:libraryEngine sending request, this.libraryStarted: true 2023-02-26T03:03:25.048Z muse Cache hit: autocomplete:s 2023-02-26T03:03:26.542Z prisma:client Prisma Client call: 2023-02-26T03:03:26.542Z prisma:client prisma.keyValueCache.findUnique({ where: { key: 'autocomplete:shahmn' } }) 2023-02-26T03:03:26.542Z prisma:client Generated request: 2023-02-26T03:03:26.542Z prisma:client query { findUniqueKeyValueCache(where: { key: "autocomplete:shahmn" }) { key value expiresAt createdAt updatedAt } }

2023-02-26T03:03:26.542Z prisma:client:libraryEngine sending request, this.libraryStarted: true 2023-02-26T03:03:26.543Z muse Cache hit: autocomplete:shahmn 2023-02-26T03:03:27.049Z prisma:client Prisma Client call: 2023-02-26T03:03:27.049Z prisma:client prisma.keyValueCache.findUnique({ where: { key: 'autocomplete:shahm' } }) 2023-02-26T03:03:27.049Z prisma:client Generated request: 2023-02-26T03:03:27.049Z prisma:client query { findUniqueKeyValueCache(where: { key: "autocomplete:shahm" }) { key value expiresAt createdAt updatedAt } }

2023-02-26T03:03:27.049Z prisma:client:libraryEngine sending request, this.libraryStarted: true 2023-02-26T03:03:27.050Z muse Cache hit: autocomplete:shahm 2023-02-26T03:03:27.606Z prisma:client Prisma Client call: 2023-02-26T03:03:27.606Z prisma:client prisma.keyValueCache.findUnique({ where: { key: 'autocomplete:shahme' } }) 2023-02-26T03:03:27.606Z prisma:client Generated request: 2023-02-26T03:03:27.606Z prisma:client query { findUniqueKeyValueCache(where: { key: "autocomplete:shahme" }) { key value expiresAt createdAt updatedAt } }

2023-02-26T03:03:27.606Z prisma:client:libraryEngine sending request, this.libraryStarted: true 2023-02-26T03:03:27.607Z muse Cache hit: autocomplete:shahme 2023-02-26T03:03:28.025Z prisma:client Prisma Client call: 2023-02-26T03:03:28.025Z prisma:client prisma.keyValueCache.findUnique({ where: { key: 'autocomplete:shahmen' } }) 2023-02-26T03:03:28.025Z prisma:client Generated request: 2023-02-26T03:03:28.025Z prisma:client query { findUniqueKeyValueCache(where: { key: "autocomplete:shahmen" }) { key value expiresAt createdAt updatedAt } }

2023-02-26T03:03:28.025Z prisma:client:libraryEngine sending request, this.libraryStarted: true 2023-02-26T03:03:28.025Z muse Cache hit: autocomplete:shahmen 2023-02-26T03:03:28.429Z prisma:client Prisma Client call: 2023-02-26T03:03:28.429Z prisma:client prisma.setting.findUnique({ where: { guildId: '901783796934918184' } }) 2023-02-26T03:03:28.429Z prisma:client Generated request: 2023-02-26T03:03:28.429Z prisma:client query { findUniqueSetting(where: { guildId: "901783796934918184" }) { guildId playlistLimit secondsToWaitAfterQueueEmpties leaveIfNoListeners createdAt updatedAt } }

2023-02-26T03:03:28.430Z prisma:client:libraryEngine sending request, this.libraryStarted: true 2023-02-26T03:03:28.864Z prisma:client Prisma Client call: 2023-02-26T03:03:28.864Z prisma:client prisma.keyValueCache.findUnique({ where: { key: '["shahmen",{"limit":10}]' } }) 2023-02-26T03:03:28.864Z prisma:client Generated request: 2023-02-26T03:03:28.864Z prisma:client query { findUniqueKeyValueCache(where: { key: "[\"shahmen\",{\"limit\":10}]" }) { key value expiresAt createdAt updatedAt } }

2023-02-26T03:03:28.864Z prisma:client:libraryEngine sending request, this.libraryStarted: true 2023-02-26T03:03:28.864Z muse Cache hit: ["shahmen",{"limit":10}] 2023-02-26T03:03:28.865Z prisma:client Prisma Client call: 2023-02-26T03:03:28.865Z prisma:client prisma.keyValueCache.findUnique({ where: { key: '["eGSaZki8NK4"]' } }) 2023-02-26T03:03:28.865Z prisma:client Generated request: 2023-02-26T03:03:28.865Z prisma:client query { findUniqueKeyValueCache(where: { key: "[\"eGSaZki8NK4\"]" }) { key value expiresAt createdAt updatedAt } }

2023-02-26T03:03:28.865Z prisma:client:libraryEngine sending request, this.libraryStarted: true 2023-02-26T03:03:28.866Z muse Cache miss: ["eGSaZki8NK4"] 2023-02-26T03:03:28.866Z follow-redirects options { protocol: 'https:', maxRedirects: 21, maxBodyLength: 10485760, path: '/youtube/v3/videos?expiresIn=3600&id=----------------&part=id,+player,+snippet,+contentDetails,+status,+statistics', method: 'GET', headers: { Accept: 'application/json, text/plain, /', 'User-Agent': 'axios/0.19.2' }, agent: undefined, agents: { http: undefined, https: undefined }, auth: undefined, hostname: 'www.googleapis.com', port: null, nativeProtocols: { 'http:': { _connectionListener: [Function: connectionListener], METHODS: [Array], STATUS_CODES: [Object], Agent: [Function], ClientRequest: [Function: ClientRequest], IncomingMessage: [Function: IncomingMessage], OutgoingMessage: [Function: OutgoingMessage], Server: [Function: Server], ServerResponse: [Function: ServerResponse], createServer: [Function: createServer], validateHeaderName: [Function: nodeinternal], validateHeaderValue: [Function: nodeinternal], get: [Function: get], request: [Function: request], maxHeaderSize: [Getter], globalAgent: [Getter/Setter] }, 'https:': { Agent: [Function: Agent], globalAgent: [Agent], Server: [Function: Server], createServer: [Function: createServer], get: [Function: get], request: [Function: request] } } } 2023-02-26T03:03:29.226Z muse /usr/app/node_modules/axios/lib/core/createError.js:16 var error = new Error(message); ^

Error: Request failed with status code 403 at module.exports (/usr/app/node_modules/axios/lib/core/createError.js:16:15) at module.exports (/usr/app/node_modules/axios/lib/core/settle.js:17:12) at IncomingMessage. (/usr/app/node_modules/axios/lib/adapters/http.js:236:11) at IncomingMessage.emit (node:events:525:35) at endReadableNT (node:internal/streams/readable:1359:12) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) 2023-02-26T03:03:49.349Z muse [WS => Shard 0] [HeartbeatTimer] Sending a heartbeat. 2023-02-26T03:03:49.587Z muse [WS => Shard 0] Heartbeat acknowledged, latency of 237ms.

codetheweb commented 1 year ago

I would recommend manually making an API key with curl or some other tool to see what the full error response. The command to do so would be something like curl 'https://www.googleapis.com/youtube/v3/videos?expiresIn=3600&id=xgDP8kTAdz0&key=&part=id,+player,+snippet,+contentDetails,+status,+statistics'; just copy the parameters from this part of the logs:

protocol: 'https:',
maxRedirects: 21,
maxBodyLength: 10485760,
path: '/youtube/v3/videos?expiresIn=3600&id=---------------------&part=id,+player,+snippet,+contentDetails,+status,+statistics',
method: 'GET',
headers: {
Accept: 'application/json, text/plain, /',
'User-Agent': 'axios/0.19.2'
},
agent: undefined,
agents: { http: undefined, https: undefined },
auth: undefined,
hostname: 'www.googleapis.com',
port: null,
nativeProtocols: {
'http:': {

I think there might also be something in the Google Cloud dashboard to see API errors.

kezzkezzkezz commented 1 year ago

Fixed by creating a new project and then creating a key within that