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

Error: Failed to get session id, you may need to update the SUNO_COOKIE #19

Closed
banxian007 opened this issue Apr 4, 2024 · 9 comments
Closed
Labels
bug Something isn't working

Comments

@banxian007
Copy link

banxian007 commented Apr 4, 2024

{
"error": "Internal server error. TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["Cookie"]"
}

453736ebfe5fda143cdd841d3b54891
af65db25facedcc8f8209632a059cbc
image

@banxian007 banxian007 closed this as not planned Won't fix, can't repro, duplicate, stale Apr 4, 2024
@banxian007
Copy link
Author

something wrong

@banxian007 banxian007 reopened this Apr 4, 2024
@hiboydidi
Copy link

me too,why

@blueeon blueeon added the bug Something isn't working label Apr 4, 2024
@GitPusher99
Copy link
Contributor

Go to https://app.suno.ai/, make sure you are logged in, and perform the operation on the console

function getCookieStringByDomain(domain) {
    const cookies = document.cookie.split(';');
    let cookieString = '';
    
    cookies.forEach(cookie => {
        const [name, value] = cookie.trim().split('=');
        cookieString += `${name}=${value}; `;
    });
    
    return cookieString;
}

getCookieStringByDomain('clerk.suno.ai');

You can get the cookie. Give it a try

@banxian007 @hiboydidi

@banxian007
Copy link
Author

Tried all three browsers, Google Chrome, Firefox, and edge.

image
image
image
image

@banxian007
Copy link
Author

@GitPusher99

@GitPusher99
Copy link
Contributor

Look at the screenshot you sent, posted cookies contain special characters, you check to try

@banxian007
Copy link
Author

Look at the screenshot you sent, posted cookies contain special characters, you check to try

What special characters, I don't quite understand, like this?% I don't know what the problem is.@GitPusher99

@GitPusher99
Copy link
Contributor

image

@banxian007

@blueeon blueeon changed the title why Error: Failed to get session id, you may need to update the SUNO_COOKIE Apr 8, 2024
@Thehappydeveloper
Copy link

Hi, I have the same issue both when I run it with npm and with docker.
image

I got the cookie ID with the function given above.

image

I inserted it in the example file like this:

image

I am on a Ubuntu machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants