13xforever / ps3-disc-dumper

A handy utility to make decrypted PS3 disc dumps
MIT License
434 stars 29 forks source link

"Unable to read beyond the end of the stream" #32

Closed Trin32 closed 7 months ago

Trin32 commented 1 year ago

Hello. Thought this might be helpful?

The only ISO I found to have issue so far.

No error in GUI, it just loops indefinitely at "Looking for the disc key..." and keeps adding to the log file.

2023-03-06 12:35:54 256677 INFO Selected disc: G:\ 2023-03-06 12:35:54 256677 DEBUG Disc flags: gu 2023-03-06 12:35:54 256677 DEBUG Disc product code: BCES-01186 2023-03-06 12:35:54 256677 INFO Game title: Ape Escape™ 2023-03-06 12:35:54 256685 DEBUG Dump folder name: Ape Escape [BCES01186] 2023-03-06 12:35:54 256692 TRACE Getting keys from IrdProvider... 2023-03-06 12:35:54 256692 TRACE Searching local cache for a match... 2023-03-06 12:35:54 256692 TRACE Searching IRD Library for match... 2023-03-06 12:35:56 258323 INFO Found 1 new match in the IRD Library 2023-03-06 12:35:56 258512 WARN Failed to download BCES01186-31B26138806A585A37140697FC04CC2F.ird: Unable to read beyond the end of the stream. System.IO.EndOfStreamException: Unable to read beyond the end of the stream. at System.IO.BinaryReader.InternalRead(Int32 numBytes) at IrdLibraryClient.IrdFormat.IrdParser.Parse(Byte[] content) at IrdLibraryClient.IrdClient.DownloadAsync(String irdName, String localCachePath, CancellationToken cancellationToken) 2023-03-06 12:35:56 258512 ERROR Failed to load disc keys System.NullReferenceException: Object reference not set to an instance of an object. at Ps3DiscDumper.DiscKeyProviders.IrdProvider.EnumerateAsync(String discKeyCachePath, String productCode, CancellationToken cancellationToken) at Ps3DiscDumper.Dumper.FindDiscKeyAsync(String discKeyCachePath) 2023-03-06 12:35:56 258512 ERROR Failed to find matching key System.AggregateException: One or more errors occurred. (No valid disc decryption key was found) ---> System.Collections.Generic.KeyNotFoundException: No valid disc decryption key was found at Ps3DiscDumper.Dumper.FindDiscKeyAsync(String discKeyCachePath) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at UI.WinForms.Msil.MainForm.FindMatchingIrd(Object sender, DoWorkEventArgs doWorkEventArgs)

13xforever commented 1 year ago

Please upload full log, and make sure you're using the latest version first

Trin32 commented 1 year ago

Hello, log file attached. 2023-03-06.log

Edit: I did exit the program eventually, if not closed it will loop indefinitely.

13xforever commented 1 year ago

It looks like the IRD download was terminated, so you got invalid IRD file, but it was large enough to pass basic check. Restarting reset the cache, but idk what I can do in this situation tbh.

Trin32 commented 1 year ago

The disc wouldn't decrypt if the IRD was missing or incorrect, would it?

The product code is BCES01186. Using EU IRD from Aldo's database it gives error EU IRD.log I downloaded BCAS20159 IRD instead and change it's file name to EU one. The disc decrypted. AS IRD.log

The IRD listed are different disc size, files count, MD5. It makes no sense to me yet it works.

13xforever commented 1 year ago

disc keys are separate from mastering, sometimes sony reused it for different regions and even different games, most of the time they change it between minor revisions that only have updated firmware or something

disc dumper is only using product code to search and download ird files from online sources, but it actually checks all keys from its local cache for exactly this reason

13xforever commented 7 months ago

Closing this as I never heard of similar issues, and there's not much I can do in a similar situation anyway.