Closed brettchalupa closed 1 month ago
Seeing exactly the same behavior on the Mac App Store version.
I confirmed zips work fine on 1.2.0 on Windows 11.
It seems to be a bug in 7zip-bin
https://github.com/develar/7zip-bin/issues/24, the binaries for macOS don't have the correct permissions.
I'll try if it's possible to change them with a npm prebuild
or postinstall
script.
I have push this fix 91c8d1d798e2b11b3f9d1cfdfe5698774dd00f05, it seems that if 7zip-bin
are installed from github the binary file seems to have the correct permissions, although I have not been able to test it as it only happens on the arm64
package and I can only test the x64
package.
OpenComic-1.2.0.master.91c8d1d-arm64.dmg OpenComic-1.2.0.master.91c8d1d-arm64.pkg OpenComic-1.2.0.master.91c8d1d-arm64-mac.7z
@ollm I tested the arm build you shared and am no longer seeing the reported error, but the files within the zip don't ever load and render. I just see the spinner rotating:
Happy to do more testing to help out.
Quick follow up, I checked the console logs and see this:
Uncaught (in promise)
Error: Could not load the "sharp" module using the darwin-arm64 runtime
Possible solutions:
- Ensure optional dependencies can be installed:
npm install --include=optional sharp
- Ensure your package manager supports multi-platform installation:
See https://sharp.pixelplumbing.com/install#cross-platform
- Add platform-specific dependencies:
npm install --os=darwin --cpu=arm64 sharp
- Consult the installation documentation:
See https://sharp.pixelplumbing.com/install
at Object.<anonymous> (/Applications/OpenCo…/lib/sharp.js:113:9)
at Object.<anonymous> (/Applications/OpenCo…/lib/sharp.js:116:3)
at Module._compile (node:internal/modules/cjs/loader:1373:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1432:10)
at Module.load (node:internal/modules/cjs/loader:1215:32)
at Module._load (node:internal/modules/cjs/loader:1031:12)
at c._load (node:electron/js2c/node_init:2:17025)
at s._load (node:electron/js2c/renderer_init:2:31018)
at Module.require (node:internal/modules/cjs/loader:1240:19)
at require (node:internal/modules/helpers:179:18)
It seems that now the sharp
binary for arm64
was missing, since I'm building from x64
macOS, I have fixed this with npm install --os=darwin --cpu=arm64 sharp
and added some tests before building that check that all binaries are present and have the correct permissions fecd8295c68a803bedef9a98f88b29c95da97133
By the way, the sample file has corrupted images inside the __MACOSX
folder and they are the ones that open by default since they are the first images. It seems that these are files generated by macOS AppleSingle/AppleDouble
New builds.
OpenComic-1.2.0.master.b812712-arm64.dmg OpenComic-1.2.0.master.b812712-arm64.pkg OpenComic-1.2.0.master.b812712-arm64-mac.7z
@ollm I confirmed that provided build is working as expected now with reading zip files, thank you! 👍
Preflight Checklist
OpenComic Version
1.2.0
Operating System
macOS Sonoma 14.6.1
Steps to reproduce
Expected Behavior
File is imported and can be read
Actual Behavior
Error when unzipping and comic cannot be read
Error message
Error when unzipping spawn /Applications/OpenComic.app/Contents/Resources/app.asar.unpacked/node_modules/7zip-bin/mac/arm64/7za EACCESS
When viewing the comic in the library it shows this:
Additional Information
I downloaded the version from here: https://github.com/ollm/OpenComic/releases/tag/v1.2.0
Happens regardless of the file being named
.zip
or.cbz
Different error message than https://github.com/ollm/OpenComic/issues/267
.rar
files workSample file
I put the first Pepper and Carrot episode in a zip file here for testing:
Pepper and Carrot 1.zip