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

Incorrect zip files on MacOS #3534

Closed
barmac opened this issue Dec 10, 2018 · 4 comments
Closed

Incorrect zip files on MacOS #3534

barmac opened this issue Dec 10, 2018 · 4 comments

Comments

@barmac
Copy link

barmac commented Dec 10, 2018

  • Version: 20.38.2

  • npm: 6.4.1

  • node: 10.13.0

  • Target: MacOS

Electron-builder seems to produce incorrect zip files. yauzl throws error like this:

> Error: invalid comment length. expected: 53819. found: 0
    at /Users/maciej/project/node_modules/yauzl/index.js:133:25
    at /Users/maciej/project/node_modules/yauzl/index.js:631:5
    at /Users/maciej/project/node_modules/node_modules/fd-slicer/index.js:32:7
    at FSReqWrap.wrapper [as oncomplete] (fs.js:460:17)

when trying to unzip generated files. On electron-builder@<=20.28.4 this was not the case.

Comment on yauzl related to this problem: thejoshwolfe/yauzl#48 (comment)

Probably the change of behavior was introduced in this commit: a6c5bc4a#diff-3c6dfae80290537b7e199091b6944fdaR60

@tyurderi
Copy link

You may update to the latest version of electron-builder. I had a similar problem when downloading the electron zip file and a yarn upgrade solved my problem.

@barmac
Copy link
Author

barmac commented Dec 11, 2018

Thank you for your response :)

Unfortunately, the problem persists on 20.38.3.

To make things clear, there is no problem with electron zip, but with the ZIP file with the electron app produced by electron-builder.

@barmac
Copy link
Author

barmac commented Dec 11, 2018

Oh, and by the way we are using electron@3.0.10. The app itself is built correctly, but the ZIP file seems to be corrupted according to more strict ZIP archivers like yauzl.

@zhaoterryy
Copy link
Collaborator

Yes the zip file that electron-builder@>=20.38.2 produces for MacOS is corrupted according to strict ZIP archivers. I've gotten around this for now by embedding 7z binaries with my application.

This is due to electron-builder trying to embed blockmap information into the archive. This "corrupts" the zip file.

barmac added a commit to camunda/camunda-modeler that referenced this issue Nov 13, 2019
As of `electron-builder@20.38.2`, the built zip files has been incorrect.
On the other hand, older versions of `electron-builder` are unable
to build application on MacOS 10.15 Catalina.

Due to above, this commit removes `zip` from MacOS targets and adds
a script that adds the built application to a correct zip archive.

Related electron-userland/electron-builder#3534

Closes #1529
barmac added a commit to camunda/camunda-modeler that referenced this issue Nov 13, 2019
As of `electron-builder@20.38.2`, the built zip files has been incorrect.
On the other hand, older versions of `electron-builder` are unable
to build application on MacOS 10.15 Catalina.

Due to above, this commit removes `zip` from MacOS targets and adds
a script that adds the built application to a correct zip archive.

Related electron-userland/electron-builder#3534

Closes #1529
barmac added a commit to camunda/camunda-modeler that referenced this issue Nov 14, 2019
As of `electron-builder@20.38.2`, the built zip files has been incorrect.
On the other hand, older versions of `electron-builder` are unable
to build application on MacOS 10.15 Catalina.

Due to above, this commit removes `zip` from MacOS targets and adds
a script that adds the built application to a correct zip archive.

Related electron-userland/electron-builder#3534

Closes #1529
barmac added a commit to camunda/camunda-modeler that referenced this issue Nov 14, 2019
As of `electron-builder@20.38.2`, the built zip files has been incorrect.
On the other hand, older versions of `electron-builder` are unable
to build application on MacOS 10.15 Catalina.

Due to above, this commit removes `zip` from MacOS targets and adds
a script that adds the built application to a correct zip archive.

Related electron-userland/electron-builder#3534

Closes #1529
nikku pushed a commit to camunda/camunda-modeler that referenced this issue Nov 15, 2019
As of `electron-builder@20.38.2`, the built zip files has been incorrect.
On the other hand, older versions of `electron-builder` are unable
to build application on MacOS 10.15 Catalina.

Due to above, this commit removes `zip` from MacOS targets and adds
a script that adds the built application to a correct zip archive.

Related electron-userland/electron-builder#3534

Closes #1529
nikku pushed a commit to camunda/camunda-modeler that referenced this issue Nov 15, 2019
As of `electron-builder@20.38.2`, the built zip files has been incorrect.
On the other hand, older versions of `electron-builder` are unable
to build application on MacOS 10.15 Catalina.

Due to above, this commit removes `zip` from MacOS targets and adds
a script that adds the built application to a correct zip archive.

Related electron-userland/electron-builder#3534

Closes #1529
nikku pushed a commit to camunda/camunda-modeler that referenced this issue Nov 15, 2019
As of `electron-builder@20.38.2`, the built zip files has been incorrect.
On the other hand, older versions of `electron-builder` are unable
to build application on MacOS 10.15 Catalina.

Due to above, this commit removes `zip` from MacOS targets and adds
a script that adds the built application to a correct zip archive.

Related electron-userland/electron-builder#3534

Closes #1529
dbjorge pushed a commit to microsoft/accessibility-insights-web that referenced this issue Feb 12, 2020
This PR enables updates for the macOS electron product. High level changes include:
- we add a zip file target because of electron-userland/electron-builder#4230
- we create the zip file ourselves because of electron-userland/electron-builder#3534 (comment)
- we update latest.yml to reflect the new zip file in the artifact
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants