Closed KatyPurry closed 1 year ago
I'm receiving the same error, except I'm running the .exe directly. My username contains only letters.
2023-06-09T15:08:12.632712Z DEBUG No shreddit.env config file found.
at src\main.rs:34
2023-06-09T15:08:13.305680Z ERROR {"error":"invalid_grant"}
at src\main.rs:41
Attempting to do a dry run (with all my reddit parameters set) results in the following error:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: reqwest::Error { kind: Request, url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("www.reddit.com")), port: None, path: "/api/v1/access_token", query: None, fragment: None }, source: hyper::Error(Connect, ConnectError("dns error", Os { code: 11001, kind: Uncategorized, message: "No such host is known." })) }', src\access_token.rs:21:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Turn off 2FA and it should work.
FYI: This error will also occur if your user credentials (username/password) are incorrect.
@markjamesm The error you posted says it's a DNS error and "No such host is known" so I suspect there was some issue on your side with your DNS server.
For this invalid grant error, please look at the debug log output and verify your credentials are correct.
Are you creating the client ID and token correctly?
I can confirm the same issue is happening here for me. How do i find the logs?
2023-06-10T12:19:11.172635Z DEBUG No shreddit.env config file found. at src\main.rs:34
2023-06-10T12:19:11.993024Z ERROR {"error":"invalid_grant"} at src\main.rs:41
Error: "{\"error\":\"invalid_grant\"}"
I've run into this issue before when trying to log into 3rd-party Reddit apps while having 2FA enabled.
What you have to do is append a colon (:) to the end of your password, followed by the TOTP value.
So, for example, if the current TOTP number in Google Authenticator is "123456", I would enter "--password MY_PASSWORD:123456"
I hope that helps!
I've run into this issue before when trying to log into 3rd-party Reddit apps while having 2FA enabled.
What you have to do is append a colon (:) to the end of your password, followed by the TOTP value.
So, for example, if the current TOTP number in Google Authenticator is "123456", I would enter "--password MY_PASSWORD:123456"
I hope that helps!
This is the solution, thanks much!
Updated the README to clarify this here.
Hello,
I followed the how to, I downloaded Shreddit after installing Cargo. I tried to run in cli command but it returns an error :
Is it related to my reddit's nickname ? It's look like
-username-
. I added an \ to escape :\-username-