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

CBZ extracting error #312

Closed
m0lDaViA opened this issue Dec 3, 2023 · 15 comments
Closed

CBZ extracting error #312

m0lDaViA opened this issue Dec 3, 2023 · 15 comments
Labels
bug Something isn't working

Comments

@m0lDaViA
Copy link

m0lDaViA commented Dec 3, 2023

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

@m0lDaViA m0lDaViA added the bug Something isn't working label Dec 3, 2023
Copy link

github-actions bot commented Dec 3, 2023

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
Copy link
Owner

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
Copy link
Author

m0lDaViA commented Dec 4, 2023

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
Copy link
Owner

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
Copy link
Author

m0lDaViA commented Dec 8, 2023

I did and it worked totally fine.

@Skitch90
Copy link

Skitch90 commented Dec 31, 2023

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
Copy link
Author

m0lDaViA commented Jan 7, 2024

It says "ConstrainedLanguage". What does that mean?

@Skitch90
Copy link

Skitch90 commented Jan 9, 2024

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
Copy link
Owner

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
Copy link
Author

m0lDaViA commented Jan 9, 2024

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

@Skitch90
Copy link

Skitch90 commented Jan 9, 2024

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
Copy link
Owner

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
Copy link
Author

m0lDaViA commented Jan 9, 2024

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
Copy link
Owner

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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants