gcui-art / suno-api

Use API to call the music generation AI of suno.ai, and easily integrate it into agents like GPTs.
https://suno.gcui.ai
GNU Lesser General Public License v3.0
1.26k stars 288 forks source link

"error": "Internal server error. Error: Failed to get session id, you may need to update the SUNO_COOKIE" #21

Closed hiboydidi closed 5 months ago

hiboydidi commented 6 months ago

"error": "Internal server error. Error: Failed to get session id, you may need to update the SUNO_COOKIE"

blueeon commented 6 months ago

@hiboydidi you may need to update the SUNO_COOKIE. How long has this cookie been active? The cookies on the suno website automatically expire every 7 days.

dcln78 commented 6 months ago

Error fetching limit: Error: Failed to get session id, you may need to update the SUNO_COOKIE at SunoApi.getAuthToken (webpack-internal:///(rsc)/./src/lib/SunoApi.ts:58:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async SunoApi.init (webpack-internal:///(rsc)/./src/lib/SunoApi.ts:46:9) at async newSunoApi (webpack-internal:///(rsc)/./src/lib/SunoApi.ts:273:12) at async GET (webpack-internal:///(rsc)/./src/app/api/get_limit/route.ts:14:34) at async /www/wwwroot/suno-api/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:63809 at async eU.execute (/www/wwwroot/suno-api/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:53964) at async eU.handle (/www/wwwroot/suno-api/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:65062) at async doRender (/www/wwwroot/suno-api/node_modules/next/dist/server/base-server.js:1317:42) at async cacheEntry.responseCache.get.routeKind (/www/wwwroot/suno-api/node_modules/next/dist/server/base-server.js:1539:28) at async DevServer.renderToResponseWithComponentsImpl (/www/wwwroot/suno-api/node_modules/next/dist/server/base-server.js:1447:28) at async DevServer.renderPageComponent (/www/wwwroot/suno-api/node_modules/next/dist/server/base-server.js:1844:24) at async DevServer.renderToResponseImpl (/www/wwwroot/suno-api/node_modules/next/dist/server/base-server.js:1882:32) at async DevServer.pipeImpl (/www/wwwroot/suno-api/node_modules/next/dist/server/base-server.js:895:25) at async NextNodeServer.handleCatchallRenderRequest (/www/wwwroot/suno-api/node_modules/next/dist/server/next-server.js:269:17) at async DevServer.handleRequestImpl (/www/wwwroot/suno-api/node_modules/next/dist/server/base-server.js:791:17) at async /www/wwwroot/suno-api/node_modules/next/dist/server/dev/next-dev-server.js:331:20 at async Span.traceAsyncFn (/www/wwwroot/suno-api/node_modules/next/dist/trace/trace.js:151:20) at async DevServer.handleRequest (/www/wwwroot/suno-api/node_modules/next/dist/server/dev/next-dev-server.js:328:24) at async invokeRender (/www/wwwroot/suno-api/node_modules/next/dist/server/lib/router-server.js:174:21) at async handleRequest (/www/wwwroot/suno-api/node_modules/next/dist/server/lib/router-server.js:353:24) at async requestHandlerImpl (/www/wwwroot/suno-api/node_modules/next/dist/server/lib/router-server.js:377:13) at async Server.requestListener (/www/wwwroot/suno-api/node_modules/next/dist/server/lib/start-server.js:140:13)

blueeon commented 6 months ago

Did you make sure to enter the correct cookie? Take a look at the .env file.

dcln78 commented 6 months ago

您确定输入了正确的 cookie 吗?查看 .env 文件。

01

blueeon commented 6 months ago

This is quite a peculiar issue, everything is running smoothly on our end. Could you try retrieving the cookie again? Perhaps your cookie has expired?

summer-to-do commented 5 months ago

I have the same problem while using the vercel, and I am still working for it.

Error fetching limit: Error: Failed to get session id, you may need to update the SUNO_COOKIE at c.getAuthToken (/var/task/.next/server/app/api/get_limit/route.js:1:3466) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async c.init (/var/task/.next/server/app/api/get_limit/route.js:1:3249) at async /var/task/.next/server/app/api/get_limit/route.js:1:6792 at async d (/var/task/.next/server/app/api/get_limit/route.js:1:1798) at async /var/task/node_modules/.pnpm/next@14.1.4_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:6:42484 at async eI.execute (/var/task/node_modules/.pnpm/next@14.1.4_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:6:32486) at async eI.handle (/var/task/node_modules/.pnpm/next@14.1.4_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:6:43737) at async Y (/var/task/node_modules/.pnpm/next@14.1.4_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/next-server/server.runtime.prod.js:16:24659) at async Q.responseCache.get.routeKind (/var/task/node_modules/.pnpm/next@14.1.4_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/next-server/server.runtime.prod.js:17:1025)

blueeon commented 5 months ago

see #19