rmcrackan / Libation

Libation: Liberate your Library
GNU General Public License v3.0
2.75k stars 150 forks source link

Error importing library #889

Open dlfarney opened 6 months ago

dlfarney commented 6 months ago

Describe the bug Error importing library

To Reproduce Steps to reproduce the behavior:

  1. Go to a book to download
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots

image.

Platform

[e.g. Windows 10, Windows 11, Mac, Linux (State distribution)]

Log Files _Log202404_001.zip

rmcrackan commented 6 months ago

Sorry about this error. Much thanks for the log file. Do you get this error on a different network? Friends house, coffee shop, tethered phone (if you have a large data plan), etc.

dlfarney commented 6 months ago

No  it just started happening 2 days ago. I'm on my home network. I can log into audible via chrome just fine. I reinstalled libation and re verified my accounts. The books show in the list of my books but when I click on them to download I get that error. Thank you.Della On Saturday, April 27, 2024 at 02:57:13 PM EDT, rmcrackan @.***> wrote:

Sorry about this error. Much thanks for the log file. Do you get this error on a different network? Friends house, coffee shop, tethered phone (if you have a large data plan), etc.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

dlfarney commented 6 months ago

I was able to download the books directly from audible just fine. They are in the acx format though. We have unlimited data at home. Della On Saturday, April 27, 2024 at 02:57:13 PM EDT, rmcrackan @.***> wrote:

Sorry about this error. Much thanks for the log file. Do you get this error on a different network? Friends house, coffee shop, tethered phone (if you have a large data plan), etc.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

dlfarney commented 6 months ago

Now I get this error "ERROR: No such host is known. (dze5l2jxnquy5.cloudfront.net:443)"

rmcrackan commented 6 months ago

Are you able to try Libation on a different network? I'd like to see if this error occurs for you on all networks.

payne8 commented 6 months ago

Same problem here. I'm on Ubuntu with nothing special going on with my network. I was able to download using OpenAudible and from audible.com directly.

_Log202404.zip

dlfarney commented 6 months ago

I don't have access to another network.

payne8 commented 6 months ago

I was able to solve it after a good nights sleep. I turned off ipv6 for my network and it worked! I think the DNS is timing out trying to use ipv6. I've seen this problem crop up with NodeJS and Python. So it is probably not to do with your code.

dlfarney commented 6 months ago

I tred this on my network and I still have the problem. | ERROR: No such host is known. (dze5l2jxnquy5.cloudfront.net:443) |

On Wednesday, May 1, 2024 at 09:58:54 AM EDT, Mason Payne ***@***.***> wrote:  

I was able to solve it after a good nights sleep. I turned off ipv6 for my network and it worked! I think the DNS is timing out trying to use ipv6. I've seen this problem crop up with NodeJS and Python. So it is probably not to do with your code.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

dlfarney commented 6 months ago

I deleted my account and tried to re add it and got this when trying to log in. Exception of type 'AudibleApi.ApiErrorException' was thrown.    at AudibleApi.ApiUnauthenticated.SendClientRequest(IHttpClientActions client, HttpRequestMessage request) in /home/runner/work/AudibleApi/AudibleApi/AudibleApi/ApiUnauthenticated [partial].cs:line 57   at AudibleApi.Api.AdHocAuthenticatedRequestAsync(String requestUri, HttpMethod method, IHttpClientActions client, HttpBody requestBody) in /home/runner/work/AudibleApi/AudibleApi/AudibleApi/Api [partial].cs:line 56   at AudibleApi.Api.getLibraryResponseAsync(String parameters) in /home/runner/work/AudibleApi/AudibleApi/AudibleApi/Api.Library.cs:line 285   at AudibleApi.Api.GetItemsCountAsync(LibraryOptions libraryOptions) in /home/runner/work/AudibleApi/AudibleApi/AudibleApi/Api.Library.cs:line 428   at AudibleApi.Api.GetLibraryItemsPagesAsync(LibraryOptions libraryOptions, Int32 numItemsPerRequest, SemaphoreSlim semaphore)+MoveNext() in /home/runner/work/AudibleApi/AudibleApi/AudibleApi/Api.Library.cs:line 375   at AudibleUtilities.ApiExtended.getItemsAsync(LibraryOptions libraryOptions, Boolean importEpisodes) in D:\a\Libation\Libation\Source\AudibleUtilities\ApiExtended.cs:line 102   at AudibleUtilities.ApiExtended.getItemsAsync(LibraryOptions libraryOptions, Boolean importEpisodes) in D:\a\Libation\Libation\Source\AudibleUtilities\ApiExtended.cs:line 102   at Polly.Retry.AsyncRetryEngine.ImplementationAsync[TResult](Func3 action, Context context, CancellationToken cancellationToken, ExceptionPredicates shouldRetryExceptionPredicates, ResultPredicates1 shouldRetryResultPredicates, Func5 onRetryAsync, Int32 permittedRetryCount, IEnumerable1 sleepDurationsEnumerable, Func4 sleepDurationProvider, Boolean continueOnCapturedContext)   at Polly.AsyncPolicy.ExecuteAsync[TResult](Func3 action, Context context, CancellationToken cancellationToken, Boolean continueOnCapturedContext)   at ApplicationServices.LibraryCommands.scanAccountAsync(ApiExtended apiExtended, Account account, LibraryOptions libraryOptions, LogArchiver archiver) in D:\a\Libation\Libation\Source\ApplicationServices\LibraryCommands.cs:line 281   at ApplicationServices.LibraryCommands.scanAccountsAsync(Func2 apiExtendedfunc, Account[] accounts, LibraryOptions libraryOptions) in D:\a\Libation\Libation\Source\ApplicationServices\LibraryCommands.cs:line 263   at ApplicationServices.LibraryCommands.scanAccountsAsync(Func2 apiExtendedfunc, Account[] accounts, LibraryOptions libraryOptions) in D:\a\Libation\Libation\Source\ApplicationServices\LibraryCommands.cs:line 265   at ApplicationServices.LibraryCommands.ImportAccountAsync(Func`2 apiExtendedfunc, Account[] accounts) in D:\a\Libation\Libation\Source\ApplicationServices\LibraryCommands.cs:line 132   at LibationWinForms.Form1.scanLibrariesAsync(Account[] accounts) in D:\a\Libation\Libation\Source\LibationWinForms\Form1.ScanManual.cs:line 77

On Wednesday, May 1, 2024 at 09:58:54 AM EDT, Mason Payne ***@***.***> wrote:  

I was able to solve it after a good nights sleep. I turned off ipv6 for my network and it worked! I think the DNS is timing out trying to use ipv6. I've seen this problem crop up with NodeJS and Python. So it is probably not to do with your code.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

rmcrackan commented 6 months ago

Can you both tell me more about your ipv6? Heaven knows I don't want my users to have to mess with their friggin routers or local network settings to get my app to work. Hopefully I can take your knowledge and turn it into code.

rmcrackan commented 6 months ago

I guess my last comment was just for @payne8 . The email chains made it look like @dlfarney said the same thing and it took me a moment to sort it out -- oops

payne8 commented 6 months ago

I have a new vanilla Ubuntu desktop install. I'm hard wired to my router. I had to go into my network settings and disable ipv6 then toggle my network off then back on.

I have only seen this on Ubuntu but there are bug reports or issues all over the internet that it affects many Debian distributions and some MacOS.

I am not positive what actually causes the issue but my impression is that DNS is caching a v6 address that has since changed and the old one is unavailable.

dlfarney commented 6 months ago

Okay so I disabled IPV6 on my PC and was getting libation to work MOST of time. I still get - ERROR: No such host is known. (dze5l2jxnquy5.cloudfront.net:443) on some books. and ERROR: Exception of type 'AudibleApi.ApiErrorException' was thrown. So...I think it may be a timeout issue. Is there a way to increase the timeout value when calling the audible API?

rmcrackan commented 6 months ago

I attempted to disable ipv6 in Libation for this pre-release version -- https://github.com/rmcrackan/Libation/releases/tag/v11.3.8

Can you see if this bypasses the ipv6 issue?