From ca14db79b9ef9e64bae98c0ba3f198b778a9e0a5 Mon Sep 17 00:00:00 2001 From: Robert McRackan Date: Mon, 26 Jul 2021 17:12:40 -0400 Subject: [PATCH] Found the NRE. Underlying problem persists. Now it will be reported correctly --- FileLiberator/DownloadDecryptBook.cs | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/FileLiberator/DownloadDecryptBook.cs b/FileLiberator/DownloadDecryptBook.cs index 7d1d2e9f..e3dcfcdf 100644 --- a/FileLiberator/DownloadDecryptBook.cs +++ b/FileLiberator/DownloadDecryptBook.cs @@ -67,35 +67,15 @@ namespace FileLiberator { validate(libraryBook); - Serilog.Log.Logger.Debug("Trying to debug mysterious null ref exception {@DebugInfo}", new { - libraryBookIsNull = libraryBook is null, - BookIsNull = libraryBook?.Book is null, - libraryBook?.Book?.Locale, - libraryBook?.Book?.AudibleProductId, - AccountLength = libraryBook?.Account?.Length - }); - var api = await InternalUtilities.AudibleApiActions.GetApiAsync(libraryBook.Account, libraryBook.Book.Locale); - Serilog.Log.Logger.Debug("Trying to debug mysterious null ref exception {@DebugInfo}", new { apiIsNull = api is null }); - var contentLic = await api.GetDownloadLicenseAsync(libraryBook.Book.AudibleProductId); - Serilog.Log.Logger.Debug("Trying to debug mysterious null ref exception {@DebugInfo}", new { - contentLicIsNull = contentLic is null, - contentMetadataIsNull = contentLic?.ContentMetadata is null, - voucherIsNull = contentLic?.Voucher is null, - keyIsNull = contentLic?.Voucher?.Key is null, - keyLength = contentLic?.Voucher?.Key?.Length, - ivIsNull = contentLic?.Voucher?.Iv is null, - ivLength = contentLic?.Voucher?.Iv?.Length, - }); - var aaxcDecryptDlLic = new DownloadLicense ( - contentLic.ContentMetadata?.ContentUrl?.OfflineUrl, - contentLic.Voucher?.Key, - contentLic.Voucher?.Iv, + contentLic?.ContentMetadata?.ContentUrl?.OfflineUrl, + contentLic?.Voucher?.Key, + contentLic?.Voucher?.Iv, Resources.UserAgent );