mienaiyami / yomikiru

An offline desktop reader for manga, comics, and novels. Offers a customizable reading experience with extensive settings, shortcuts, themes and layouts. Manga reader / Manhwa reader / Webtoon Reader / EPUB Reader. **Not a downloader**
MIT License
223 stars 10 forks source link

CBZ extracting error #312

Closed m0lDaViA closed 4 months ago

m0lDaViA commented 6 months ago

Type of installation

Setup (.exe)

Type of reader (if reader related)

image

Steps to reproduce

Try to read a cbz.

✔️ Expected Behavior

Extracting should work normally and you should be able to see the image.

❌ Actual Behavior

Getting an error as shown in the picture. yomikiru

github-actions[bot] commented 6 months ago

Thank you for your feedback and suggestions. Please note that the author might only respond on weekends, so we kindly ask for your patience and understanding.

mienaiyami commented 6 months ago

Have you tried other cbz files, do they open? Issue might be file specific. Try renaming .cbz to .zip and then check with your file explorer if it is a valid file. Or you can share that file here.

m0lDaViA commented 6 months ago

Those cbz files are perfectly fine. I can't upload them here because of their size. First i thought it was due to powershell, because i restricted that. But in the end it's not working, even after i lifted those restrictions.

EDIT: Forgot to add something. At the first problem it says "Add-Type: The type cannot be added. Defining new types is not supported in this language mode." and at the second one "The type [IO.Compression.ZipFile] was not found."

mienaiyami commented 6 months ago

If other cbz are working fine then either this one is corrupted/invalid file or it has character in its name that are not supported on windows.

Did you try renaming it to .zip and extracting it?

m0lDaViA commented 5 months ago

I did and it worked totally fine.

Skitch90 commented 5 months ago

I did and it worked totally fine.

Did you have ConstrainedLanguage mode on?

To check it open powershell and run the following command; $ExecutionContext.SessionState.LanguageMode

https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_language_modes?view=powershell-7.4

m0lDaViA commented 4 months ago

It says "ConstrainedLanguage". What does that mean?

Skitch90 commented 4 months ago

It says "ConstrainedLanguage". What does that mean?

Basically it's a mode that limits a lot powershell capabilities. Capabilities that can be exploited from malware. I don't know if there is a way to perform archive extraction with this mode. If you put it yourself you could think to change the language mode back. In my case I decided to leave the ConstrainedLanguage mode, so I installed the application using WSL and run the application using WSLg

mienaiyami commented 4 months ago

The extraction library I use uses PowerShell(windows) and unzip(linux) behind it. I selected it at that time because I didnt want to code for each OS differently and didnt want to have dependencies. My plan was to use it PowerShell for .rar format as well but it didnt work out. So few months ago I implemented WinRAR, and after that I considered using it as main file extractor, but it was somehow slower compared to PowerShell so I didnt.

I will add option to use WinRAR for all extraction when possible.

m0lDaViA commented 4 months ago

Is there a specific reason for ts? I'm not familiar with ts, that's why I'm asking^^

Skitch90 commented 4 months ago

Is there a specific reason for ts? I'm not familiar with ts, that's why I'm asking^^

do you mean the reason why it uses powershell? It's just a library (basically code written by another person)

mienaiyami commented 4 months ago

Is there a specific reason for ts? I'm not familiar with ts, that's why I'm asking^^

By ts, do you mean typescript?

m0lDaViA commented 4 months ago

Is there a specific reason for ts? I'm not familiar with ts, that's why I'm asking^^

By ts, do you mean typescript?

Yes. Just curious^^

mienaiyami commented 4 months ago

If you mean typescript over javascript, then its because its a lot better compared to using javascript in almost everything.

If you are asking why typescript/javascript, then in short, its because Im using electronJS as backend and reactJS for the UI. It was a lot easier to make UI in react because I already knew js when I started building this app. Initially I just made a simple local webapp to read for myself, but due to filesystem limitations I turned to electron and made https://github.com/mienaiyami/offline-manga-reader. My knowledge was only limited to html, css and basic js at that time so this app was only usable. But with time it got complex for me with javascript because of errors and type, so I tried ts and implemented that in. And I almost stopped working on it. And when i was good enough at Reactjs and typescript I tried using them to make a better version.

I tried doing it using other frameworks and languages but they didnt provide enough freedom for what I wanted. Some had high RAM usage while other had high idle CPU usage. And on top of that electron makes it easier to make apps for all OS while keeping most functionality same.

m0lDaViA commented 4 months ago

I see i see, that sounds logical. Thanks for this summary. I just started learning programming for the first time (c#) that's why i'm not familiar with all that of why and why not.