sim0n00ps / OF-DL

C# console app to download all of the media from Onlyfans accounts with DRM video downloading support
575 stars 55 forks source link

Immediate Crashing #290

Closed Mellomama closed 4 months ago

Mellomama commented 4 months ago

I've been using the program successfully for a while, but when I've now updated and overwritten my files and filled in all the auth info the program crashes shortly after giving all green. Probably should have kept a backup, that's on me, but I legit can't decipher this error I've been troubleshooting and trying previous answered fixes for things for over an hour. Apologies if I've missed something obvious but assistance would be much appreciated <3

Exception caught: Request headers must contain only ASCII characters.

StackTrace: at System.Net.Http.HttpConnection.WriteStringAsync(String s, Boolean async) at System.Net.Http.HttpConnection.WriteStringAsync(String s, Boolean async, Encoding encoding) at System.Net.Http.HttpConnection.WriteHeadersAsync(HttpHeaders headers, String cookiesFromContainer, Boolean async) at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpClient.g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) at OF_DL.Helpers.APIHelper.GetUserInfo(String endpoint, Auth auth) 2024-02-22 04:06:28.325 -06:00 [ERR] Exception caught: Object reference not set to an instance of an object.

StackTrace: at OF_DL.Program.Main()

melithine commented 4 months ago

That looks like there's a bad character in the configuration that is causing it to fail when trying to talk to OF. I would recommend opening the config files in VSCode and see if the JSON syntax highlighting helps identify the bad character.

Another option would be to try the browser extension to generate the auth.json file: https://github.com/whimsical-c4lic0/OF-DL-Auth-Helper/

If you generate the auth.json using the browser extension and still see the error, try attaching your config.json file here so we can review that, as that doesn't have sensitive information like auth.json does.

Mellomama commented 4 months ago

The extension worked wonders. Thank you so much for your help I rly appreciate it!