Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Errors when trying to read and opening certain image files from archives in the library and in the reader #205

Closed
1 task done
TyrantRC opened this issue Feb 20, 2024 · 4 comments
Labels

Comments

@TyrantRC
Copy link

Preflight Checklist

  • I have searched the issue tracker for a bug report that matches the one I want to file, without success.

OpenComic Version

1.1.0

Operating System

Windows 10 Pro N 22H2 19045.4046

Steps to reproduce

  1. add comic to library
  2. open comic folder in library to trigger the thumbnail generator
  3. open comic in reader

Expected Behavior

it should load the thumbnails(posters) from the archive into OpenComic, and then when clicking on the comic it should open it in the reader

Actual Behavior

it sometimes doesn't load the thumbnail for these archives,
and then when trying to open the comic it gets stuck on a loading screen
image
image

Error message

from the devtools console:
first error:

C:\Program Files\Ope…ile-manager.js:1694 Timer 'readZip' already exists

C:\Program Files\Ope…\scripts\dom.js:795 Uncaught (in promise) undefined
loadIndexPage	@	C:\Program Files\Ope…\scripts\dom.js:795
processTicksAndRejections	@	node:internal/process/task_queues:95
await in processTicksAndRejections (async)		
onclick	@	index.html:1

C:\Program Files\Ope…scripts\dom.js:1029 Uncaught (in promise) undefined
showIfHasPrevOrNext	@	C:\Program Files\Ope…scripts\dom.js:1029
processTicksAndRejections	@	node:internal/process/task_queues:95
await in processTicksAndRejections (async)		
loadIndexPage	@	C:\Program Files\Ope…\scripts\dom.js:662
onclick	@	index.html:1

2nd error:

C:\Program Files\OpenComic\resources\app.asar\scripts\queue.js:68 TypeError: Cannot read properties of undefined (reading 'detail')
    at Object.compressedError (C:\Program Files\OpenComic\resources\app.asar\scripts\dom.js:902:17)
    at processTheQueue (C:\Program Files\OpenComic\resources\app.asar\scripts\queue.js:20:10)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
(anonymous) @ C:\Program Files\OpenComic\resources\app.asar\scripts\queue.js:68

2C:\Program Files\OpenComic\resources\app.asar\scripts\file-manager.js:1694 Timer 'readZip' already exists
readZip @ C:\Program Files\OpenComic\resources\app.asar\scripts\file-manager.js:1694

C:\Program Files\OpenComic\resources\app.asar\scripts\dom.js:2082 Uncaught (in promise) undefined
C:\Program Files\OpenComic\resources\app.asar\scripts\dom.js:1029 Uncaught (in promise) undefined
DevTools failed to load source map: Could not load content for file:///C:/Program%20Files/OpenComic/resources/app.asar/templates/index.js.map: Unexpected end of JSON input
DevTools failed to load source map: Could not load content for file:///C:/Program%20Files/OpenComic/resources/app.asar/templates/Parser.js.map: Unexpected end of JSON input
DevTools failed to load source map: Could not load content for file:///C:/Program%20Files/OpenComic/resources/app.asar/templates/Tokenizer.js.map: Unexpected end of JSON input
DevTools failed to load source map: Could not load content for file:///C:/Program%20Files/OpenComic/resources/app.asar/templates/decode.js.map: Unexpected end of JSON input
DevTools failed to load source map: Could not load content for file:///C:/Program%20Files/OpenComic/resources/app.asar/templates/decode-data-html.js.map: Unexpected end of JSON input
DevTools failed to load source map: Could not load content for file:///C:/Program%20Files/OpenComic/resources/app.asar/templates/decode-data-xml.js.map: Unexpected end of JSON input
DevTools failed to load source map: Could not load content for file:///C:/Program%20Files/OpenComic/resources/app.asar/templates/decode_codepoint.js.map: Unexpected end of JSON input
DevTools failed to load source map: Could not load content for file:///C:/Program%20Files/OpenComic/resources/app.asar/templates/index.js.map: Unexpected end of JSON input
DevTools failed to load source map: Could not load content for file:///C:/Program%20Files/OpenComic/resources/app.asar/templates/stringify.js.map: Unexpected end of JSON input
DevTools failed to load source map: Could not load content for file:///C:/Program%20Files/OpenComic/resources/app.asar/templates/index.js.map: Unexpected end of JSON input
DevTools failed to load source map: Could not load content for file:///C:/Program%20Files/OpenComic/resources/app.asar/templates/encode.js.map: Unexpected end of JSON input
DevTools failed to load source map: Could not load content for file:///C:/Program%20Files/OpenComic/resources/app.asar/templates/encode-html.js.map: Unexpected end of JSON input
DevTools failed to load source map: Could not load content for file:///C:/Program%20Files/OpenComic/resources/app.asar/templates/escape.js.map: Unexpected end of JSON input
DevTools failed to load source map: Could not load content for file:///C:/Program%20Files/OpenComic/resources/app.asar/templates/traversal.js.map: Unexpected end of JSON input
DevTools failed to load source map: Could not load content for file:///C:/Program%20Files/OpenComic/resources/app.asar/templates/manipulation.js.map: Unexpected end of JSON input
DevTools failed to load source map: Could not load content for file:///C:/Program%20Files/OpenComic/resources/app.asar/templates/querying.js.map: Unexpected end of JSON input
DevTools failed to load source map: Could not load content for file:///C:/Program%20Files/OpenComic/resources/app.asar/templates/legacy.js.map: Unexpected end of JSON input
DevTools failed to load source map: Could not load content for file:///C:/Program%20Files/OpenComic/resources/app.asar/templates/helpers.js.map: Unexpected end of JSON input
DevTools failed to load source map: Could not load content for file:///C:/Program%20Files/OpenComic/resources/app.asar/templates/feeds.js.map: Unexpected end of JSON input

Additional Information

I initially thought the problem was only caused by special characters (error log 1), in specific (#), and I was able to read one particular chapter in the reader when I removed the character from the filenames inside the archive.

But then I got the same error (error log 2) with another chapter, and I tried removing the characters (_) and (-) from their filenames but this time, it didn't work.

Also, when this particular error occurs, then the thumbnail generator stops working, but it will generate the thumbnails for the poster if I successfully open the comic with the reader. If I can't open the comic, then sometimes it will not allow me to open other comics. I sometimes even have to restart the application in order to keep reading normally

when you remove the problematic chapter.cbz from the comic folder, everything else works as intended after a restart.

The compressed chapters themselves can be read by other software without issue.

I also noticed that all these chapters that are giving me trouble trigger a specific well-known warning message when extracting them with 7zip. This might change this issue into an edge case, but I figured I would make the report because this specific warning message is super common with 7zip (I'm using the last version of 7zip btw).

Sample file

Here are two small chapters in which this error occurs (slightly nsfw):
https://mega.nz/file/DdQmCZhR#_EytpV4n7tLpkVNF0nSMByM4b0zM7fOYk2rQpu4aiaA
https://mega.nz/file/eJR3lQ4a#033CpM7F4bGOuQ17tOD6q64q9s0kU_IgbwWKQDyc_RU

@TyrantRC TyrantRC added the bug label Feb 20, 2024
@wheresmytyphone
Copy link

I am having this exact same issue, on a Windows 11 Canary Insiders build. I don't have anything particularly new to add, I just would like to confirm I am getting these same series of errors in debug. If there is anything that would be helpful to provide, please let me know. Large folder of cbz files surely with all manner of characters in filename. For what it's worth, it BRIEFLY sidestepped this issue when unchecking "enable javascript source maps" in the debug tool settings. It loaded all thumbnails almost immediately as I would expect it to, but it returned to these errors as soon as I loaded settings page.

@ollm
Copy link
Owner

ollm commented Mar 29, 2024

Can you confirm if the error still occurs in v1.2.0? The extraction of zip files has been changed to 7zip d07feac and it could be that this bug is fixed.

@wheresmytyphone
Copy link

Sorry for not replying sooner, I do believe that they have been resolved. Certainly not seeing errors related to processing archives anymore.

@ollm
Copy link
Owner

ollm commented May 5, 2024

Thanks for the response, I'm closing this for now, if it appears again feel free to open another issue or reply this.

@ollm ollm closed this as completed May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants