serenity-rs / serenity

A Rust library for the Discord API.
https://discord.gg/serenity-rs
ISC License
4.76k stars 582 forks source link

Unsuccessful Request For Application Info #2012

Closed daveiator closed 2 years ago

daveiator commented 2 years ago

I've run into the same error as #1155 , and can't figure out what went wrong.

Produced error:

thread 'main' panicked at 'Could not access application info: Http(UnsuccessfulRequest(ErrorResponse { status_code: 401, url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("discord.com")), port: None, path: "/api/v10/oauth2/applications/@me", query: None, fragment: None }, error: DiscordJsonError { code: 0, message: "401: Unauthorized", errors: [] } }))', src\main.rs:79:21

This only happens on my laptop, on my desktop the bot starts without problems. I use the same OS on both, which leads me to suspect that it has something to do with my machine.

The code doesn't really seams matter. The example programs also don't run on my Laptop with the same issue.

I've tried running it on Windows and Ubuntu with WSL2

Maybe someone can help me find out what causes this.

Versions:

jzeuzs commented 2 years ago

Do you have a valid token?

daveiator commented 2 years ago

Yes. Like I've said, it runs fine on my other machine with the same token

daveiator commented 2 years ago

It works again. I don't know what caused it but the problems gone. I didn't deliberately update anything, so the reason remains unsolved. I can only assume that it was a problem caused by discords end who rejected my login.