audiamus / BookLibConnect

A standalone Audible downloader and decrypter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Downloads fail quietly when user lacking permissions Download and Export locations

YU2Lhr7U opened this issue · comments

Hi,
When attempting to download, download fails almost immediately with a FileNotFoundException noted in logs, likely due to lacking privileges. I was able to fix it by selecting a different download location. This also showed up during installation when an Exception was thrown when Download and Export folders couldnt be created.

Checking for privileges and notifying user to use a different location might resolve this. It worked flawlessly when choosing a different location.

Log Excerpt:

55.852 0001 [ConvertDGVControl.snapshotSelection] upd sel rows=False
02:02:55.852 0001 [ConvertDGVControl.snapshotSelection] #conv sel=2
02:03:03.092 0001 [MainForm.btnConvert_Click] >>>
02:03:03.093 0001 [ConvertDGVControl.snapshotSelection] upd sel rows=True
02:03:03.093 0001 [ConvertDGVControl.snapshotSelection] #conv sel=2
02:03:03.109 0001 [DownloadDecryptJob.DownloadDecryptAndConvertAsync] >>> #conv=2
02:03:03.110 0001 [DownloadDecryptJob.getLicenseAndDownloadAsync] >>> Id=1, "The Infinite and the Divine": license_granted
02:03:03.118 0001 [DownloadDecryptJob.getLicenseAndDownloadAsync] Id=1, "The Infinite and the Divine": license_granted; desired higher quality: High
02:03:03.119 0001 [AudibleApi.GetDownloadLicenseAndSaveAsync] >>> Id=1, "The Infinite and the Divine": license_granted
02:03:03.119 0001 [AudibleApi.GetDownloadLicenseAndSaveAsync] Id=1, "The Infinite and the Divine": license_granted; desired quality: High
02:03:03.120 0001 [AudibleApi.GetDownloadLicenseAsync] >>> asin=1789999146
02:03:03.337 0001 [AudibleApi.GetDownloadLicenseAsync] asin=1789999146, file="LicenseResponse_1789999146-2024_01_13-02_03_03.json"
02:03:03.359 0001 [AudibleApi.GetDownloadLicenseAsync] <<< asin=1789999146
02:03:03.361 0001 [BookLibrary.UpdateLicenseAndChapters] >>> Id=1, "The Infinite and the Divine": license_granted
02:03:03.484 0001 [BookLibrary.UpdateLicenseAndChapters] <<< Id=1, "The Infinite and the Divine": license_granted
02:03:03.484 0001 [AudibleApi.GetDownloadLicenseAndSaveAsync] Id=1, "The Infinite and the Divine": license_granted; done, AudioQuality { SampleRate = 44100, BitRate = 128 }
02:03:03.484 0001 [AudibleApi.GetDownloadLicenseAndSaveAsync] <<< Id=1, "The Infinite and the Divine": license_granted
02:03:03.491 0001 [AudibleApi.DownloadAsync] >>> Id=1, "The Infinite and the Divine": downloading
02:03:03.535 0001 [AudibleApi.DownloadAsync] Id=1, "The Infinite and the Divine": downloading; size=739 MB
02:03:03.538 0001 [AudibleApi.DownloadAsync] Id=1, "The Infinite and the Divine": download_error; FileNotFoundException: "Could not find file 'C:\Users<redacted>\Music\Audible\Download\The Infinite and the_1789999146_LC_128_44100.aaxc'."
02:03:03.538 0001 [AudibleApi.DownloadAsync] <<< Id=1, "The Infinite and the Divine": download_error
02:03:03.540 0001 [DownloadDecryptJob.getLicenseAndDownloadAsync] <<< Id=1, "The Infinite and the Divine": download_error

Mainly writing this if someone else stumbles over this problem.

Thanks for this dope program, wish you all the best in the future :D

FileNotFoundException seems somewhat misleading but apparently that's what underlying .Net comes up with when the app attempts to copy the network stream to a file stream and it fails.